From 77328e7180bd8afaa33a59204039c4c0282b93f25d633c5764c45e0888bd2e7f Mon Sep 17 00:00:00 2001 From: Mark Fasheh Date: Wed, 9 Jul 2014 18:40:57 +0000 Subject: [PATCH] Accepting request 240115 from home:mfasheh:branches:filesystems - refresh references on the following patches: * 0200-btrfs-progs-print-qgroup-excl-as-unsigned.patch * 0201-btrfs-progs-import-ulist.patch * 0202-btrfs-progs-add-quota-group-verify-code.patch * 0203-btrfs-progs-show-extent-state-for-a-subvolume.patch - btrfs-progs: ignore orphaned qgroups by default - Added patch: * 0204-btrfs-progs-ignore-orphaned-qgroups-by-default.patch OBS-URL: https://build.opensuse.org/request/show/240115 OBS-URL: https://build.opensuse.org/package/show/filesystems/btrfsprogs?expand=0&rev=165 --- ...-progs-print-qgroup-excl-as-unsigned.patch | 2 +- 0201-btrfs-progs-import-ulist.patch | 2 +- ...fs-progs-add-quota-group-verify-code.patch | 2 +- ...gs-show-extent-state-for-a-subvolume.patch | 2 +- ...s-ignore-orphaned-qgroups-by-default.patch | 68 +++++++++++++++++++ btrfsprogs.changes | 12 ++++ btrfsprogs.spec | 2 + 7 files changed, 86 insertions(+), 4 deletions(-) create mode 100644 0204-btrfs-progs-ignore-orphaned-qgroups-by-default.patch diff --git a/0200-btrfs-progs-print-qgroup-excl-as-unsigned.patch b/0200-btrfs-progs-print-qgroup-excl-as-unsigned.patch index 3d2c559..d59768d 100644 --- a/0200-btrfs-progs-print-qgroup-excl-as-unsigned.patch +++ b/0200-btrfs-progs-print-qgroup-excl-as-unsigned.patch @@ -2,7 +2,7 @@ From 8b40b00f23806115c9f03344227b6590cb187a96 Mon Sep 17 00:00:00 2001 From: Mark Fasheh Date: Thu, 1 May 2014 22:35:15 -0700 Subject: [PATCH 1/3] btrfs-progs: print qgroup excl as unsigned -References: bnc#865621 +References: bnc#886493 bnc#865621 Upstream: submitted It's unsigned in the structure definition. diff --git a/0201-btrfs-progs-import-ulist.patch b/0201-btrfs-progs-import-ulist.patch index b52f9a2..29f96f0 100644 --- a/0201-btrfs-progs-import-ulist.patch +++ b/0201-btrfs-progs-import-ulist.patch @@ -2,7 +2,7 @@ From e1857c491c61040cd845b5e08f1d996d3e3557a8 Mon Sep 17 00:00:00 2001 From: Mark Fasheh Date: Thu, 1 May 2014 14:34:30 -0700 Subject: [PATCH 2/3] btrfs-progs: import ulist -References: bnc#865621 +References: bnc#886493 bnc#865621 Upstream: submitted qgroup-verify.c wants this for walking root refs. diff --git a/0202-btrfs-progs-add-quota-group-verify-code.patch b/0202-btrfs-progs-add-quota-group-verify-code.patch index 08cc35c..da37b58 100644 --- a/0202-btrfs-progs-add-quota-group-verify-code.patch +++ b/0202-btrfs-progs-add-quota-group-verify-code.patch @@ -2,7 +2,7 @@ From c8c1814a8b10fab0fae7a32ef239ec8847a0ca81 Mon Sep 17 00:00:00 2001 From: Mark Fasheh Date: Thu, 1 May 2014 22:44:24 -0700 Subject: [PATCH 3/3] btrfs-progs: add quota group verify code -References: bnc#865621 +References: bnc#886493 bnc#865621 Upstream: submitted This patch adds functionality (in qgroup-verify.c) to compute bytecounts in diff --git a/0203-btrfs-progs-show-extent-state-for-a-subvolume.patch b/0203-btrfs-progs-show-extent-state-for-a-subvolume.patch index 54e5bbc..6071ebe 100644 --- a/0203-btrfs-progs-show-extent-state-for-a-subvolume.patch +++ b/0203-btrfs-progs-show-extent-state-for-a-subvolume.patch @@ -2,7 +2,7 @@ From 23356b0034431d5e809b370ee02375b25cd9ced8 Mon Sep 17 00:00:00 2001 From: Mark Fasheh Date: Sat, 31 May 2014 22:05:36 -0700 Subject: [PATCH] btrfs-progs: show extent state for a subvolume -References: bnc#865621 +References: bnc#886493 bnc#865621 Upstream: submitted The qgroup verification code can trivially be extended to provide diff --git a/0204-btrfs-progs-ignore-orphaned-qgroups-by-default.patch b/0204-btrfs-progs-ignore-orphaned-qgroups-by-default.patch new file mode 100644 index 0000000..bc94959 --- /dev/null +++ b/0204-btrfs-progs-ignore-orphaned-qgroups-by-default.patch @@ -0,0 +1,68 @@ +From 049554016bb8007c39cebc9d855fea5e600a11a0 Mon Sep 17 00:00:00 2001 +From: Mark Fasheh +Date: Tue, 8 Jul 2014 13:34:18 -0700 +Subject: btrfs-progs: ignore orphaned qgroups by default +References: bnc#886493 bnc#865621 +Upstream: submitted + +qgroup items are not deleted by btrfs when the underlying subvolume goes +away. As a result, btrfsck will print those as inconsistent. This can +clutter up the printout so we ignore them by default. They are still printed +if a full report (via --qgroup-report) is requested. + +Signed-off-by: Mark Fasheh +--- + qgroup-verify.c | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/qgroup-verify.c b/qgroup-verify.c +index 81a1651..2e1716d 100644 +--- a/qgroup-verify.c ++++ b/qgroup-verify.c +@@ -38,6 +38,7 @@ static void add_bytes(u64 root_objectid, u64 num_bytes, int exclusive); + + struct qgroup_count { + u64 qgroupid; ++ int subvol_exists; + + struct btrfs_disk_key key; + struct btrfs_qgroup_info_item diskinfo; +@@ -697,8 +698,10 @@ static int load_quota_info(struct btrfs_fs_info *info) + { + int ret; + struct btrfs_root *root = info->quota_root; ++ struct btrfs_root *tmproot; + struct btrfs_path path; + struct btrfs_key key; ++ struct btrfs_key root_key; + struct btrfs_disk_key disk_key; + struct extent_buffer *leaf; + struct btrfs_qgroup_info_item *item; +@@ -745,6 +748,15 @@ static int load_quota_info(struct btrfs_fs_info *info) + fprintf(stderr, "ERROR: out of memory\n"); + goto out; + } ++ ++ root_key.objectid = key.offset; ++ root_key.type = BTRFS_ROOT_ITEM_KEY; ++ root_key.offset = (u64)-1; ++ tmproot = btrfs_read_fs_root_no_cache(info, &root_key); ++ if (tmproot && !IS_ERR(tmproot)) { ++ count->subvol_exists = 1; ++ free(tmproot); ++ } + } + + ret = btrfs_next_leaf(root, &path); +@@ -1008,7 +1020,7 @@ static void print_qgroup_difference(struct qgroup_count *count, int verbose) + + is_different = excl_diff || ref_diff; + +- if (verbose || is_different) { ++ if (verbose || (is_different && count->subvol_exists)) { + printf("Counts for qgroup id: %llu %s\n", + (unsigned long long)count->qgroupid, + is_different ? "are different" : ""); +-- +1.8.4.5 + diff --git a/btrfsprogs.changes b/btrfsprogs.changes index 6d85fd8..6d36e69 100644 --- a/btrfsprogs.changes +++ b/btrfsprogs.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Wed Jul 9 18:08:37 UTC 2014 - mfasheh@suse.com + +- refresh references on the following patches: + * 0200-btrfs-progs-print-qgroup-excl-as-unsigned.patch + * 0201-btrfs-progs-import-ulist.patch + * 0202-btrfs-progs-add-quota-group-verify-code.patch + * 0203-btrfs-progs-show-extent-state-for-a-subvolume.patch +- btrfs-progs: ignore orphaned qgroups by default +- Added patch: + * 0204-btrfs-progs-ignore-orphaned-qgroups-by-default.patch + ------------------------------------------------------------------- Mon Jul 7 23:04:51 UTC 2014 - mfasheh@suse.com diff --git a/btrfsprogs.spec b/btrfsprogs.spec index 298dc59..5ee9ab4 100644 --- a/btrfsprogs.spec +++ b/btrfsprogs.spec @@ -69,6 +69,7 @@ Patch200: 0200-btrfs-progs-print-qgroup-excl-as-unsigned.patch Patch201: 0201-btrfs-progs-import-ulist.patch Patch202: 0202-btrfs-progs-add-quota-group-verify-code.patch Patch203: 0203-btrfs-progs-show-extent-state-for-a-subvolume.patch +Patch204: 0204-btrfs-progs-ignore-orphaned-qgroups-by-default.patch Patch1000: local-version-override.patch BuildRequires: asciidoc @@ -143,6 +144,7 @@ build applications to interface with btrfs. %patch201 -p1 %patch202 -p1 %patch203 -p1 +%patch204 -p1 %patch1000 -p1 %build