From: Goldwyn Rodrigues <rgoldwyn@suse.de>
To: jack@suse.com
Cc: hch@infradead.org, linux-fsdevel@vger.kernel.org,
linux-block@vger.kernel.org, linux-btrfs@vger.kernel.org,
linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org,
Goldwyn Rodrigues <rgoldwyn@suse.com>
Subject: [PATCH 4/8] nowait aio: Introduce IOMAP_NOWAIT
Date: Tue, 28 Feb 2017 17:36:06 -0600 [thread overview]
Message-ID: <20170228233610.25456-5-rgoldwyn@suse.de> (raw)
In-Reply-To: <20170228233610.25456-1-rgoldwyn@suse.de>
From: Goldwyn Rodrigues <rgoldwyn@suse.com>
IOCB_NOWAIT translates to IOMAP_NOWAIT for iomaps.
This is used by XFS in the XFS patch.
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
---
fs/iomap.c | 2 ++
include/linux/iomap.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/fs/iomap.c b/fs/iomap.c
index a51cb4c..3fb68d2 100644
--- a/fs/iomap.c
+++ b/fs/iomap.c
@@ -883,6 +883,8 @@ iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter, struct iomap_ops *ops,
} else {
dio->flags |= IOMAP_DIO_WRITE;
flags |= IOMAP_WRITE;
+ if (iocb->ki_flags & IOCB_NOWAIT)
+ flags |= IOMAP_NOWAIT;
}
if (mapping->nrpages) {
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index a4c94b8..d1c33ef 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -51,6 +51,7 @@ struct iomap {
#define IOMAP_REPORT (1 << 2) /* report extent status, e.g. FIEMAP */
#define IOMAP_FAULT (1 << 3) /* mapping for page fault */
#define IOMAP_DIRECT (1 << 4) /* direct I/O */
+#define IOMAP_NOWAIT (1 << 5) /* Don't wait for writeback */
struct iomap_ops {
/*
--
2.10.2
next prev parent reply other threads:[~2017-03-01 0:58 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-28 23:36 [PATCH 0/8 v2] Non-blocking AIO Goldwyn Rodrigues
2017-02-28 23:36 ` [PATCH 1/8] nowait aio: Introduce IOCB_FLAG_NOWAIT Goldwyn Rodrigues
2017-03-01 15:36 ` Christoph Hellwig
2017-03-01 15:56 ` Christoph Hellwig
2017-03-01 16:57 ` Goldwyn Rodrigues
2017-03-01 22:44 ` Christoph Hellwig
2017-02-28 23:36 ` [PATCH 2/8] nowait aio: Return if cannot get hold of i_rwsem Goldwyn Rodrigues
2017-03-01 15:37 ` Christoph Hellwig
2017-02-28 23:36 ` [PATCH 3/8] nowait aio: return if direct write will trigger writeback Goldwyn Rodrigues
2017-03-01 3:46 ` Matthew Wilcox
2017-03-01 15:38 ` Christoph Hellwig
2017-03-02 10:38 ` Jan Kara
2017-03-02 14:12 ` Matthew Wilcox
2017-03-02 15:22 ` Jan Kara
2017-02-28 23:36 ` Goldwyn Rodrigues [this message]
2017-02-28 23:36 ` [PATCH 5/8] nowait aio: return on congested block device Goldwyn Rodrigues
2017-03-08 7:03 ` Sagi Grimberg
2017-03-08 15:00 ` Goldwyn Rodrigues
2017-03-08 15:28 ` Jan Kara
2017-03-08 15:51 ` Christoph Hellwig
2017-03-08 16:17 ` Jens Axboe
2017-03-09 2:18 ` Goldwyn Rodrigues
2017-02-28 23:36 ` [PATCH 6/8] nowait aio: ext4 Goldwyn Rodrigues
2017-02-28 23:36 ` [PATCH 7/8] nowait aio: xfs Goldwyn Rodrigues
2017-03-01 15:40 ` Christoph Hellwig
2017-02-28 23:36 ` [PATCH 8/8] nowait aio: btrfs Goldwyn Rodrigues
2017-03-05 14:56 ` [PATCH 0/8 v2] Non-blocking AIO Avi Kivity
2017-03-06 8:25 ` Jan Kara
2017-03-06 8:40 ` Avi Kivity
2017-03-06 15:19 ` Jens Axboe
2017-03-06 15:29 ` Avi Kivity
2017-03-06 15:38 ` Jens Axboe
2017-03-06 15:59 ` Avi Kivity
2017-03-06 16:08 ` Jens Axboe
2017-03-06 16:59 ` Avi Kivity
2017-03-06 17:06 ` Jens Axboe
2017-03-06 18:17 ` Avi Kivity
2017-03-06 18:27 ` Jens Axboe
2017-03-06 18:50 ` Avi Kivity
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=20170228233610.25456-5-rgoldwyn@suse.de \
--to=rgoldwyn@suse.de \
--cc=hch@infradead.org \
--cc=jack@suse.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=rgoldwyn@suse.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).