xfs
[Top] [All Lists]

Re: [PATCH] xfs: fix buffer flushing during unmount

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfs: fix buffer flushing during unmount
From: Alex Elder <aelder@xxxxxxx>
Date: Mon, 19 Sep 2011 12:33:20 -0500
Cc: <xfs@xxxxxxxxxxx>
In-reply-to: <20110914140826.GA25729@xxxxxxxxxxxxx>
References: <20110914140826.GA25729@xxxxxxxxxxxxx>
Reply-to: <aelder@xxxxxxx>
On Wed, 2011-09-14 at 10:08 -0400, Christoph Hellwig wrote:
> The code to flush buffers in the umount code is a bit iffy: we first flush
> all delwri buffers out, but then might be able to queue up a new one when
> logging the sb counts.  On a normal shutdown that one would get flushed
> out when doing the synchronous superblock write in xfs_unmountfs_writesb,
> but we skip that one if the filesystem has been shut down.
> 
> Fix this by moving the delwri list flushing until just before unmounting
> the log, and while we're at it also remove the superflous delwri list
> and buffer lru flusing for the rt and log device that can never have
> cached or delwri buffers.

What prevents blocks on a realtime device from being cached?

I haven't looked exhaustively, but it looks like the summary
and bitmap data are operated on without caching, but the
realtime data itself is treated no different from "normal"
data blocks.

Please correct me if I'm wrong about that.

I do agree about the log device not having delwri cached
buffers.  Still, it might be good to have this change
done in a different commit from the one that changes
the order of things in xfs_unmountfs().

                                        -Alex


> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> Reported-by: Amit Sahrawat <amit.sahrawat83@xxxxxxxxx>
> Tested-by: Amit Sahrawat <amit.sahrawat83@xxxxxxxxx>


<Prev in Thread] Current Thread [Next in Thread>