Message ID | 20181218104646.29599-8-wqu@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs-progs: check: Fix | expand |
diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c index c6255334fc07..3cb3d4634e29 100644 --- a/check/mode-lowmem.c +++ b/check/mode-lowmem.c @@ -3036,6 +3036,7 @@ out: } /* + * If @err contains BYTES_UNALIGNED then delete the extent data item. * If @err contains BACKREF_MISSING then add extent of the * file_extent_data_item. * @@ -3087,6 +3088,13 @@ static int repair_extent_data_item(struct btrfs_root *root, else parent = 0; + if (err & BYTES_UNALIGNED) { + ret = delete_item(root, pathp); + if (!ret) + err = 0; + goto out; + } + /* now repair only adds backref */ if ((err & BACKREF_MISSING) == 0) return err;