[Top] [All Lists]

Re: [PATCH 01/11] xfs: force the log before shutting down

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 01/11] xfs: force the log before shutting down
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Fri, 26 Sep 2014 03:37:24 -0700
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1411648461-29003-2-git-send-email-david@xxxxxxxxxxxxx>
References: <1411648461-29003-1-git-send-email-david@xxxxxxxxxxxxx> <1411648461-29003-2-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.23 (2014-03-12)
On Thu, Sep 25, 2014 at 10:34:11PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> When we have marked the filesystem for shutdown, we want to prevent
> any further buffer IO from being submitted. However, we currently
> force the log after marking the filesystem as shut down, hence
> allowing IO to the log *after* we have marked both the filesystem
> and the log as in an error state.
> Clean this up by forcing the log before we mark the filesytem with
> an error. This replaces the pure CIL flush that we currently have
> which works around this same issue (i.e the CIL can't be flushed
> once the shutdown flags are set) and hence enables us to clean up
> the logic substantially.
> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>

Looks good,

Reviewed-by: Christoph Hellwig <hch@xxxxxx>

A couple nitpicks:

> diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
> index b1131fe..a598955 100644
> --- a/fs/xfs/xfs_log.c
> +++ b/fs/xfs/xfs_log.c
> @@ -3924,13 +3924,14 @@ xfs_log_force_umount(

The top of the function comment speaks about the delaylog case,
given that this is the only option now it might be worth to clean
that up.

>       retval = 0;

This assignment can be removed now that the xlog_state_ioerror call
below is unconditional.

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