From: Al Viro <viro@ZenIV.linux.org.uk>
To: Tom Spink <tspink@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [RFC PATCH 1/2] vfs: Introduce on-demand filesystem initialisation
Date: Sun, 1 Jun 2008 16:32:05 +0100 [thread overview]
Message-ID: <20080601153205.GM28946@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1212331915-22856-2-git-send-email-tspink@gmail.com>
On Sun, Jun 01, 2008 at 03:51:54PM +0100, Tom Spink wrote:
Occam's Razor...
You've just serialized ->kill_sb() for given fs type (and made sure that
if one gets stuck, _everything_ gets stuck). Moreover, you've serialized
sget() against the same thing (i.e. pretty much each ->get_sb()).
All of that (and a couple of new methods) is done for something that just
plain does not belong to VFS. It's trivially doable in filesystem *and*
it's about the objects with lifetimes that make sense only for filesystem
itself.
Hell, just do
int want_xfs_threads(void)
{
int res = 0;
mutex_lock(&foo_lock);
if (!count++) {
start threads
if failed {
count--;
res = -Esomething;
}
}
mutex_unlock(&foo_lock);
return res;
}
void leave_xfs_threads(void)
{
mutex_lock(&foo_lock);
if (!--count)
stop threads
mutex_unlock(&foo_lock);
}
Call want_xfs_threads() in xfs_fs_fill_super(); call leave_xfs_threads() in
the end of xfs_put_super() and on failure exit from xfs_fs_fill_super().
End of story... Any other fs that wants such things can do the same.
next prev parent reply other threads:[~2008-06-01 15:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-01 14:51 [RFC PATCH 0/2] On-demand Filesystem Initialisation Tom Spink
2008-06-01 14:51 ` [RFC PATCH 1/2] vfs: Introduce on-demand filesystem initialisation Tom Spink
2008-06-01 14:51 ` [RFC PATCH 2/2] xfs: Make XFS use the new file system init infrastructure Tom Spink
2008-06-01 15:32 ` Al Viro [this message]
2008-06-02 13:38 ` [RFC PATCH 1/2] vfs: Introduce on-demand filesystem initialisation Tom Spink
2008-06-02 1:58 ` [RFC PATCH 0/2] On-demand Filesystem Initialisation Dave Chinner
2008-06-02 13:39 ` Tom Spink
-- strict thread matches above, loose matches on Subject: below --
2008-05-25 17:48 Tom Spink
2008-05-25 17:48 ` [RFC PATCH 1/2] vfs: Introduce on-demand filesystem initialisation Tom Spink
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=20080601153205.GM28946@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tspink@gmail.com \
/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
Powered by JetHome