public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@warthog.cambridge.redhat.com>
To: Derrick J Brashear <shadow@dementia.org>
Cc: David Howells <dhowells@redhat.com>,
	openafs-devel@openafs.org, linux-kernel@vger.kernel.org
Subject: Re: Adding an "acceptable" interface to the Linux kernel for AFS
Date: Fri, 09 May 2003 18:40:33 +0100	[thread overview]
Message-ID: <525.1052502033@warthog.warthog> (raw)
In-Reply-To: <Pine.LNX.4.53.0305091056490.31198@scully.trafford.dementia.org>


> > I'm wondering how attached OpenAFS is to this interface? Can OpenAFS be
> > altered to use the following access points instead:
> 
> Generally I think this interface will work.

It would be nice, though, not to have to worry about differentiating between
pioctls that take a path and those that don't inside of the core kernel.

> >  (1) setpag(pag_t pag)
> 
> If you don't specify a pag it should allocate you one, and for
> non-priviledged users this should be the only allowed mode.

Thinking about it, this shouldn't take an argument at all, and should just put
its caller into a completely new PAG with a unique ID.

> I assume:
> fs is a text representation of whose filesystem you're doing this for?
> ("openafs", "arla", etc)
> domain is what's typically referred to as an afs cell

Yes. After all, you might need the key to be available before you can mount.

This may be useful for samba too... The mount command for samba typically
requires authentication data to be passed as options (workgroup, username,
password).

> I'd also like to see a priviledged "unsetpag()", e.g. I no longer wish to be
> in a pag.

"I" being the calling process? That can be done. I could just define that it
is permissible for the PAG pointer to be NULL. This makes support for the init
process easier, as I don't have to compile in a PAG for it.

> Currently it's possible to set a token when you have no pag, and these
> become associated with the uid that set them. (The pag number is not the uid;
> Instead any process without a pag but with a uid that has tokens associated
> with it gets those tokens.) As long as the above don't bind tightly to a pag,
> sure.

So you'd have a list of tokens associated with the user too?

I suppose I could give both the PAG and the user lists, and search the PAG
first, then the user, but what detemines the user? The PAG, the opener of a
file or the current process?

> As to pioctl, will it be able to handle things where path cannot be stat'd
> in advance? For instance, the prefetching hint (VIOCPREFETCH), if you
> could stat it, it wouldn't be a prefetch. Another concern there would be
> dangling mount points (a mount point you still have to a volume that's
> been deleted) when calling VIOC_AFS_DELETE_MT_PT or VIOC_AFS_STAT_MT_PT.

The latter pair of pioctls you've mentioned both require the directory holding
the mount point to be locally available as a kernel inode, and both of them
require the path to that directory to be supplied as the path argument to
pioctl rather than the path of the mountpoint, so I don't see that there'd be
a problem there.

I don't have documentation on VIOCPREFETCH, but if it's anything like the
other two, then it shouldn't be a problem either.

> To the extent we can we'd avoid relying on this (8), but I think we'll need
> it for now.
> 
> >  (8) fsctl(const char *fs, const char *cmd, struct fsctl_buf)
> >

It may be possible to do this through the sysfs filesystem in 2.5 instead.

David

  reply	other threads:[~2003-05-09 17:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-09 10:16 Adding an "acceptable" interface to the Linux kernel for AFS David Howells
2003-05-09 16:40 ` Derrick J Brashear
2003-05-09 17:40   ` David Howells [this message]
2003-05-09 19:09     ` Derrick J Brashear
2003-05-09 20:19       ` David Howells
2003-05-09 20:30         ` Derrick J Brashear
  -- strict thread matches above, loose matches on Subject: below --
2003-05-09 21:22 Chuck Ebbert

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=525.1052502033@warthog.warthog \
    --to=dhowells@warthog.cambridge.redhat.com \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openafs-devel@openafs.org \
    --cc=shadow@dementia.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