Skip to content

Josef Bacik linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest7 patches 29 repliesIn review

Changes in v2 from the cover letter

- Rework the first patch as it was wrong because we need it for seed devices.
- Fix another lockdep splat I uncovered while testing against seed devices to make sure I hadn't broken anything.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7btrfs: do not call close_fs_devices in btrfs_rm_devicefs/btrfs/volumes.c+9 -11 reply
2/7btrfs: do not take the uuid_mutex in btrfs_rm_devicefs/btrfs/volumes.c+0 -517 replies
3/7btrfs: do not read super look for a device pathfs/btrfs/volumes.c+23 -383 replies
4/7btrfs: update the bdev time directly when closingfs/btrfs/volumes.c+10 -82 replies
5/7btrfs: delay blkdev_put until after the device removefs/btrfs/ioctl.c fs/btrfs/volumes.c fs/btrfs/volumes.h+31 -82 replies
6/7btrfs: unify common code for the v1 and v2 versions of device removefs/btrfs/ioctl.c+38 -612 replies
7/7btrfs: do not take the device_list_mutex in clone_fs_devicesfs/btrfs/volumes.c+2 -33 replies

Reviews trailers per patch

6 of 7 patches have a Reviewed-by or Acked-by.

PatchAnand JainNikolay Borisov
1/7R-b
2/7R-b
3/7
4/7R-b
5/7R-b
6/7R-b R-b
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/7]

v1->v2:
- Rework the first patch as it was wrong because we need it for seed devices.
- Fix another lockdep splat I uncovered while testing against seed devices to make sure I hadn't broken anything.

--- Original email ---

Hello,

The commit 87579e9b7d8d ("loop: use worker per cgroup instead of kworker") enabled the use of workqueues for loopback devices, which brought with it lockdep annotations for the workqueues for loopback devices. This uncovered a cascade of lockdep warnings because of how we mess with the block_device while under the sb writers lock while doing the device removal.

The first patch seems innocuous but we have a lockdep_assert_held(&uuid_mutex) in one of the helpers, which is why I have it first. The code should never be called which is why it is removed, but I'm removing it specifically to remove confusion about the role of the uuid_mutex here.

The next 4 patches are to resolve the lockdep messages as they occur. There are several issues and I address them one at a time until we're no longer getting lockdep warnings.

The final patch doesn't necessarily have to go in right away, it's just a cleanup as I noticed we have a lot of duplicated code between the v1 and v2 device removal handling. Thanks,

Josef

Josef Bacik (7):
btrfs: do not call close_fs_devices in btrfs_rm_device
btrfs: do not take the uuid_mutex in btrfs_rm_device
btrfs: do not read super look for a device path
btrfs: update the bdev time directly when closing
btrfs: delay blkdev_put until after the device remove
btrfs: unify common code for the v1 and v2 versions of device remove
btrfs: do not take the device_list_mutex in clone_fs_devices

 fs/btrfs/ioctl.c   |  92 +++++++++++++++--------------------
 fs/btrfs/volumes.c | 118 ++++++++++++++++++++++-----------------------
 fs/btrfs/volumes.h |   3 +-
 3 files changed, 101 insertions(+), 112 deletions(-)
Signature · 1 line
2.26.3