xfs
[Top] [All Lists]

Re: review: handle barriers being switched off dynamically.

To: David Chinner <dgc@xxxxxxx>
Subject: Re: review: handle barriers being switched off dynamically.
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 23 Apr 2007 22:23:36 +0100
Cc: xfs-dev <xfs-dev@xxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <20070419073714.GU48531920@melbourne.sgi.com>
References: <20070419073714.GU48531920@melbourne.sgi.com>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.2.2i
On Thu, Apr 19, 2007 at 05:37:14PM +1000, David Chinner wrote:
> 
> As pointed out by Neil Brown, MD can switch barriers off
> dynamically underneath a mounted filesystem. If this happens
> to XFS, it will shutdown the filesystem immediately.
> 
> Handle this more sanely by yelling into the syslog, retrying
> the I/O without barriers and if that is successful, turn
> off barriers.
> 
> Also remove an unnecessary check when first checking to
> see if the underlying device supports barriers.

Looks good to me (well, not really good, but as good as it can
be given the circumstances..)

> +     /*
> +      * We can get an EOPNOTSUPP to ordered writes.  Here we clear the
> +      * ordered flag and reissue them.  Because we can't tell the higher
> +      * layers directly that they should not issue ordered I/O anymore, they
> +      * need to check if the ordered flag was cleared during I/O completion.
> +      */
> +     if ((bp->b_error == EOPNOTSUPP) &&

no need for the additional braces here, though.


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