From: Christoph Hellwig <hch@infradead.org>
To: Jeff Layton <jlayton@kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>,
linkinjeon@kernel.org, sfrench@samba.org,
senozhatsky@chromium.org, tom@talpey.com,
linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
David Howells <dhowells@redhat.com>
Subject: Re: [PATCH] ksmbd: use F_SETLK when unlocking a file
Date: Tue, 15 Nov 2022 22:14:12 -0800 [thread overview]
Message-ID: <Y3R/tKzP7QBt0SO/@infradead.org> (raw)
In-Reply-To: <81a329d44cb2def622ddfcde88984caf51b4a017.camel@kernel.org>
On Tue, Nov 15, 2022 at 10:22:42AM -0500, Jeff Layton wrote:
> Maybe, though the current scheme basically of mirrors the userland API,
> as do the ->lock and ->flock file_operations.
Yes. But the userland API is pretty horrible and the file_operations
should go along with any locks API change.
> FWIW, the filelocking API is pretty rife with warts. Several other
> things that I wouldn't mind doing, just off the top of my head:
>
> - move the file locking API into a separate header. No need for it to be
> in fs.h, which is already too bloated.
>
> - define a new struct for leases, and drop lease-specific fields from
> file_lock
>
> - remove more separate filp and inode arguments
>
> - maybe rename locks.c to filelock.c? "locks.c" is too ambiguous
These all sounds pretty reasonable to me.
prev parent reply other threads:[~2022-11-16 6:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-11 13:11 [PATCH] ksmbd: use F_SETLK when unlocking a file Jeff Layton
2022-11-11 15:16 ` Namjae Jeon
2022-11-14 11:40 ` David Howells
2022-11-15 9:01 ` Christoph Hellwig
2022-11-15 15:22 ` Jeff Layton
2022-11-16 6:14 ` Christoph Hellwig [this message]
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=Y3R/tKzP7QBt0SO/@infradead.org \
--to=hch@infradead.org \
--cc=dhowells@redhat.com \
--cc=jlayton@kernel.org \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=senozhatsky@chromium.org \
--cc=sfrench@samba.org \
--cc=tom@talpey.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