public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: Matthew Wilcox <willy@debian.org>
Cc: Steve French <smfltc@us.ibm.com>,
	linux-cifs-client@cifs.bkbits.net, linux-fsdevel@vger.kernel.org
Subject: Re: fcntl method for file_operations
Date: Thu, 25 Mar 2004 19:55:15 +0000	[thread overview]
Message-ID: <20040325195515.GF11236@mail.shareable.org> (raw)
In-Reply-To: <20040325193545.GC25059@parcelfarce.linux.theplanet.co.uk>

Matthew Wilcox wrote:
> perhaps the right thing to do is just to add the following ops to
> file_operations:
> 
> 	int (*fcntl_setfl)(int fd, struct file *filp, unsigned long arg);
> 	int (*fcntl_getlease)(struct file *filp);
> 	int (*fcntl_setlease)(int fd, struct file *filp, unsigned long arg);
> 	int (*fcntl_dirnotify(int fd, struct file *filp, unsigned long arg);
> 
> comments?

I agree that a generic fcntl() doesn't make a lot of sense.

However, rather than your suggestion, I'd rather
getlease/setlease/dirnotify have more appropriate structure for those
operations, be called from a generic lease/dnotify core, and be added
as and when they are actually used by a filesystem.

Otherwise I can easily see NFS dirnotify being implemented, and
dnotify.c being enhanced to support some feature like non-signal
results (DN_NOSIGNAL), ->poll() waiting, last writer close, or
whatever, and those new features fine *except* on NFS filesystems
which has it's own signal delivery code etc. copied from dnotify.c.

In other words, for dnotify, the generic dnotify code should always be
used so that the API is consistent among filesystems, but it should
call the filesystem to do the filesystem-specific part namely
registering a callback function to be called when a non-local change
is detected.

Similarly for leases, and any other wonders that are added in future
like mount notifications.

-- Jamie

  reply	other threads:[~2004-03-25 19:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-25 18:04 fcntl method for file_operations Steve French
2004-03-25 19:35 ` Matthew Wilcox
2004-03-25 19:55   ` Jamie Lokier [this message]
2004-03-25 20:15   ` Trond Myklebust
2004-03-25 20:31     ` viro
2004-03-25 20:59       ` Trond Myklebust
2004-03-25 20:25   ` Steve French
2004-03-25 20:34     ` viro

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=20040325195515.GF11236@mail.shareable.org \
    --to=jamie@shareable.org \
    --cc=linux-cifs-client@cifs.bkbits.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=smfltc@us.ibm.com \
    --cc=willy@debian.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