linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Qgroup fix for dirty hack routines
@ 2016-08-05  2:29 Qu Wenruo
  2016-08-05  2:29 ` [PATCH v2 1/3] btrfs: qgroup: Refactor btrfs_qgroup_insert_dirty_extent() Qu Wenruo
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Qu Wenruo @ 2016-08-05  2:29 UTC (permalink / raw)
  To: linux-btrfs

This patchset introduce 2 fixes for data extent owner hacks.

One can be triggered by balance, another one can be trigged by log replay
after power loss.

Root cause are all similar: EXTENT_DATA owner is changed by dirty
hacks, from swapping tree blocks containing EXTENT_DATA to manually
update extent backref without using inc/dec_extent_ref.

The first patch introduces needed functions, then 2 fixes.

The reproducer are all merged into xfstests, btrfs/123 and btrfs/119.

3rd patch stay untouched while 2nd patch get update thanks for the report
from Goldwyn.

Changelog:
v2:
  Update 2nd patch to handle cases where the whole subtree, not only
  level 2 nodes get updated.

Qu Wenruo (3):
  btrfs: qgroup: Refactor btrfs_qgroup_insert_dirty_extent()
  btrfs: relocation: Fix leaking qgroups numbers on data extents
  btrfs: qgroup: Fix qgroup incorrectness caused by log replay

 fs/btrfs/delayed-ref.c |   5 +--
 fs/btrfs/extent-tree.c |  36 +++-------------
 fs/btrfs/qgroup.c      |  39 ++++++++++++++---
 fs/btrfs/qgroup.h      |  44 +++++++++++++++++--
 fs/btrfs/relocation.c  | 114 ++++++++++++++++++++++++++++++++++++++++++++++---
 fs/btrfs/tree-log.c    |  16 +++++++
 6 files changed, 205 insertions(+), 49 deletions(-)

-- 
2.9.2




^ permalink raw reply	[flat|nested] 14+ messages in thread
* [PATCH v2 0/3] Qgroup fix for dirty hack routines
@ 2016-08-09  8:30 Qu Wenruo
  0 siblings, 0 replies; 14+ messages in thread
From: Qu Wenruo @ 2016-08-09  8:30 UTC (permalink / raw)
  To: linux-btrfs

This patchset introduce 2 fixes for data extent owner hacks.

One can be triggered by balance, another one can be trigged by log replay
after power loss.

Root cause are all similar: EXTENT_DATA owner is changed by dirty
hacks, from swapping tree blocks containing EXTENT_DATA to manually
update extent backref without using inc/dec_extent_ref.

The first patch introduces needed functions, then 2 fixes.

The reproducer are all merged into xfstests, btrfs/123 and btrfs/119.

3rd patch stay untouched while 2nd patch get update thanks for the report
from Goldwyn.

Changelog:
v2:
  Update 2nd patch to handle cases where the whole subtree, not only
  level 2 nodes get updated.
v3:
  Function name update. Thanks Goldwyn.
  Rename 'btrfs_qgroup_insert_dirty_extent()' to
  'btrfs_qgroup_insert_dirty_extent_nolock()'
  Rename 'btrfs_qgroup_record_dirty_extent()' to
  'btrfs_qgroup_insert_dirty_extent()'


Qu Wenruo (3):
  btrfs: qgroup: Refactor btrfs_qgroup_insert_dirty_extent()
  btrfs: relocation: Fix leaking qgroups numbers on data extents
  btrfs: qgroup: Fix qgroup incorrectness caused by log replay

 fs/btrfs/delayed-ref.c |   7 +--
 fs/btrfs/extent-tree.c |  37 +++-------------
 fs/btrfs/qgroup.c      |  41 +++++++++++++++---
 fs/btrfs/qgroup.h      |  33 ++++++++++++--
 fs/btrfs/relocation.c  | 114 ++++++++++++++++++++++++++++++++++++++++++++++---
 fs/btrfs/tree-log.c    |  16 +++++++
 6 files changed, 195 insertions(+), 53 deletions(-)

-- 
2.9.2




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

end of thread, other threads:[~2016-08-09  8:30 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-05  2:29 [PATCH v2 0/3] Qgroup fix for dirty hack routines Qu Wenruo
2016-08-05  2:29 ` [PATCH v2 1/3] btrfs: qgroup: Refactor btrfs_qgroup_insert_dirty_extent() Qu Wenruo
2016-08-06 17:19   ` Goldwyn Rodrigues
2016-08-08  0:39     ` Qu Wenruo
2016-08-08  2:54       ` Goldwyn Rodrigues
2016-08-09  0:26         ` Qu Wenruo
2016-08-09  1:01           ` Goldwyn Rodrigues
2016-08-09  1:12             ` Qu Wenruo
2016-08-09  2:24               ` Goldwyn Rodrigues
2016-08-09  3:25                 ` Qu Wenruo
2016-08-06 17:21   ` Goldwyn Rodrigues
2016-08-05  2:29 ` [PATCH v2 2/3] btrfs: relocation: Fix leaking qgroups numbers on data extents Qu Wenruo
2016-08-05  2:29 ` [PATCH v2 3/3] btrfs: qgroup: Fix qgroup incorrectness caused by log replay Qu Wenruo
  -- strict thread matches above, loose matches on Subject: below --
2016-08-09  8:30 [PATCH v2 0/3] Qgroup fix for dirty hack routines Qu Wenruo

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).