Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe:
"Final round of fixes for this merge window - some of this has come up
after the initial pull request, and some of it was put in a post-merge
branch before the merge window.
This contains:
- Fix for a bad check for an error on dma mapping in the mtip32xx
driver, from Alexey Khoroshilov.
- A set of fixes for lightnvm, from Javier, Matias, and Wenwei.
- An NVMe completion record corruption fix from Marta, ensuring that
we read things in the right order.
- Two writeback fixes from Tejun, marked for stable@ as well.
- A blk-mq sw queue iterator fix from Thomas, fixing an oops for
sparse CPU maps. They hit this in the hot plug/unplug rework"
* 'for-linus' of git://git.kernel.dk/linux-block:
nvme: avoid cqe corruption when update at the same time as read
writeback, cgroup: fix use of the wrong bdi_writeback which mismatches the inode
writeback, cgroup: fix premature wb_put() in locked_inode_to_wb_and_lock_list()
blk-mq: Use proper cpumask iterator
mtip32xx: fix checks for dma mapping errors
lightnvm: do not load L2P table if not supported
lightnvm: do not reserve lun on l2p loading
nvme: lightnvm: return ppa completion status
lightnvm: add a bitmap of luns
lightnvm: specify target's logical address area
null_blk: add lightnvm null_blk device to the nullb_list
This commit is contained in:
commit
1d02369dba
14 changed files with 251 additions and 78 deletions
|
|
@ -263,22 +263,8 @@ static inline void *blk_mq_rq_to_pdu(struct request *rq)
|
|||
for ((i) = 0; (i) < (q)->nr_hw_queues && \
|
||||
({ hctx = (q)->queue_hw_ctx[i]; 1; }); (i)++)
|
||||
|
||||
#define queue_for_each_ctx(q, ctx, i) \
|
||||
for ((i) = 0; (i) < (q)->nr_queues && \
|
||||
({ ctx = per_cpu_ptr((q)->queue_ctx, (i)); 1; }); (i)++)
|
||||
|
||||
#define hctx_for_each_ctx(hctx, ctx, i) \
|
||||
for ((i) = 0; (i) < (hctx)->nr_ctx && \
|
||||
({ ctx = (hctx)->ctxs[(i)]; 1; }); (i)++)
|
||||
|
||||
#define blk_ctx_sum(q, sum) \
|
||||
({ \
|
||||
struct blk_mq_ctx *__x; \
|
||||
unsigned int __ret = 0, __i; \
|
||||
\
|
||||
queue_for_each_ctx((q), __x, __i) \
|
||||
__ret += sum; \
|
||||
__ret; \
|
||||
})
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -242,6 +242,7 @@ struct nvm_rq {
|
|||
uint16_t nr_pages;
|
||||
uint16_t flags;
|
||||
|
||||
u64 ppa_status; /* ppa media status */
|
||||
int error;
|
||||
};
|
||||
|
||||
|
|
@ -346,6 +347,7 @@ struct nvm_dev {
|
|||
int nr_luns;
|
||||
unsigned max_pages_per_blk;
|
||||
|
||||
unsigned long *lun_map;
|
||||
void *ppalist_pool;
|
||||
|
||||
struct nvm_id identity;
|
||||
|
|
@ -355,6 +357,7 @@ struct nvm_dev {
|
|||
char name[DISK_NAME_LEN];
|
||||
|
||||
struct mutex mlock;
|
||||
spinlock_t lock;
|
||||
};
|
||||
|
||||
static inline struct ppa_addr generic_to_dev_addr(struct nvm_dev *dev,
|
||||
|
|
@ -465,8 +468,13 @@ typedef int (nvmm_submit_io_fn)(struct nvm_dev *, struct nvm_rq *);
|
|||
typedef int (nvmm_erase_blk_fn)(struct nvm_dev *, struct nvm_block *,
|
||||
unsigned long);
|
||||
typedef struct nvm_lun *(nvmm_get_lun_fn)(struct nvm_dev *, int);
|
||||
typedef int (nvmm_reserve_lun)(struct nvm_dev *, int);
|
||||
typedef void (nvmm_release_lun)(struct nvm_dev *, int);
|
||||
typedef void (nvmm_lun_info_print_fn)(struct nvm_dev *);
|
||||
|
||||
typedef int (nvmm_get_area_fn)(struct nvm_dev *, sector_t *, sector_t);
|
||||
typedef void (nvmm_put_area_fn)(struct nvm_dev *, sector_t);
|
||||
|
||||
struct nvmm_type {
|
||||
const char *name;
|
||||
unsigned int version[3];
|
||||
|
|
@ -488,9 +496,15 @@ struct nvmm_type {
|
|||
|
||||
/* Configuration management */
|
||||
nvmm_get_lun_fn *get_lun;
|
||||
nvmm_reserve_lun *reserve_lun;
|
||||
nvmm_release_lun *release_lun;
|
||||
|
||||
/* Statistics */
|
||||
nvmm_lun_info_print_fn *lun_info_print;
|
||||
|
||||
nvmm_get_area_fn *get_area;
|
||||
nvmm_put_area_fn *put_area;
|
||||
|
||||
struct list_head list;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue