Message ID | 20180126083519.28373-11-suy.fnst@cn.fujitsu.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 2018年01月26日 16:35, Su Yue wrote: > Original check forgets to clear bit I_ERR_FILE_EXTENT_DISCOUNT > in rec->errors after repair. > > So just do it. > > Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com> Reviewed-by: Qu Wenruo <wqu@suse.com> And a test case for this would help us to avoid further regression. Thanks, Qu > --- > cmds-check.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/cmds-check.c b/cmds-check.c > index ae0a9e146399..d8d9a3227c06 100644 > --- a/cmds-check.c > +++ b/cmds-check.c > @@ -3978,6 +3978,7 @@ static int repair_inode_discount_extent(struct btrfs_trans_handle *trans, > if (ret < 0) > goto out; > } > + rec->errors &= ~I_ERR_FILE_EXTENT_DISCOUNT; > printf("Fixed discount file extents for inode: %llu in root: %llu\n", > rec->ino, root->objectid); > out: >
diff --git a/cmds-check.c b/cmds-check.c index ae0a9e146399..d8d9a3227c06 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -3978,6 +3978,7 @@ static int repair_inode_discount_extent(struct btrfs_trans_handle *trans, if (ret < 0) goto out; } + rec->errors &= ~I_ERR_FILE_EXTENT_DISCOUNT; printf("Fixed discount file extents for inode: %llu in root: %llu\n", rec->ino, root->objectid); out:
Original check forgets to clear bit I_ERR_FILE_EXTENT_DISCOUNT in rec->errors after repair. So just do it. Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com> --- cmds-check.c | 1 + 1 file changed, 1 insertion(+)