> "Richard L. Hamilton" <[EMAIL PROTECTED]> wrote:
>
> > I suppose there are a lot of ways the objective
> could be achieved.
> > For example, an additional open() flag O_NOATIME to
> allow reading
> > a file without modifying its atime. That would
> have the advantage that
> > timestamps didn't need to be restored
> after-the-fact, so even an interrupted
> > backup utility using that flag wouldn't mess up any
> timestamps.
>
> This sounds OK as long as the O_NOATIME flag may be
> added after an open(2)
> via fcntl(2) - to preventfuture atime updates with
> read(2). This is needed
> in order to allow O_NOATIME to be useful for files
> opened via fopen(3).
>
I'd like that too, but is it really necessary? Instead of inserting
if ((fl=fcntl(fileno(mystream),F_GETFL,0)) != -1)
fcntl(fileno(mystream),F_SETFL,fl|O_NOATIME);
after the fopen(), couldn't one just replace the fopen()
with an open()/fdopen() pair, where the open() used the desired flags?
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code