Revert "NVMe: Disk stats for read/write commands only"
Subsystems (2)
PATCH 1/2 Revert "NVMe: Disk stats for read/write commands only"
This reverts commit 3111a003a2f3c7459885b46953e36edeab4d2dff.
---
I testing with writes... I screwed up.
drivers/block/nvme-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/block/nvme-core.c +1 -2
@@ -346,8 +346,7 @@ static void bio_completion(struct nvme_dev *dev, void *ctx,dma_unmap_sg (&dev->pci_dev->dev, iod->sg, iod->nents,bio_data_dir (bio) ?DMA_TO_DEVICE :DMA_FROM_DEVICE ); -if (bio_rw (bio)) -nvme_end_io_acct (bio, iod->start_time); +nvme_end_io_acct (bio, iod->start_time);nvme_free_iod (dev, iod);if (status)bio_endio (bio, -EIO );
Signature · 1 line
1.7.10.4
PATCH 2/2 NVMe: Disk stats for read/write commands only
Flush and discard requests would previously mess up the accounting.
Signed-off-by Keith Busch <keith.busch at intel.com>
--- drivers/block/nvme-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/block/nvme-core.c +3 -3
@@ -342,11 +342,11 @@ static void bio_completion(struct nvme_dev *dev, void *ctx,struct bio *bio = iod->private;u16 status =le16_to_cpup (&cqe->status) >>1 ; -if (iod->nents) +if (iod->nents) {dma_unmap_sg (&dev->pci_dev->dev, iod->sg, iod->nents,bio_data_dir (bio) ?DMA_TO_DEVICE :DMA_FROM_DEVICE ); - -nvme_end_io_acct (bio, iod->start_time); +nvme_end_io_acct (bio, iod->start_time); + }nvme_free_iod (dev, iod);if (status)bio_endio (bio, -EIO );
Signature · 1 line
1.7.10.4