Skip to content

Commit

Permalink
Merge tag 'block-5.8-2020-07-05' of git://git.kernel.dk/linux-block
Browse files Browse the repository at this point in the history
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
  • Loading branch information
torvalds committed Jul 5, 2020
2 parents 9fbe565 + 3197d48 commit 29206c6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
3 changes: 2 additions & 1 deletion block/bio-integrity.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ void blk_flush_integrity(void)
flush_workqueue(kintegrityd_wq);
}

void __bio_integrity_free(struct bio_set *bs, struct bio_integrity_payload *bip)
static void __bio_integrity_free(struct bio_set *bs,
struct bio_integrity_payload *bip)
{
if (bs && mempool_initialized(&bs->bio_integrity_pool)) {
if (bip->bip_vec)
Expand Down
12 changes: 9 additions & 3 deletions drivers/nvme/host/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1116,10 +1116,16 @@ static int nvme_identify_ns_descs(struct nvme_ctrl *ctrl, unsigned nsid,
dev_warn(ctrl->device,
"Identify Descriptors failed (%d)\n", status);
/*
* Don't treat an error as fatal, as we potentially already
* have a NGUID or EUI-64.
* Don't treat non-retryable errors as fatal, as we potentially
* already have a NGUID or EUI-64. If we failed with DNR set,
* we want to silently ignore the error as we can still
* identify the device, but if the status has DNR set, we want
* to propagate the error back specifically for the disk
* revalidation flow to make sure we don't abandon the
* device just because of a temporal retry-able error (such
* as path of transport errors).
*/
if (status > 0 && !(status & NVME_SC_DNR))
if (status > 0 && (status & NVME_SC_DNR))
status = 0;
goto free_data;
}
Expand Down
7 changes: 4 additions & 3 deletions drivers/nvme/host/multipath.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,10 +672,11 @@ void nvme_mpath_add_disk(struct nvme_ns *ns, struct nvme_id_ns *id)
}

if (bdi_cap_stable_pages_required(ns->queue->backing_dev_info)) {
struct backing_dev_info *info =
ns->head->disk->queue->backing_dev_info;
struct gendisk *disk = ns->head->disk;

info->capabilities |= BDI_CAP_STABLE_WRITES;
if (disk)
disk->queue->backing_dev_info->capabilities |=
BDI_CAP_STABLE_WRITES;
}
}

Expand Down

0 comments on commit 29206c6

Please sign in to comment.