2007-03-07 22:18:00

by NeilBrown

[permalink] [raw]
Subject: Re: Delays on "first" access to a NFS mount

On Wednesday March 7, [email protected] wrote:
>
> I think what Tom had in mind was to stat all directories once, remember
> their values, have inotify keep an eye on 'em and whenever they change,
> update the remembered values. This way, disk access would only have to
> be done whenever something changes, which is when the disk is spun up
> anyway.

There is certainly some sense in that approach. I don't think
inotify is needed though. The only part of the stat information we
are interested in is major/minor/inode numbers, and they don't change.

We could possibly stat everything that seems to be interesting once
and store the details.
When a request comes in, match against the records to find a path,
then double-check the path still matches. If it does, good. If not,
take the long way around again.

NeilBrown

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs


2007-03-07 22:36:28

by Talpey, Thomas

[permalink] [raw]
Subject: Re: Delays on "first" access to a NFS mount

At 05:17 PM 3/7/2007, Neil Brown wrote:
>On Wednesday March 7, [email protected] wrote:
>>
>> I think what Tom had in mind was to stat all directories once, remember
>> their values, have inotify keep an eye on 'em and whenever they change,
>> update the remembered values. This way, disk access would only have to
>> be done whenever something changes, which is when the disk is spun up
>> anyway.
>
>There is certainly some sense in that approach. I don't think
>inotify is needed though. The only part of the stat information we
>are interested in is major/minor/inode numbers, and they don't change.

Actually I thought it would important to also look at the permission
bits and/or any acls, in case access were revoked e.g mode 0. The
export needs to be invalidated, basically as mountd would have found
if exporting from scratch. Wouldn't it?

Come to think of it, maybe not. If the export goes bad then the
client gets ESTALE, that's different from revoking access or never
exporting. In that case I think mountd just needs to be sure the
export point doesn't go away due to unmount, or is covered by a
new one.

Tom.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs