From: Jens Axboe <axboe@fb.com>
To: <linux-kernel@vger.kernel.org>, <linux-fsdevel@vger.kernel.org>,
<linux-block@vger.kernel.org>
Cc: Jens Axboe <axboe@fb.com>
Subject: [PATCH 3/8] writeback: use WRITE_SYNC for reclaim or sync writeback
Date: Wed, 23 Mar 2016 09:25:45 -0600 [thread overview]
Message-ID: <1458746750-9213-4-git-send-email-axboe@fb.com> (raw)
In-Reply-To: <1458746750-9213-1-git-send-email-axboe@fb.com>
If we're doing reclaim or sync IO, use WRITE_SYNC to inform the lower
levels of the importance of this IO.
Signed-off-by: Jens Axboe <axboe@fb.com>
---
include/linux/writeback.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index 719c255e105a..b2c75b8901da 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -102,7 +102,7 @@ struct writeback_control {
static inline int wbc_to_write(struct writeback_control *wbc)
{
- if (wbc->sync_mode == WB_SYNC_ALL)
+ if (wbc->sync_mode == WB_SYNC_ALL || wbc->for_reclaim || wbc->for_sync)
return WRITE_SYNC;
return WRITE;
--
2.4.1.168.g1ea28e1
next prev parent reply other threads:[~2016-03-23 15:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-23 15:25 Jens Axboe
2016-03-23 15:25 ` [PATCH 1/8] writeback: propagate the various reasons for writeback Jens Axboe
2016-03-23 15:25 ` [PATCH 2/8] writeback: add wbc_to_write() Jens Axboe
2016-03-23 15:25 ` Jens Axboe [this message]
2016-03-23 15:25 ` [PATCH 4/8] writeback: track if we're sleeping on progress in balance_dirty_pages() Jens Axboe
2016-03-23 15:25 ` [PATCH 5/8] block: add ability to flag write back caching on a device Jens Axboe
2016-03-23 15:25 ` [PATCH 6/8] sd: inform block layer of write cache state Jens Axboe
2016-03-23 15:25 ` [PATCH 7/8] NVMe: " Jens Axboe
2016-03-23 15:25 ` [PATCH 8/8] writeback: throttle buffered writeback Jens Axboe
2016-03-23 15:39 ` [PATCHSET v2][RFC] Make background writeback not suck Jens Axboe
2016-03-24 17:42 ` Jens Axboe
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=1458746750-9213-4-git-send-email-axboe@fb.com \
--to=axboe@fb.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@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).