From: Andreas Gruenbacher <agruenba@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 2/3] gfs2: Use iomap for stuffed direct I/O reads
Date: Sat, 7 Jul 2018 11:39:03 +0200 [thread overview]
Message-ID: <20180707093904.23177-3-agruenba@redhat.com> (raw)
In-Reply-To: <20180707093904.23177-1-agruenba@redhat.com>
Remove the fallback code from direct to buffered I/O for stuffed reads.
For stuffed writes, we must keep the fallback code: the deferred glock
we are holding under direct I/O doesn't allow to write to the inode or
change the file size.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
---
fs/gfs2/file.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 6d895d39158a..08369c6cd127 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -706,14 +706,8 @@ static ssize_t gfs2_file_direct_read(struct kiocb *iocb, struct iov_iter *to)
if (ret)
goto out_uninit;
- /* fall back to buffered I/O for stuffed files */
- ret = -ENOTBLK;
- if (gfs2_is_stuffed(ip))
- goto out;
-
ret = iomap_dio_rw(iocb, to, &gfs2_iomap_ops, NULL);
-out:
gfs2_glock_dq(&gh);
out_uninit:
gfs2_holder_uninit(&gh);
--
2.17.1
next prev parent reply other threads:[~2018-07-07 9:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-07 9:39 [Cluster-devel] [PATCH 0/3] gfs2: More iomap enablement Andreas Gruenbacher
2018-07-07 9:39 ` [Cluster-devel] [PATCH 1/3] gfs2: fallocate_chunk: Always initialize struct iomap Andreas Gruenbacher
2018-07-07 9:39 ` Andreas Gruenbacher [this message]
2018-07-07 9:39 ` [Cluster-devel] [PATCH 3/3] gfs2: use iomap_readpage for blocksize == PAGE_SIZE Andreas Gruenbacher
2018-07-09 12:47 ` [Cluster-devel] [PATCH 0/3] gfs2: More iomap enablement Bob Peterson
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=20180707093904.23177-3-agruenba@redhat.com \
--to=agruenba@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).