linux/drivers/nvme/host
Matias Bjørling 409ae5a76e lightnvm: invalid offset calculation for lba_shift
The ns->lba_shift assumes its value to be the logarithmic of the
LA size. A previous patch duplicated the lba_shift calculation into
lightnvm. It prematurely also subtracted a 512byte shift, which commonly
is applied per-command. The 512byte shift being subtracted twice led to
data loss when restoring the logical to physical mapping table from
device and when issuing I/O commands using rrpc.

Fix offset by removing the 512byte shift subtraction when calculating
lba_shift.

Fixes: b0b4e09c1a "lightnvm: control life of nvm_dev in driver"
Reported-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
2016-11-11 18:27:32 -07:00
..
Kconfig nvme-rdma: add back dependency on CONFIG_BLOCK 2016-09-12 22:29:43 +03:00
Makefile nvme-rdma: add a NVMe over Fabrics RDMA host driver 2016-07-08 08:38:49 -06:00
core.c nvme: use symbolic constants for CNS values 2016-10-19 11:36:22 -06:00
fabrics.c Merge branch 'for-4.9/block' of git://git.kernel.dk/linux-block 2016-10-07 14:42:05 -07:00
fabrics.h Merge branch 'for-4.9/block' of git://git.kernel.dk/linux-block 2016-10-07 14:42:05 -07:00
lightnvm.c lightnvm: invalid offset calculation for lba_shift 2016-11-11 18:27:32 -07:00
nvme.h Merge branch 'for-4.9/block-irq' of git://git.kernel.dk/linux-block 2016-10-09 17:29:33 -07:00
pci.c Merge branch 'for-linus' of git://git.kernel.dk/linux-block 2016-10-21 10:54:01 -07:00
rdma.c Merge branch 'for-4.9/block-irq' of git://git.kernel.dk/linux-block 2016-10-09 17:29:33 -07:00
scsi.c nvme: Add tertiary number to NVME_VS 2016-10-19 11:36:22 -06:00