mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
NVMe: Disk stats for read/write commands only
Flush and discard requests would previously mess up the accounting. Signed-off-by: Keith Busch <[email protected]> Signed-off-by: Matthew Wilcox <[email protected]>
This commit is contained in:
parent
7e03b12406
commit
9e59d091b0
1 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue