From: NeilBrown <neilb@suse.de>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Steve Dickson <SteveD@RedHat.com>,
Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] mountd/exportd: only log confirmed clients, and poll for updates
Date: Sat, 20 Mar 2021 07:43:46 +1100 [thread overview]
Message-ID: <87o8feeuwt.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <20210319141508.GB31533@fieldses.org>
[-- Attachment #1: Type: text/plain, Size: 2047 bytes --]
On Fri, Mar 19 2021, J. Bruce Fields wrote:
> On Fri, Mar 19, 2021 at 02:38:25PM +1100, NeilBrown wrote:
>>
>> It is possible (and common with the Linux NFS client) for the nfs server
>> to receive multiple SET_CLIENT_ID or EXCHANGE_ID requests when starting
>> a connection. This results in some clients appearing in
>> /proc/fs/nfsd/clients
>> which never get confirmed. mountd currently logs these, but they aren't
>> really helpful.
>>
>> If the kernel supports the reporting of the confirmation status of
>> clients, we can suppress the message until a client is confirmed.
>>
>> With this patch we:
>> - record if the client is confirmed, assuming it is if the status is
>> not reported
>> - don't log unconfirmed clients
>> - check all unconfirmed clients each time any event is processed,
>> - if there are unconfirmed clients, we request a wakeup after a
>> exponentially decreasing time, and check again
>
> increasing not decreasing, I think.
or frequency, not time?? Thanks.
>
> Is there any better way to let userland know when the contents of a
> virtual file have changed?
i had thought of using sysfs_notify_dirent(), though the file isn't in
sysfs (or kernfs), so extra work might be needed. And I didn't want to
hold the file descriptor open, as then I would need to worry about where
the available fds could be exhausted.
>
> Looks at inofity man page.... There's an "IN_MODIFY" event. I think we
> could add an fsnotify_inode(inode, FS_MODIFY); at the end of
> move_to_confirmed(). (I'm not sure what's the best way to get the inode
> of the info file there.)
>
> Would that help?
Yes, that is a much better idea.
We could pass an array of dentry pointers to nfsd_client_mkdir and
thence to nfsdfs_create_files.
Then create_client could grab the required dentry and stash it next to
cl_nfsd_dentry. Then use fsnotify_dirent() which is better than _inode
as the file name gets included in the event.
I might give that a try.
Thanks,
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 853 bytes --]
next prev parent reply other threads:[~2021-03-19 20:44 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-01 2:17 [PATCH 0/5 v2] nfs-utils: provide audit-logging of NFSv4 access NeilBrown
2021-03-01 2:17 ` [PATCH 4/5] mountd: add --cache-use-ipaddr option to force use_ipaddr NeilBrown
2021-03-01 2:17 ` [PATCH 1/5] mountd: reject unknown client IP when !use_ipaddr NeilBrown
2021-03-01 2:17 ` [PATCH 2/5] mountd: Don't proactively add export info when fh info is requested NeilBrown
2021-03-01 2:17 ` [PATCH 3/5] mountd: add logging for authentication results for accesses NeilBrown
2021-03-01 2:17 ` [PATCH 5/5] mountd: make default ttl settable by option NeilBrown
2021-03-01 3:43 ` [PATCH 0/5 v2] nfs-utils: provide audit-logging of NFSv4 access Yongcheng Yang
2021-03-02 2:26 ` NeilBrown
2021-03-01 18:50 ` J. Bruce Fields
2021-03-01 21:59 ` NeilBrown
2021-03-02 3:01 ` NeilBrown
2021-03-02 3:27 ` J. Bruce Fields
2021-03-02 3:49 ` NeilBrown
2021-03-02 4:05 ` J. Bruce Fields
2021-03-19 3:36 ` NeilBrown
2021-03-19 3:37 ` [PATCH] nfsd: report client confirmation status in "info" file NeilBrown
2021-03-19 3:38 ` [PATCH] mountd/exportd: only log confirmed clients, and poll for updates NeilBrown
2021-03-19 14:15 ` J. Bruce Fields
2021-03-19 20:43 ` NeilBrown [this message]
2021-03-19 22:39 ` [PATCH v2] " NeilBrown
2021-03-22 14:30 ` Chuck Lever III
2021-04-07 18:26 ` Steve Dickson
2021-03-19 22:38 ` [PATCH v2] nfsd: report client confirmation status in "info" file NeilBrown
2022-05-18 14:45 ` Chuck Lever III
2022-05-18 15:26 ` Chuck Lever III
2021-03-19 13:28 ` [PATCH 0/5 v2] nfs-utils: provide audit-logging of NFSv4 access J. Bruce Fields
2021-03-19 20:48 ` NeilBrown
2021-03-19 21:09 ` J. Bruce Fields
2021-03-22 17:06 ` J. Bruce Fields
2021-04-07 19:14 ` J. Bruce Fields
2021-04-07 19:33 ` Steve Dickson
2021-04-07 19:55 ` J. Bruce Fields
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=87o8feeuwt.fsf@notabene.neil.brown.name \
--to=neilb@suse.de \
--cc=SteveD@RedHat.com \
--cc=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).