This patch copies badblocks when the copying fs.
E2fsprogs-commit:
8095b716e15bb15a47925ae02cb1c06e91fdb651
Change-Id: Ibf5718ad5851a9ccd853a2a1f928bce447aa5de9
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>
return retval;
}
+ if (src->badblocks) {
+ retval = ext2fs_badblocks_copy(src->badblocks, &dest->badblocks);
+ if (retval)
+ return retval;
+ }
+
/* icache will be rebuilt if needed, so do not copy from @src */
src->icache = NULL;
return 0;
src->icache = NULL;
}
+ if (src->badblocks) {
+ retval = ext2fs_badblocks_copy(src->badblocks, &dest->badblocks);
+
+ ext2fs_badblocks_list_free(src->badblocks);
+ src->badblocks = NULL;
+ }
+
return retval;
}