[PATCH 11/15] btrfs-progs: check: modify indoe_rec and backref after repair

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



repair_inode_backrefs() forgets to modify backrefs and inode records
after repair them.

Signed-off-by: Su Yue <suy.fnst@xxxxxxxxxxxxxx>
---
 cmds-check.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/cmds-check.c b/cmds-check.c
index d8d9a3227c06..b23a4493b12b 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -3192,6 +3192,7 @@ static int repair_inode_backrefs(struct btrfs_root *root,
 				ret = create_inode_item(root, rec, 1);
 				if (ret)
 					break;
+				rec->found_inode_item = 1;
 				repaired++;
 			}
 		}
@@ -3268,6 +3269,8 @@ static int repair_inode_backrefs(struct btrfs_root *root,
 						    backref->index);
 			BUG_ON(ret);
 			btrfs_commit_transaction(trans, root);
+			backref->found_dir_index = 1;
+			backref->found_dir_item = 1;
 			repaired++;
 		}
 
@@ -3279,6 +3282,7 @@ static int repair_inode_backrefs(struct btrfs_root *root,
 			ret = create_inode_item(root, rec, 0);
 			if (ret)
 				break;
+			rec->found_inode_item = 1;
 			repaired++;
 		}
 
-- 
2.16.1



--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux