From: Jan Kara <jack@suse.cz>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: viro@parcelfarce.linux.theplanet.co.uk, akpm@osdl.org,
dhowells@redhat.com, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] namespace.c: cleanup in mark_mounts_for_expiry()
Date: Tue, 24 May 2005 10:20:10 +0200 [thread overview]
Message-ID: <20050524082010.GA26254@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <E1DZAAs-000418-00@dorka.pomaz.szeredi.hu>
> > Looks sane. However, we still have a problem here - just what would
> > happen if vfsmount is detached while we were grabbing namespace
> > semaphore? Refcount alone is not useful here - we might be held by
> > whoever had detached the vfsmount. IOW, we should check that it's
> > still attached (i.e. that mnt->mnt_parent != mnt). If it's not -
> > just leave it alone, do mntput() and let whoever holds it deal with
> > the sucker. No need to put it back on lists.
>
> Right. I'll fix that too.
>
> On a bit unrelated node, in do_unmount() why is that
> DQUOT_OFF()/acct_auto_close() thing only called for the base of a tree
> being detached, and not for any submounts? Is that how it's supposed
> to work?
I guess the code is there since the good old times when each
filesystem could be mounted at most once and you had to call umount on
it directly ;). I see two possibilites there:
1) Call DQUOT_OFF() when the last reference to the superblock should
be dropped. This has a problem that currently quota code holds the
reference to the vfsmount of the mountpoint it was called on (to
protect itself against umount). So if you try something like
mount /home, quotaon /home, mount --bind /home /home2, umount /home,
it will fail with EBUSY.
2) Make quota code protect against umount in a different way without
holding the vfsmount references (any ideas?). Then the above described
use will work. But I'm not sure it's worth the problems especially
with userspace tools not being able to see the proper mount options
and so on.
So personally I'd prefer 1). For the namespace code it means only that
it should call DQUOT_OFF() whenever it intends to drop the last
reference to the superblock (and check for business only after quota
has been turned off).
Honza
--
Jan Kara <jack@suse.cz>
SuSE CR Labs
prev parent reply other threads:[~2005-05-24 8:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-20 13:54 Miklos Szeredi
2005-05-20 14:47 ` Al Viro
2005-05-20 16:16 ` Miklos Szeredi
2005-05-24 8:20 ` Jan Kara [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=20050524082010.GA26254@atrey.karlin.mff.cuni.cz \
--to=jack@suse.cz \
--cc=akpm@osdl.org \
--cc=dhowells@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--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
all inboxes | Powered by JetHome®