[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081218145359.GD9871@mit.edu>
Date: Thu, 18 Dec 2008 09:54:00 -0500
From: Theodore Tso <tytso@....edu>
To: Jan Kara <jack@...e.cz>
Cc: Toshiyuki Okajima <toshi.okajima@...fujitsu.com>,
Ext4 Developers List <linux-ext4@...r.kernel.org>,
linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH -v3] vfs: add releasepages hooks to block devices which
can be used by file systems
On Thu, Dec 18, 2008 at 02:12:34PM +0100, Jan Kara wrote:
> This is the thing I was wondering about. Why exactly is the spinlock
> necessary for blkdev_releasepage()? I understand we have to protect
> reading client_releasepage() pointer because it could change but my point
> was that it changes only during mount / umount.
Hmm.... I suppose we could use RCU, but then we'd have to worry about
the race condition where client_releasepage() gets called after the
umount has happened.
> > I also think we are sad that we cannot implement various
> > implementations for client_releasepage(). But now I cannot imagine
> > what to do for a client_releasepage() which can sleep, too...
My suggestion is that we not worry about making changes to
fs/block_dev.c to allow client_releasepage() to sleep until we have
filesystems that really need client_releasepage() to sleep. It
probably is possible, with appropriate atomic bit sets for flags to
indicate an unmount in progress, and client_releasepage in progress,
and use of RCU, we could allow client_releasepage. But it might not
be worth it unless there is a filesystem that really needs it.
- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists