xfs: force the log before shutting down
authorDave Chinner <dchinner@redhat.com>
Wed, 1 Oct 2014 23:02:28 +0000 (09:02 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 1 Oct 2014 23:02:28 +0000 (09:02 +1000)
commita870fe6dfaba1cc67424cde4cfd2cd3eee62bf35
tree251fac0a8479c93c91f4c687668948078483c856
parent52addcf9d6669fa439387610bc65c92fa0980cef
xfs: force the log before shutting down

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@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_log.c