[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20080102203357.GB884@lst.de>
Date: Wed, 2 Jan 2008 21:33:57 +0100
From: Christoph Hellwig <hch@....de>
To: Dave Hansen <haveblue@...ibm.com>
Cc: Christoph Hellwig <hch@....de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: getting rid of filp search in fs_may_remount_ro()
On Mon, Dec 31, 2007 at 02:54:48PM -0800, Dave Hansen wrote:
> Here's one blatantly untested idea I have. The idea is to keep track if
> anyone might be writing to a mnt. We keep track on a flag in the mnt.
> When we set the flag, we increment a counter in the sb and decrement
> when the flag is cleared.
>
> We can't simply look at mnt->__mnt_writers because there might be
> "checked-out" writers in the mnt_writers[] array. We also have to keep
> new writers from coming in while we do this, so we use the spinlocks in
> the mnt_writers[] array for exclusion. This is a pretty heavyweight
> lock, but it only gets used at rw->ro transitions.
This idea looks good to me, but if you're going to a final version
please just inline fs_may_remount_ro into its only caller.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists