From: Shaohua Li <shli@kernel.org>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "axboe@kernel.dk" <axboe@kernel.dk>, Vivek Goyal <vgoyal@redhat.com>
Subject: [RFC]blk: mark discard request sync
Date: Fri, 16 Mar 2012 15:40:14 +0800 [thread overview]
Message-ID: <4F62EE5E.5070207@kernel.org> (raw)
Subject: blk: mark discard request sync
discard is called in jbd for example. If discard is slowed down, all
file operations could be impacted (eg, journal is full). And we always
wait for discard to finish. So looks we should mark discard as sync.
Signed-off-by: Shaohua Li <shli@fusionio.com>
---
block/blk-lib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux/block/blk-lib.c
===================================================================
--- linux.orig/block/blk-lib.c 2012-03-16 10:20:49.621517546 +0800
+++ linux/block/blk-lib.c 2012-03-16 10:21:55.901517256 +0800
@@ -42,7 +42,7 @@ int blkdev_issue_discard(struct block_de
{
DECLARE_COMPLETION_ONSTACK(wait);
struct request_queue *q = bdev_get_queue(bdev);
- int type = REQ_WRITE | REQ_DISCARD;
+ int type = REQ_WRITE | REQ_DISCARD | REQ_SYNC;
unsigned int max_discard_sectors;
struct bio_batch bb;
struct bio *bio;
next reply other threads:[~2012-03-16 7:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-16 7:40 Shaohua Li [this message]
2012-03-20 16:47 ` [RFC]blk: mark discard request sync Vivek Goyal
2012-03-21 1:01 ` Shaohua Li
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=4F62EE5E.5070207@kernel.org \
--to=shli@kernel.org \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=vgoyal@redhat.com \
/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).