linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] btrfs-progs: Fix qgroup false alerts on uninitialized rescan
@ 2018-07-26  6:38 Qu Wenruo
  2018-07-26  6:39 ` [PATCH 1/2] btrfs-progs: qgroup-verify: Don't treat qgroup difference as error if the fs hasn't initialized a rescan Qu Wenruo
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Qu Wenruo @ 2018-07-26  6:38 UTC (permalink / raw)
  To: linux-btrfs

This patches can be fetched from github:
https://github.com/adam900710/btrfs-progs/tree/qgroup_report

It's possible that certain timed power loss could lead to initialized quota
tree without rescan kicked in.
Can be reproduced in btrfs/166 with low possibility.

In that case, since default flags for QUOTA_STATUS is ON|INCONSISTENT,
btrfs check will still check qgroups and report difference as error.

However rescan progress of QUOTA_STATUS is still 0, means qgroup rescan
hasn't been kicked in, and all quota numbers are 0, difference is
expected.

In this case, make btrfs check don't report such uninitialized rescan as
error.

Qu Wenruo (2):
  btrfs-progs: qgroup-verify: Don't treat qgroup difference as error if
    the fs hasn't initialized a rescan
  btrfs-progs: fsck-tests: Add test image to check if btrfs check
    reports uninitialized rescan as error

 qgroup-verify.c                                 |  14 +++++++++++++-
 .../no_rescan_kicked_in.img                     | Bin 0 -> 3072 bytes
 .../fsck-tests/035-rescan-not-kicked-in/test.sh |  16 ++++++++++++++++
 3 files changed, 29 insertions(+), 1 deletion(-)
 create mode 100644 tests/fsck-tests/035-rescan-not-kicked-in/no_rescan_kicked_in.img
 create mode 100755 tests/fsck-tests/035-rescan-not-kicked-in/test.sh

-- 
2.18.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-08-03 16:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-26  6:38 [PATCH 0/2] btrfs-progs: Fix qgroup false alerts on uninitialized rescan Qu Wenruo
2018-07-26  6:39 ` [PATCH 1/2] btrfs-progs: qgroup-verify: Don't treat qgroup difference as error if the fs hasn't initialized a rescan Qu Wenruo
2018-07-26  6:39 ` [PATCH 2/2] btrfs-progs: fsck-tests: Add test image to check if btrfs check reports uninitialized rescan as error Qu Wenruo
2018-08-03 14:58 ` [PATCH 0/2] btrfs-progs: Fix qgroup false alerts on uninitialized rescan David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).