From: Tom Yan <tom.ty89@gmail.com>
To: linux-block@vger.kernel.org
Cc: linux-scsi@vger.kernel.org, Tom Yan <tom.ty89@gmail.com>
Subject: [PATCH 3/3] block: set REQ_PREFLUSH to the final bio from __blkdev_issue_zero_pages()
Date: Sun, 6 Dec 2020 13:53:32 +0800 [thread overview]
Message-ID: <20201206055332.3144-3-tom.ty89@gmail.com> (raw)
In-Reply-To: <20201206055332.3144-1-tom.ty89@gmail.com>
Mimicking blkdev_issue_flush(). Seems like a right thing to do, as
they are a bunch of REQ_OP_WRITE.
Signed-off-by: Tom Yan <tom.ty89@gmail.com>
---
block/blk-lib.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/blk-lib.c b/block/blk-lib.c
index 354dcab760c7..5579fdea893d 100644
--- a/block/blk-lib.c
+++ b/block/blk-lib.c
@@ -422,6 +422,8 @@ int blkdev_issue_zeroout(struct block_device *bdev, sector_t sector,
} else if (!(flags & BLKDEV_ZERO_NOFALLBACK)) {
ret = __blkdev_issue_zero_pages(bdev, sector, nr_sects,
gfp_mask, &bio);
+ if (bio)
+ bio->bi_opf |= REQ_PREFLUSH;
} else {
/* No zeroing offload support */
ret = -EOPNOTSUPP;
--
2.29.2
next prev parent reply other threads:[~2020-12-06 5:54 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-06 5:53 [PATCH 1/3] block: try one write zeroes request before going further Tom Yan
2020-12-06 5:53 ` [PATCH 2/3] block: make __blkdev_issue_zero_pages() less confusing Tom Yan
2020-12-06 11:29 ` Hannes Reinecke
2020-12-06 13:28 ` Tom Yan
2020-12-07 13:34 ` Christoph Hellwig
2020-12-08 12:54 ` Tom Yan
2020-12-06 5:53 ` Tom Yan [this message]
2020-12-06 11:31 ` [PATCH 3/3] block: set REQ_PREFLUSH to the final bio from __blkdev_issue_zero_pages() Hannes Reinecke
2020-12-06 13:32 ` Tom Yan
2020-12-06 14:05 ` Hannes Reinecke
2020-12-06 14:14 ` Tom Yan
2020-12-06 16:05 ` Hannes Reinecke
2020-12-08 12:51 ` Tom Yan
2020-12-07 13:35 ` Christoph Hellwig
2020-12-06 11:25 ` [PATCH 1/3] block: try one write zeroes request before going further Hannes Reinecke
2020-12-06 13:25 ` Tom Yan
2020-12-06 13:56 ` Hannes Reinecke
2020-12-06 14:07 ` Tom Yan
2020-12-06 14:28 ` Tom Yan
2020-12-07 13:36 ` Christoph Hellwig
2020-12-08 12:48 ` Tom Yan
2020-12-09 17:51 ` Christoph Hellwig
2020-12-08 22:46 ` Ewan D. Milne
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=20201206055332.3144-3-tom.ty89@gmail.com \
--to=tom.ty89@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.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;
as well as URLs for NNTP newsgroup(s).