Re: Directory Leases

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

 



Hi Steve,

On 10/28/24 10:11 PM, Steve French wrote:
Doing some additional experiments to Windows and also to the updated
Samba branch from Ralph, I see the directory lease request, and
I see that after ls (which will cache the directory contents for about
30 second) we do get a big benefit from the metadata of the directory
entries being cached e.g. "ls /mnt ; sleep 10; stat /mnt/file ; sleep
15 stat /mnt/file2 ; sleep 10 /mnt/file"  - we only get the roundtrips
for the initial ls - the stat calls don't cause any network traffic
since the directory is cached.
indeed, I can confirm that some cache is used for stat. Unfortunately it isn't used for readddir.

Also, coming back on the issue that the client is deferring a close on the directory with having a H lease:

In my understanding that's at least going to cause problems if other clients want to do anything on the server that is not allowed if there are conflicting opens like renaming a directory (which is not allowed if there are any opens below recursively). Unlinks will also be deferred as long as the client sticks to its handle.

The client should acquire a RH lease on directories if it wants to cache the handle and that's a prerequisite in order to cache readdir.

Afair the kernel is currently caching for 30 seconds. Increasing this time should not be done without also having a H lease.

-slow




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux