monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] Re: slow update/status on NFS


From: Pavel Cahyna
Subject: [Monotone-devel] Re: slow update/status on NFS
Date: Tue, 29 May 2007 00:58:05 +0200
User-agent: mutt-ng/devel-r529 (NetBSD)

On Wed, May 23, 2007 at 09:16:48PM -0700, Zack Weinberg wrote:
> On 5/23/07, Nathaniel Smith <address@hidden> wrote:
> >On Wed, May 23, 2007 at 03:12:55PM -0400, Ethan Blanton wrote:
> >> Is this true on all reasonable filesystems and operating environments?
> >> I know that there are flavors of Unix out there (maybe *all* flavors
> >> of Unix older than some age?) which will let you open() and read() a
> >> directory.
> >
> >Well, true -- and as mentioned upthread, we might want to notice
> >symlinks (not to mention even nastier weird files, like fifos that
> >will just make us block).  So that would suggest a single stat before
> >opening, not 4...
> 
> There are open(2) flags to prevent all of those headaches that I can
> think of (O_NOFOLLOW|O_NONBLOCK|O_NOCTTY should do it, in fact), and
> it can be nearly twice as fast to do open() and then fstat() as
> [l]stat and then open()... and there's no race then, either.  This
> *will* open a directory or device file, but that is harmless; we just
> don't try to read from it. 

Opening a device file can cause tapes to be rewound, reading of partition
tables from disks and possibly other strange effects.

Pavel Cahyna




reply via email to

[Prev in Thread] Current Thread [Next in Thread]