Skip to content

Commit 602079a

Browse files
committed
Merge tag 'block-6.10-20240607' of git://git.kernel.dk/linux
Pull block fixes from Jens Axboe: - Fix for null_blk block size validation (Andreas) - NVMe pull request via Keith: - Use reserved tags for special fabrics operations (Chunguang) - Persistent Reservation status masking fix (Weiwen) * tag 'block-6.10-20240607' of git://git.kernel.dk/linux: null_blk: fix validation of block size nvme: fix nvme_pr_* status code parsing nvme-fabrics: use reserved tag for reg read/write command
2 parents e339158 + 27d0242 commit 602079a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

drivers/block/null_blk/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1824,8 +1824,8 @@ static int null_validate_conf(struct nullb_device *dev)
18241824
dev->queue_mode = NULL_Q_MQ;
18251825
}
18261826

1827-
dev->blocksize = round_down(dev->blocksize, 512);
1828-
dev->blocksize = clamp_t(unsigned int, dev->blocksize, 512, 4096);
1827+
if (blk_validate_block_size(dev->blocksize))
1828+
return -EINVAL;
18291829

18301830
if (dev->use_per_node_hctx) {
18311831
if (dev->submit_queues != nr_online_nodes)

drivers/nvme/host/fabrics.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ int nvmf_reg_read32(struct nvme_ctrl *ctrl, u32 off, u32 *val)
180180
cmd.prop_get.offset = cpu_to_le32(off);
181181

182182
ret = __nvme_submit_sync_cmd(ctrl->fabrics_q, &cmd, &res, NULL, 0,
183-
NVME_QID_ANY, 0);
183+
NVME_QID_ANY, NVME_SUBMIT_RESERVED);
184184

185185
if (ret >= 0)
186186
*val = le64_to_cpu(res.u64);
@@ -226,7 +226,7 @@ int nvmf_reg_read64(struct nvme_ctrl *ctrl, u32 off, u64 *val)
226226
cmd.prop_get.offset = cpu_to_le32(off);
227227

228228
ret = __nvme_submit_sync_cmd(ctrl->fabrics_q, &cmd, &res, NULL, 0,
229-
NVME_QID_ANY, 0);
229+
NVME_QID_ANY, NVME_SUBMIT_RESERVED);
230230

231231
if (ret >= 0)
232232
*val = le64_to_cpu(res.u64);
@@ -271,7 +271,7 @@ int nvmf_reg_write32(struct nvme_ctrl *ctrl, u32 off, u32 val)
271271
cmd.prop_set.value = cpu_to_le64(val);
272272

273273
ret = __nvme_submit_sync_cmd(ctrl->fabrics_q, &cmd, NULL, NULL, 0,
274-
NVME_QID_ANY, 0);
274+
NVME_QID_ANY, NVME_SUBMIT_RESERVED);
275275
if (unlikely(ret))
276276
dev_err(ctrl->device,
277277
"Property Set error: %d, offset %#x\n",

drivers/nvme/host/pr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static int nvme_sc_to_pr_err(int nvme_sc)
7777
if (nvme_is_path_error(nvme_sc))
7878
return PR_STS_PATH_FAILED;
7979

80-
switch (nvme_sc) {
80+
switch (nvme_sc & 0x7ff) {
8181
case NVME_SC_SUCCESS:
8282
return PR_STS_SUCCESS;
8383
case NVME_SC_RESERVATION_CONFLICT:

0 commit comments

Comments
 (0)