summaryrefslogtreecommitdiff
path: root/ctree.h
diff options
context:
space:
mode:
authorMark Fasheh <mfasheh@suse.de>2016-07-04 14:57:38 +0200
committerDavid Sterba <dsterba@suse.com>2016-07-13 18:44:26 +0200
commita804254361a8cf04696ba3869a66c131ee6c3d4b (patch)
tree1f217e479b660e3ee0e52e0fb3ac8e3a27b76f26 /ctree.h
parent93dabf211d74daf6e3de642bdd887a90a00f7b49 (diff)
btrfs-progs: check: write corrected qgroup info to disk
Now that we can verify all qgroups, we can write the corrected qgroups out to disk when '--repair' is specified. The qgroup status item is also updated to clear any out-of-date state. The repair_ functions were modeled after the inode repair code in cmds-check.c. I also renamed the 'scan' member of qgroup_status_item to 'rescan' in order to keep consistency with the kernel. Testing this was easy, I just reproduced qgroup inconsistencies via the usual routes and had btrfsck fix them. Signed-off-by: Mark Fasheh <mfasheh@suse.de> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'ctree.h')
-rw-r--r--ctree.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/ctree.h b/ctree.h
index 9e3626f1..5cb5533a 100644
--- a/ctree.h
+++ b/ctree.h
@@ -898,7 +898,7 @@ struct btrfs_qgroup_status_item {
__le64 version;
__le64 generation;
__le64 flags;
- __le64 scan; /* progress during scanning */
+ __le64 rescan; /* progress during scanning */
} __attribute__ ((__packed__));
struct btrfs_block_group_item {
@@ -2125,8 +2125,8 @@ BTRFS_SETGET_FUNCS(qgroup_status_generation, struct btrfs_qgroup_status_item,
generation, 64);
BTRFS_SETGET_FUNCS(qgroup_status_flags, struct btrfs_qgroup_status_item,
flags, 64);
-BTRFS_SETGET_FUNCS(qgroup_status_scan, struct btrfs_qgroup_status_item,
- scan, 64);
+BTRFS_SETGET_FUNCS(qgroup_status_rescan, struct btrfs_qgroup_status_item,
+ rescan, 64);
BTRFS_SETGET_STACK_FUNCS(stack_qgroup_status_version,
struct btrfs_qgroup_status_item, version, 64);
@@ -2134,8 +2134,8 @@ BTRFS_SETGET_STACK_FUNCS(stack_qgroup_status_generation,
struct btrfs_qgroup_status_item, generation, 64);
BTRFS_SETGET_STACK_FUNCS(stack_qgroup_status_flags,
struct btrfs_qgroup_status_item, flags, 64);
-BTRFS_SETGET_STACK_FUNCS(stack_qgroup_status_scan,
- struct btrfs_qgroup_status_item, scan, 64);
+BTRFS_SETGET_STACK_FUNCS(stack_qgroup_status_rescan,
+ struct btrfs_qgroup_status_item, rescan, 64);
/* btrfs_qgroup_info_item */
BTRFS_SETGET_FUNCS(qgroup_info_generation, struct btrfs_qgroup_info_item,