diff options
author | Li Xi <lixi@ddn.com> | 2019-09-08 16:15:35 +0800 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2021-01-25 15:17:36 -0500 |
commit | d4c0519725d59c9380acc828d24bc070c5bc2c03 (patch) | |
tree | 1c056f70c6187ea03a00d874d70e08300b5ec4b8 | |
parent | 057060ccabf9b5b47afe435d90a1f7f68c03a231 (diff) | |
download | e2fsprogs-d4c0519725d59c9380acc828d24bc070c5bc2c03.tar.gz |
e2fsck: merge fs flags when threads finish
merge fs flags properly.
Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r-- | e2fsck/pass1.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index 02153927e..b13208600 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -2245,6 +2245,7 @@ static int e2fsck_pass1_merge_fs(ext2_filsys dest, ext2_filsys src) ext2fs_block_bitmap block_map; ext2_badblocks_list badblocks; ext2_dblist dblist; + int flags; dest_io = dest->io; dest_image_io = dest->image_io; @@ -2252,6 +2253,7 @@ static int e2fsck_pass1_merge_fs(ext2_filsys dest, ext2_filsys src) block_map = dest->block_map; badblocks = dest->badblocks; dblist = dest->dblist; + flags = dest->flags; memcpy(dest, src, sizeof(struct struct_ext2_filsys)); dest->io = dest_io; @@ -2263,6 +2265,9 @@ static int e2fsck_pass1_merge_fs(ext2_filsys dest, ext2_filsys src) dest->dblist = dblist; if (dest->dblist) dest->dblist->fs = dest; + dest->flags = src->flags | flags; + if (!(src->flags & EXT2_FLAG_VALID) || !(flags & EXT2_FLAG_VALID)) + ext2fs_unmark_valid(dest); if (src->icache) { ext2fs_free_inode_cache(src->icache); |