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.
|