]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: add device major-minor info in the struct btrfs_device
authorAnand Jain <anand.jain@oracle.com>
Wed, 12 Jan 2022 05:06:01 +0000 (13:06 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 14 Mar 2022 12:13:47 +0000 (13:13 +0100)
commit4889bc05a96e039b055bbd11438c40bf956f057b
tree161cbf1dca6d039fb8528da67d395e93adbd43ca
parent16cab91a0c8fea50a03ef9c49ca829e6c0c4cf66
btrfs: add device major-minor info in the struct btrfs_device

Internally it is common to use the major-minor number to identify a
device and, at a few locations in btrfs, we use the major-minor number
to match the device.

So when we identify a new btrfs device through device add or device
replace or device-scan/ready save the device's major-minor (dev_t) in the
struct btrfs_device so that we don't have to call lookup_bdev() again.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/dev-replace.c
fs/btrfs/volumes.c
fs/btrfs/volumes.h