linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/2] remove BUG_ON()s in btrfs_close_one_device()
@ 2019-11-26  8:40 Johannes Thumshirn
  2019-11-26  8:40 ` [PATCH v4 1/2] btrfs: decrement number of open devices after closing the device not before Johannes Thumshirn
  2019-11-26  8:40 ` [PATCH v4 2/2] btrfs: reset device back to allocation state when removing Johannes Thumshirn
  0 siblings, 2 replies; 8+ messages in thread
From: Johannes Thumshirn @ 2019-11-26  8:40 UTC (permalink / raw)
  To: David Sterba
  Cc: Nikolay Borisov, Qu Wenruo, Linux BTRFS Mailinglist, Johannes Thumshirn

This series attempts to remove the BUG_ON()s in btrfs_close_one_device().
Therefore some reorganization of btrfs_close_one_device() was needed, to
avoid the memory allocation.

This series has passed fstests without any deviation from the baseline.

Changes to v3:
- Clear BTRFS_DEV_STATE_WRITEABLE after calling btrfs_close_bdev() so
  btrfs_close_bdev() can call sync_blockdev() and invalidate_bdev() (Nikolay)

Changes to v2:
- Completly different approach to the origianl patchset, instead of handling
  eventual allocation failures.
- Dropped already merged patches for ' btrfs_fs_devices::rotating' and
  'btrfs_fs_devices::seeding'
- Kept the 1st patch of the old series, as it's a nice cleanup

Changes to v1:
- Fixed the decremt of btrfs_fs_devices::seeding.
- In addition to this, I've added two patches changing btrfs_fs_devices::seeding
  and btrfs_fs_devices::rotating to bool, as they are in fact used as booleans.

Johannes Thumshirn (2):
  btrfs: decrement number of open devices after closing the device not
    before
  btrfs: reset device back to allocation state when removing

 fs/btrfs/volumes.c | 41 ++++++++++++++++++-----------------------
 1 file changed, 18 insertions(+), 23 deletions(-)

-- 
2.16.4


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

end of thread, other threads:[~2019-11-28  9:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-26  8:40 [PATCH v4 0/2] remove BUG_ON()s in btrfs_close_one_device() Johannes Thumshirn
2019-11-26  8:40 ` [PATCH v4 1/2] btrfs: decrement number of open devices after closing the device not before Johannes Thumshirn
2019-11-26  8:40 ` [PATCH v4 2/2] btrfs: reset device back to allocation state when removing Johannes Thumshirn
2019-11-26 10:21   ` Nikolay Borisov
2019-11-26 17:17   ` David Sterba
2019-11-27 15:26     ` David Sterba
2019-11-27 17:07   ` David Sterba
2019-11-28  9:29     ` Johannes Thumshirn

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