public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] protect relocation with sb_start_write
@ 2022-03-28  6:29 Naohiro Aota
  2022-03-28  6:29 ` [PATCH v3 1/3] btrfs: mark resumed async balance as writing Naohiro Aota
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Naohiro Aota @ 2022-03-28  6:29 UTC (permalink / raw)
  To: linux-btrfs; +Cc: johannes.thumshirn, Naohiro Aota

This series is a follow-up to the series below. The old series added
an assertion to btrfs_relocate_chunk() to check if it is protected
with sb_start_write(). However, it revealed another location we need
to add sb_start_write() [1].

https://lore.kernel.org/linux-btrfs/cover.1645157220.git.naohiro.aota@wdc.com/T/

[1] https://lore.kernel.org/linux-btrfs/cover.1645157220.git.naohiro.aota@wdc.com/T/#e06eecc07ce1cd1e45bfd30a374bd2d15b4fd76d8

Patch 1 adds sb_{start,end}_write() to the resumed async balancing.

Patches 2 and 3 add an ASSERT to catch a future error.

--
v3:
  - Only add sb_write_started(), which we really use. (Dave Chinner)
  - Drop patch "btrfs: mark device addition as mnt_want_write_file" (Filipe Manana)
  - Narrow asserting region to btrfs_relocate_block_group() and check only
    when the BG is data BG. (Filipe Manana)
v2:
  - Use mnt_want_write_file() instead of sb_start_write() for
    btrfs_ioctl_add_dev()
  - Drop bogus fixes tag
  - Change the stable target to meaningful 4.9+

Naohiro Aota (3):
  btrfs: mark resumed async balance as writing
  fs: add check functions for sb_start_{write,pagefault,intwrite}
  btrfs: assert that relocation is protected with sb_start_write()

 fs/btrfs/relocation.c | 4 ++++
 fs/btrfs/volumes.c    | 2 ++
 include/linux/fs.h    | 5 +++++
 3 files changed, 11 insertions(+)

-- 
2.35.1


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

end of thread, other threads:[~2022-03-28 10:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-28  6:29 [PATCH v3 0/3] protect relocation with sb_start_write Naohiro Aota
2022-03-28  6:29 ` [PATCH v3 1/3] btrfs: mark resumed async balance as writing Naohiro Aota
2022-03-28  6:29 ` [PATCH v3 2/3] fs: add check functions for sb_start_{write,pagefault,intwrite} Naohiro Aota
2022-03-28 10:40   ` Filipe Manana
2022-03-28  6:29 ` [PATCH v3 3/3] btrfs: assert that relocation is protected with sb_start_write() Naohiro Aota
2022-03-28 10:49   ` Filipe Manana

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox