From: Ralph Boehme <slow@samba.org>
To: Steve French <smfrench@gmail.com>
Cc: linux-cifs@vger.kernel.org,
Meetakshi Setiya <meetakshisetiyaoss@gmail.com>,
ronnie sahlberg <ronniesahlberg@gmail.com>
Subject: Re: Directory Leases
Date: Tue, 29 Oct 2024 11:05:34 +0100 [thread overview]
Message-ID: <6e38eeba-9a82-48f4-bfcd-a4f2ce718782@samba.org> (raw)
In-Reply-To: <CAH2r5mtr0SJHzG4tNeRA=1H1gEswQUywj0G5kR+wuoPk1r1YVA@mail.gmail.com>
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
next prev parent reply other threads:[~2024-10-29 10:05 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
2024-10-28 21:11 ` Steve French
2024-10-29 10:05 ` Ralph Boehme [this message]
[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=6e38eeba-9a82-48f4-bfcd-a4f2ce718782@samba.org \
--to=slow@samba.org \
--cc=linux-cifs@vger.kernel.org \
--cc=meetakshisetiyaoss@gmail.com \
--cc=ronniesahlberg@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