From: Jiufei Xue <jiufei.xue@linux.alibaba.com>
To: Christoph Hellwig <hch@lst.de>, Shaohua Li <shli@kernel.org>,
Jens Axboe <axboe@kernel.dk>
Cc: linux-block <linux-block@vger.kernel.org>,
caspar@linux.alibaba.com, Joseph Qi <joseph.qi@linux.alibaba.com>
Subject: [PATCH 1/4] block: fix the count of PGPGOUT for WRITE_SAME
Date: Tue, 27 Feb 2018 20:10:03 +0800 [thread overview]
Message-ID: <2e963c03-48c7-e3cf-03c1-4077b88eda46@linux.alibaba.com> (raw)
In-Reply-To: <014d8f0c-31db-c18b-855e-5e425b9499be@linux.alibaba.com>
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>
---
block/blk-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index 2d1a7bb..6d82c4f 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -2434,7 +2434,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);
--
1.9.4
next prev parent reply other threads:[~2018-02-27 12:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-27 12:07 [PATCH V2 0/4] fix a few problems in block layer Jiufei Xue
2018-02-27 12:10 ` Jiufei Xue [this message]
2018-02-27 12:10 ` [PATCH 3/4] block: display the correct diskname for bio Jiufei Xue
2018-02-28 17:07 ` Christoph Hellwig
2018-02-27 12:10 ` [PATCH 4/4] block: fix a typo Jiufei Xue
2018-02-28 17:07 ` Christoph Hellwig
2018-02-27 12:11 ` [PATCH 2/4] block: bio_check_eod() needs to consider partition Jiufei Xue
2018-02-28 17:48 ` Christoph Hellwig
2018-03-01 1:23 ` Jiufei Xue
2018-03-08 7:44 ` Christoph Hellwig
2018-03-01 15:41 ` [PATCH V2 0/4] fix a few problems in block layer Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2018-02-26 12:01 [PATCH " Jiufei Xue
2018-02-26 12:04 ` [PATCH 1/4] block: fix the count of PGPGOUT for WRITE_SAME Jiufei Xue
2018-02-26 20:52 ` Omar Sandoval
2018-02-26 23:43 ` Bart Van Assche
2018-02-27 0:10 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2e963c03-48c7-e3cf-03c1-4077b88eda46@linux.alibaba.com \
--to=jiufei.xue@linux.alibaba.com \
--cc=axboe@kernel.dk \
--cc=caspar@linux.alibaba.com \
--cc=hch@lst.de \
--cc=joseph.qi@linux.alibaba.com \
--cc=linux-block@vger.kernel.org \
--cc=shli@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox