Skip to content

Commit 29206c6

Browse files
committed
Merge tag 'block-5.8-2020-07-05' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe: - NVMe fixes from Christoph: - Fix crash in multi-path disk add (Christoph) - Fix ignore of identify error (Sagi) - Fix a compiler complaint that a function should be static (Wei) * tag 'block-5.8-2020-07-05' of git://git.kernel.dk/linux-block: block: make function __bio_integrity_free() static nvme: fix a crash in nvme_mpath_add_disk nvme: fix identify error status silent ignore
2 parents 9fbe565 + 3197d48 commit 29206c6

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

block/bio-integrity.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ void blk_flush_integrity(void)
2424
flush_workqueue(kintegrityd_wq);
2525
}
2626

27-
void __bio_integrity_free(struct bio_set *bs, struct bio_integrity_payload *bip)
27+
static void __bio_integrity_free(struct bio_set *bs,
28+
struct bio_integrity_payload *bip)
2829
{
2930
if (bs && mempool_initialized(&bs->bio_integrity_pool)) {
3031
if (bip->bip_vec)

drivers/nvme/host/core.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,10 +1116,16 @@ static int nvme_identify_ns_descs(struct nvme_ctrl *ctrl, unsigned nsid,
11161116
dev_warn(ctrl->device,
11171117
"Identify Descriptors failed (%d)\n", status);
11181118
/*
1119-
* Don't treat an error as fatal, as we potentially already
1120-
* have a NGUID or EUI-64.
1119+
* Don't treat non-retryable errors as fatal, as we potentially
1120+
* already have a NGUID or EUI-64. If we failed with DNR set,
1121+
* we want to silently ignore the error as we can still
1122+
* identify the device, but if the status has DNR set, we want
1123+
* to propagate the error back specifically for the disk
1124+
* revalidation flow to make sure we don't abandon the
1125+
* device just because of a temporal retry-able error (such
1126+
* as path of transport errors).
11211127
*/
1122-
if (status > 0 && !(status & NVME_SC_DNR))
1128+
if (status > 0 && (status & NVME_SC_DNR))
11231129
status = 0;
11241130
goto free_data;
11251131
}

drivers/nvme/host/multipath.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -672,10 +672,11 @@ void nvme_mpath_add_disk(struct nvme_ns *ns, struct nvme_id_ns *id)
672672
}
673673

674674
if (bdi_cap_stable_pages_required(ns->queue->backing_dev_info)) {
675-
struct backing_dev_info *info =
676-
ns->head->disk->queue->backing_dev_info;
675+
struct gendisk *disk = ns->head->disk;
677676

678-
info->capabilities |= BDI_CAP_STABLE_WRITES;
677+
if (disk)
678+
disk->queue->backing_dev_info->capabilities |=
679+
BDI_CAP_STABLE_WRITES;
679680
}
680681
}
681682

0 commit comments

Comments
 (0)