linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@warthog.cambridge.redhat.com>
To: viro@parcelfarce.linux.theplanet.co.uk
Cc: chas williams <chas@locutus.cmf.nrl.navy.mil>,
	Christoph Hellwig <hch@infradead.org>,
	David Howells <dhowells@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] add a stub by which a module can bind to the AFS syscall
Date: Thu, 08 May 2003 15:01:05 +0100	[thread overview]
Message-ID: <4992.1052402465@warthog.warthog> (raw)
In-Reply-To: <20030430155652.GU10374@parcelfarce.linux.theplanet.co.uk>


Hi Alex,

> Which means only one thing - changing that API will affect very few
> things.
> 
> Let's keep the kernel side sane.  We don't have to mess with multiplexors
> and even if we decide to use them, we will be better off by having decoder
> outside of AFS proper.  Again, take a look at interaction between userland
> and knfsd.  Right now we have a sane interface (IO on nfsctl files) and
> we have a wrapper (sys_nfsctl) that does decode/open/write/read/close.

As you suggested on IRC, almost all pioctls can be emulated by either:

 (1) doing a decode/mount/open/write/read/close on a file on a special
     internal filesystem if an inode is not required,

or:

 (2) translating the call to get/set/lget/lsetxattr calls if an inode is
     required.

However, there's always an exception. One of the pioctls requires three
things:

 (a) a dentry and inode,
 (b) an input buffer with a filename in it,
 (c) an output buffer for holding a fair amount of data.

This can't be done easily with (1) because of (a), and it can't be done
atomically as (2) because two separate calls would have to be made for (b) and
(c) (and the netfs would have to retain some sort of state).

How about, instead, for pioctl calls that require an inode, the AFS
multiplexor in the kernel invents a temporary file structure, points it at the
dentry and calls its open, ioctl and release calls on inode->f_op?

Or perhaps you'd consider adding an extra inode operation?

	struct inode_operations {
		...
		int (*inodectl) (struct dentry *, unsigned int, unsigned long);
	};

David

  reply	other threads:[~2003-05-08 13:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-30 13:44 [PATCH] add a stub by which a module can bind to the AFS syscall David Howells
2003-04-30 14:02 ` Christoph Hellwig
2003-04-30 14:46   ` Jeff Garzik
2003-04-30 14:55     ` Christoph Hellwig
2003-04-30 14:57   ` chas williams
2003-04-30 15:02     ` Christoph Hellwig
2003-04-30 15:13       ` chas williams
2003-04-30 15:27         ` Christoph Hellwig
2003-04-30 15:33           ` chas williams
2003-04-30 15:38             ` Christoph Hellwig
2003-04-30 15:50             ` Arjan van de Ven
2003-04-30 15:42           ` Anton Blanchard
2003-04-30 15:56         ` viro
2003-05-08 14:01           ` David Howells [this message]
2003-04-30 15:30       ` David Howells
2003-04-30 15:37         ` Christoph Hellwig
2003-04-30 18:07         ` Jan Harkes
2003-04-30 18:19           ` Trond Myklebust

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=4992.1052402465@warthog.warthog \
    --to=dhowells@warthog.cambridge.redhat.com \
    --cc=chas@locutus.cmf.nrl.navy.mil \
    --cc=dhowells@redhat.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /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).