tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/bin/cp

On Sun, Oct 24, 2010 at 10:56:40PM +0000, David Holland wrote:
>  > 
>  > I think write() only needs to lock the the file enough to ensure that
>  > the file offset is correct.
> No, since in general the file is also being extended (certainly in
> this case it is) it also has to lock the file size, and that's going
> to deny stat() until it's done.

A stat request during a write can safely return the old size.


David Laight:

Home | Main Index | Thread Index | Old Index