Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xfs_copy: check for dirty log on non-duplicate copies
xfs_copy either copies the log as-is or formats the log of the target(s) based on whether duplicate copy mode is enabled. The target log is formatted when non-duplicate mode is enabled because copies gain a new fs UUID and the new UUID must be stamped into the log. When non-duplicate mode is enabled, however, xfs_copy does not check whether the source filesystem log is actually clean. If the source log is dirty, the target filesystem is silently created with a clean log and thus ends up in a potentially corrupted state. Update xfs_copy to check the source log state and fail the copy if in non-duplicate mode and the log is dirty. Encourage the user to mount the filesystem or run xfs_repair to clear the log. Note that the log is scanned unconditionally as opposed to only in non-duplicate mode because v5 superblock log format support requires the current cycle number to format the log correctly. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
- Loading branch information
Showing
3 changed files
with
36 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters