From: Ralph Boehme <slow@samba.org>
To: Steve French <smfrench@gmail.com>
Cc: linux-cifs@vger.kernel.org,
Meetakshi Setiya <meetakshisetiyaoss@gmail.com>
Subject: Re: Directory Leases
Date: Sun, 27 Oct 2024 15:16:24 +0100 [thread overview]
Message-ID: <42c8b091-a57a-4d4e-aebf-aee57dabf5d4@samba.org> (raw)
In-Reply-To: <CAH2r5muwuKvifnG0XK3wShCtpR6EZOEozn=H95qx9ewHDO5jdA@mail.gmail.com>
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
next prev parent reply other threads:[~2024-10-27 14:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-26 13:13 Directory Leases Ralph Boehme
2024-10-27 3:24 ` Steve French
2024-10-27 14:16 ` Ralph Boehme [this message]
2024-10-28 21:11 ` Steve French
2024-10-29 10:05 ` Ralph Boehme
[not found] ` <CAH2r5mtkuCihp9hRp16RSyV=g0xcPyYuUBbBipBAtdw_CbiTKQ@mail.gmail.com>
2024-11-02 6:29 ` Fwd: " Steve French
2024-11-19 2:51 ` Steve French
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42c8b091-a57a-4d4e-aebf-aee57dabf5d4@samba.org \
--to=slow@samba.org \
--cc=linux-cifs@vger.kernel.org \
--cc=meetakshisetiyaoss@gmail.com \
--cc=smfrench@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox