Merge tag 'for-5.9/drivers-20200803' of git://git.kernel.dk/linux-block
Pull block driver updates from Jens Axboe:
- NVMe:
- ZNS support (Aravind, Keith, Matias, Niklas)
- Misc cleanups, optimizations, fixes (Baolin, Chaitanya, David,
Dongli, Max, Sagi)
- null_blk zone capacity support (Aravind)
- MD:
- raid5/6 fixes (ChangSyun)
- Warning fixes (Damien)
- raid5 stripe fixes (Guoqing, Song, Yufen)
- sysfs deadlock fix (Junxiao)
- raid10 deadlock fix (Vitaly)
- struct_size conversions (Gustavo)
- Set of bcache updates/fixes (Coly)
* tag 'for-5.9/drivers-20200803' of git://git.kernel.dk/linux-block: (117 commits)
md/raid5: Allow degraded raid6 to do rmw
md/raid5: Fix Force reconstruct-write io stuck in degraded raid5
raid5: don't duplicate code for different paths in handle_stripe
raid5-cache: hold spinlock instead of mutex in r5c_journal_mode_show
md: print errno in super_written
md/raid5: remove the redundant setting of STRIPE_HANDLE
md: register new md sysfs file 'uuid' read-only
md: fix max sectors calculation for super 1.0
nvme-loop: remove extra variable in create ctrl
nvme-loop: set ctrl state connecting after init
nvme-multipath: do not fall back to __nvme_find_path() for non-optimized paths
nvme-multipath: fix logic for non-optimized paths
nvme-rdma: fix controller reset hang during traffic
nvme-tcp: fix controller reset hang during traffic
nvmet: introduce the passthru Kconfig option
nvmet: introduce the passthru configfs interface
nvmet: Add passthru enable/disable helpers
nvmet: add passthru code to process commands
nvme: export nvme_find_get_ns() and nvme_put_ns()
nvme: introduce nvme_ctrl_get_by_path()
...
This commit is contained in:
+27
-11
@@ -141,11 +141,13 @@ static inline struct bkey *bkey_idx(const struct bkey *k, unsigned int nr_keys)
|
||||
* Version 3: Cache device with new UUID format
|
||||
* Version 4: Backing device with data offset
|
||||
*/
|
||||
#define BCACHE_SB_VERSION_CDEV 0
|
||||
#define BCACHE_SB_VERSION_BDEV 1
|
||||
#define BCACHE_SB_VERSION_CDEV_WITH_UUID 3
|
||||
#define BCACHE_SB_VERSION_BDEV_WITH_OFFSET 4
|
||||
#define BCACHE_SB_MAX_VERSION 4
|
||||
#define BCACHE_SB_VERSION_CDEV 0
|
||||
#define BCACHE_SB_VERSION_BDEV 1
|
||||
#define BCACHE_SB_VERSION_CDEV_WITH_UUID 3
|
||||
#define BCACHE_SB_VERSION_BDEV_WITH_OFFSET 4
|
||||
#define BCACHE_SB_VERSION_CDEV_WITH_FEATURES 5
|
||||
#define BCACHE_SB_VERSION_BDEV_WITH_FEATURES 6
|
||||
#define BCACHE_SB_MAX_VERSION 6
|
||||
|
||||
#define SB_SECTOR 8
|
||||
#define SB_OFFSET (SB_SECTOR << SECTOR_SHIFT)
|
||||
@@ -173,7 +175,12 @@ struct cache_sb_disk {
|
||||
|
||||
__le64 flags;
|
||||
__le64 seq;
|
||||
__le64 pad[8];
|
||||
|
||||
__le64 feature_compat;
|
||||
__le64 feature_incompat;
|
||||
__le64 feature_ro_compat;
|
||||
|
||||
__le64 pad[5];
|
||||
|
||||
union {
|
||||
struct {
|
||||
@@ -206,10 +213,16 @@ struct cache_sb_disk {
|
||||
__le16 keys;
|
||||
};
|
||||
__le64 d[SB_JOURNAL_BUCKETS]; /* journal buckets */
|
||||
__le16 bucket_size_hi;
|
||||
};
|
||||
|
||||
/*
|
||||
* This is for in-memory bcache super block.
|
||||
* NOTE: cache_sb is NOT exactly mapping to cache_sb_disk, the member
|
||||
* size, ordering and even whole struct size may be different
|
||||
* from cache_sb_disk.
|
||||
*/
|
||||
struct cache_sb {
|
||||
__u64 csum;
|
||||
__u64 offset; /* sector where this sb was written */
|
||||
__u64 version;
|
||||
|
||||
@@ -224,7 +237,10 @@ struct cache_sb {
|
||||
|
||||
__u64 flags;
|
||||
__u64 seq;
|
||||
__u64 pad[8];
|
||||
|
||||
__u64 feature_compat;
|
||||
__u64 feature_incompat;
|
||||
__u64 feature_ro_compat;
|
||||
|
||||
union {
|
||||
struct {
|
||||
@@ -232,10 +248,9 @@ struct cache_sb {
|
||||
__u64 nbuckets; /* device size */
|
||||
|
||||
__u16 block_size; /* sectors */
|
||||
__u16 bucket_size; /* sectors */
|
||||
|
||||
__u16 nr_in_set;
|
||||
__u16 nr_this_dev;
|
||||
__u32 bucket_size; /* sectors */
|
||||
};
|
||||
struct {
|
||||
/* Backing devices */
|
||||
@@ -262,7 +277,8 @@ struct cache_sb {
|
||||
static inline _Bool SB_IS_BDEV(const struct cache_sb *sb)
|
||||
{
|
||||
return sb->version == BCACHE_SB_VERSION_BDEV
|
||||
|| sb->version == BCACHE_SB_VERSION_BDEV_WITH_OFFSET;
|
||||
|| sb->version == BCACHE_SB_VERSION_BDEV_WITH_OFFSET
|
||||
|| sb->version == BCACHE_SB_VERSION_BDEV_WITH_FEATURES;
|
||||
}
|
||||
|
||||
BITMASK(CACHE_SYNC, struct cache_sb, flags, 0, 1);
|
||||
|
||||
@@ -73,6 +73,15 @@ enum blk_zone_cond {
|
||||
BLK_ZONE_COND_OFFLINE = 0xF,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum blk_zone_report_flags - Feature flags of reported zone descriptors.
|
||||
*
|
||||
* @BLK_ZONE_REP_CAPACITY: Zone descriptor has capacity field.
|
||||
*/
|
||||
enum blk_zone_report_flags {
|
||||
BLK_ZONE_REP_CAPACITY = (1 << 0),
|
||||
};
|
||||
|
||||
/**
|
||||
* struct blk_zone - Zone descriptor for BLKREPORTZONE ioctl.
|
||||
*
|
||||
@@ -99,7 +108,9 @@ struct blk_zone {
|
||||
__u8 cond; /* Zone condition */
|
||||
__u8 non_seq; /* Non-sequential write resources active */
|
||||
__u8 reset; /* Reset write pointer recommended */
|
||||
__u8 reserved[36];
|
||||
__u8 resv[4];
|
||||
__u64 capacity; /* Zone capacity in number of sectors */
|
||||
__u8 reserved[24];
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -115,7 +126,7 @@ struct blk_zone {
|
||||
struct blk_zone_report {
|
||||
__u64 sector;
|
||||
__u32 nr_zones;
|
||||
__u8 reserved[4];
|
||||
__u32 flags;
|
||||
struct blk_zone zones[0];
|
||||
};
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ typedef struct mdp_device_descriptor_s {
|
||||
|
||||
/*
|
||||
* Notes:
|
||||
* - if an array is being reshaped (restriped) in order to change the
|
||||
* - if an array is being reshaped (restriped) in order to change
|
||||
* the number of active devices in the array, 'raid_disks' will be
|
||||
* the larger of the old and new numbers. 'delta_disks' will
|
||||
* be the "new - old". So if +ve, raid_disks is the new value, and
|
||||
|
||||
Reference in New Issue
Block a user