diff options
author | Max Gurtovoy <maxg@mellanox.com> | 2018-05-27 18:50:10 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-05-29 20:29:16 +0200 |
commit | c97f414c54a255f4f05a50a2625efaeee406e134 (patch) | |
tree | f9a69cb11a0ae47fd8afa16e9e793bf9b54b45fd /drivers | |
parent | eedffa28c9b00ca2dcb4d541b5a530f4c917052d (diff) | |
download | linux-c97f414c54a255f4f05a50a2625efaeee406e134.tar.bz2 |
nvme: fix extended data LBA supported setting
This value depands on the metadata support value, so reorder the
initialization to fit.
Fixes: b5be3b392 ("nvme: always unregister the integrity profile in __nvme_revalidate_disk")
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/nvme/host/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 99b857e5a7a9..b9ca782fe82d 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1447,8 +1447,8 @@ static void __nvme_revalidate_disk(struct gendisk *disk, struct nvme_id_ns *id) if (ns->lba_shift == 0) ns->lba_shift = 9; ns->noiob = le16_to_cpu(id->noiob); - ns->ext = ns->ms && (id->flbas & NVME_NS_FLBAS_META_EXT); ns->ms = le16_to_cpu(id->lbaf[id->flbas & NVME_NS_FLBAS_LBA_MASK].ms); + ns->ext = ns->ms && (id->flbas & NVME_NS_FLBAS_META_EXT); /* the PI implementation requires metadata equal t10 pi tuple size */ if (ns->ms == sizeof(struct t10_pi_tuple)) ns->pi_type = id->dps & NVME_NS_DPS_PI_MASK; |