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:
signature.asc
Description: PGP signature