public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* Patch "block: fix the count of PGPGOUT for WRITE_SAME" has been added to the 4.15-stable tree
@ 2018-03-06 18:49 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2018-03-06 18:49 UTC (permalink / raw)
  To: jiufei.xue, axboe, gregkh, hch, osandov; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    block: fix the count of PGPGOUT for WRITE_SAME

to the 4.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     block-fix-the-count-of-pgpgout-for-write_same.patch
and it can be found in the queue-4.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 7c5a0dcf557c6511a61e092ba887de28882fe857 Mon Sep 17 00:00:00 2001
From: Jiufei Xue <jiufei.xue@linux.alibaba.com>
Date: Tue, 27 Feb 2018 20:10:03 +0800
Subject: block: fix the count of PGPGOUT for WRITE_SAME

From: Jiufei Xue <jiufei.xue@linux.alibaba.com>

commit 7c5a0dcf557c6511a61e092ba887de28882fe857 upstream.

The vm counters is counted in sectors, so we should do the conversation
in submit_bio.

Fixes: 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and partitions index")
Cc: stable@vger.kernel.org
Reviewed-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jiufei Xue <jiufei.xue@linux.alibaba.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 block/blk-core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -2401,7 +2401,7 @@ blk_qc_t submit_bio(struct bio *bio)
 		unsigned int count;
 
 		if (unlikely(bio_op(bio) == REQ_OP_WRITE_SAME))
-			count = queue_logical_block_size(bio->bi_disk->queue);
+			count = queue_logical_block_size(bio->bi_disk->queue) >> 9;
 		else
 			count = bio_sectors(bio);
 


Patches currently in stable-queue which might be from jiufei.xue@linux.alibaba.com are

queue-4.15/block-fix-the-count-of-pgpgout-for-write_same.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-06 18:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-06 18:49 Patch "block: fix the count of PGPGOUT for WRITE_SAME" has been added to the 4.15-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox