All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] btrfs: match device by dev_t
@ 2022-01-07 13:04 Anand Jain
  2022-01-07 13:04 ` [PATCH v3 1/4] btrfs: harden identification of the stale device Anand Jain
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Anand Jain @ 2022-01-07 13:04 UTC (permalink / raw)
  To: linux-btrfs; +Cc: josef, dsterba, nborisov, l

v3: Added patch 3/4 saves and uses dev_t in btrfs_device and
    thus patch 4/4 removes the function device_matched().
    fstests btrfs passed with no new regressions.

v2: Fix 
     sparse: warning: incorrect type in argument 1 (different address spaces)
     For using device->name->str

    Fix Josef suggestion to pass dev_t instead of device-path in the
     patch 2/2.

--- original cover letter -----
Patch 1 is the actual bug fix and should go to stable 5.4 as well.
On 5.4 patch1 conflicts (outside of the changes in the patch),
so not yet marked for the stable.

Patch 2 simplifies calling lookup_bdev() in the device_matched()
by moving the same to the parent function two levels up.

Patch 2 is not merged with 1 because to keep the patch 1 changes local
to a function so that it can be easily backported to 5.4 and 5.10.

We should save the dev_t in struct btrfs_device with that may be
we could clean up a few more things, including fixing the below sparse
warning.

  sparse: sparse: incorrect type in argument 1 (different address spaces)

For using without rcu:

  error = lookup_bdev(device->name->str, &dev_old); 


Anand Jain (4):
  btrfs: harden identification of the stale device
  btrfs: redeclare btrfs_stale_devices arg1 to dev_t
  btrfs: add device major-minor info in the struct btrfs_device
  btrfs: use dev_t to match device in device_matched

 fs/btrfs/dev-replace.c |  3 ++
 fs/btrfs/super.c       |  8 ++++-
 fs/btrfs/volumes.c     | 67 +++++++++++++++++-------------------------
 fs/btrfs/volumes.h     |  3 +-
 4 files changed, 39 insertions(+), 42 deletions(-)

-- 
2.33.1


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

end of thread, other threads:[~2022-01-10  6:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-07 13:04 [PATCH v3 0/4] btrfs: match device by dev_t Anand Jain
2022-01-07 13:04 ` [PATCH v3 1/4] btrfs: harden identification of the stale device Anand Jain
2022-01-07 16:06   ` David Sterba
2022-01-07 16:21     ` David Sterba
2022-01-10  6:57       ` Anand Jain
2022-01-07 13:04 ` [PATCH v3 2/4] btrfs: redeclare btrfs_stale_devices arg1 to dev_t Anand Jain
2022-01-07 16:16   ` David Sterba
2022-01-10  6:57     ` Anand Jain
2022-01-07 13:04 ` [PATCH v3 3/4] btrfs: add device major-minor info in the struct btrfs_device Anand Jain
2022-01-07 16:20   ` David Sterba
2022-01-10  6:58     ` Anand Jain
2022-01-07 13:04 ` [PATCH v3 4/4] btrfs: use dev_t to match device in device_matched Anand Jain

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.