linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Waychison <mike@waychison.com>
To: Ian Kent <raven@themaw.net>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	linux-fsdevel@vger.kernel.org, jamie@shareable.org,
	viro@parcelfarce.linux.theplanet.co.uk
Subject: Re: [RFC][PATCH 1/8] namespace: use global namespace semaphore
Date: Tue, 31 May 2005 11:55:37 -0400	[thread overview]
Message-ID: <429C88F9.6010200@waychison.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0505311453370.17076@wombat.indigo.net.au>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ian Kent wrote:
> On Mon, 30 May 2005, Mike Waychison wrote:
>> 
>> No, the removal of struct namespace shouldn't keep you from walking
>> vfsmounts from modules.  In fact, in Miklos' 1/8 patch, he moved
>> namespace->sem to a global semaphore, which isn't needed by the end of
>> the patch set.  namespace->sem only ever protected the namespace->list
>> field.
>  
> But my impression was that this semaphore surrounded the mount and umount 
> processes. The list updates looked like they were all done when this 
> semaphore was held.
> 

namespace->sem did indeed surround the mounting and unmounting
processes, however it never was meant to protect the integrety of the
vfsmount tree, only namespace->list.  Due to the lock nesting rules of
vfs, it did infact exclude any tree operations, however the proper lock
to have used was always vfsmount_lock

> 
>> If you which to walk a mounttree, you still only ever require grabbing
>> vfsmount_lock and use mntget/mntput.
> 
> 
> Which is not exported.
> 
> So do you think it should be?

Yes.  Even better would be for a proper interface to be exported from
fs/namespace.c though, so that as a module you don't care about the
nitty gritty details of how the tree is held together.  This is likely
to get even more complicated with time as Ram's patches get more testing.

> Maybe lookup_mnt shouldn't be static and should be exported instead?
> 

lookup_mnt is the wrong operation, as it looks for a mountpoint given a
vfsmount and dentry.  What you need is a way to walk the tree, and I'm
inclined to say that something like next_mnt is what you are looking for.

> 
>> Overall, this means autofs4 stuff will need to be updated to reflect
>> these changes, but they are minimal at best.
> 
> 
> OK. But I'm not sure how I can get at this from within a module.
> 

Right now, the quickest way is to EXPORT_SYMBOL(vfsmount_lock) and grab
it instead of namespace->sem.

> Perhaps something like updating the nameidata struct passed to 
> follow_link, similar to what you did elsewhere in your autofsng 
> patches, needs to be added to this lot.

I'm lost to what you mean.  The only place autofsng touches nameidata in
the VFS is setting ->mnt to a non-stale mount before a ->follow_link.
That symlinks even work without this change is almost coincidence.

Mike Waychison
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCnIj5dQs4kOxk3/MRArdfAJ0Ytphl0/ly9Ds6v/WDiCTy+FBwdACfeT+r
TO/HFIluXOPYZGcZUBqrr+c=
=EMfY
-----END PGP SIGNATURE-----

  parent reply	other threads:[~2005-05-31 15:58 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-30 13:19 [RFC][PATCH 1/8] namespace: use global namespace semaphore Miklos Szeredi
2005-05-31  2:58 ` Ian Kent
2005-05-31  3:23   ` Mike Waychison
2005-05-31  7:02     ` Ian Kent
2005-05-31  7:56       ` Miklos Szeredi
2005-05-31  9:34         ` Ian Kent
2005-05-31 10:05           ` Miklos Szeredi
2005-05-31 10:13             ` Miklos Szeredi
2005-05-31 15:43               ` Mike Waychison
2005-06-01  5:04               ` Ian Kent
2005-06-01  8:35                 ` Miklos Szeredi
2005-06-03  2:10                   ` Ian Kent
2005-06-03  5:28                     ` Miklos Szeredi
2005-06-04  4:13                       ` raven
2005-06-04  6:32                         ` Miklos Szeredi
2005-06-04  6:50                           ` raven
2005-06-04  7:20                             ` Miklos Szeredi
2005-06-04  7:27                               ` raven
2005-06-03 17:22                     ` Mike Waychison
2005-06-04  4:32                       ` raven
2005-06-03 17:13               ` Mike Waychison
2005-06-03 18:20                 ` Miklos Szeredi
2005-06-01  4:36             ` Ian Kent
2005-06-03 17:24               ` Mike Waychison
2005-06-04  4:38                 ` raven
2005-05-31 15:55       ` Mike Waychison [this message]
2005-05-31 16:08         ` Miklos Szeredi
2005-06-01  4:18           ` Ian Kent
2005-06-01  8:28             ` Miklos Szeredi
2005-06-03  2:23               ` Ian Kent
2005-06-03  5:18                 ` Miklos Szeredi
2005-06-04  4:53                   ` raven
2005-06-04  6:57                     ` Miklos Szeredi
2005-06-04  7:13                       ` raven
2005-06-03 17:26             ` Mike Waychison
2005-06-01  3:57         ` Ian Kent
2005-06-03 17:07           ` Mike Waychison

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=429C88F9.6010200@waychison.com \
    --to=mike@waychison.com \
    --cc=jamie@shareable.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=raven@themaw.net \
    --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).