Re: Directory Leases

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

 



On 10/27/24 4:24 AM, Steve French wrote:
I built and installed Samba with your recent directory lease series
and tried some experiments with cifs.ko to it and I do see directory
lease requested by the client and held for 30 seconds for the
directory (or directories) that I do ls on,...

hm, guess I was not looking close enough, I rechecked and now I can see the client requesting directory leases and the server granting them.

Two things seem odd:

- the client only requests a READ lease without a HANDLE lease,

- the client opens a directory with R lease, does a query-info on it and then opens the directory a second time, without lease, and uses that second handle for the directory listing.

In my understanding a directory lease without H lease is useless, as it limits lifetime of the cache to the lifetime of the handle and you can't defer the close on the directory handle without a H lease.

Cf the presentation "SMB2.2 Advancements for WAN" from SDC 2011 page 20:

"Without H leases, the R lease is of no value."

open_cached_dir() seems to be the function requesting the directory lease and it requests SMB2_OPLOCK_LEVEL_II which is mapped to SMB2_LEASE_READ_CACHING_LE.

Thanks!
-slow




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

  Powered by Linux