From: Christoph Hellwig <hch@lst.de>
To: "Andreas Grünbacher" <andreas.gruenbacher@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>,
Andreas Gruenbacher <agruenba@redhat.com>,
Jan Kara <jack@suse.cz>,
Linux FS-devel Mailing List <linux-fsdevel@vger.kernel.org>,
linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: [PATCH 4/6] vfs: Add iomap_seek_hole and iomap_seek_data helpers
Date: Wed, 28 Jun 2017 00:43:27 +0200 [thread overview]
Message-ID: <20170627224326.GA12755@lst.de> (raw)
In-Reply-To: <CAHpGcM+Dy+9dNwNpCmu492ayjbSnW-eeivw3+CfJUfbDHajn9w@mail.gmail.com>
On Wed, Jun 28, 2017 at 12:14:57AM +0200, Andreas Gr�nbacher wrote:
> This shouldn't be true anymore now that the actors don't recompute the
> length; the above three lines should be obsolete.
Indeed.
> This comment makes more sense in iomap_seek_hole now.
Or just drop it..
What about the incremental patch below?
diff --git a/fs/iomap.c b/fs/iomap.c
index c90cda33994b..432eed8f091f 100644
--- a/fs/iomap.c
+++ b/fs/iomap.c
@@ -626,9 +626,6 @@ iomap_seek_hole(struct inode *inode, loff_t offset, const struct iomap_ops *ops)
length -= ret;
}
- /* The last segment can extend beyond the end of the file. */
- if (length <= 0)
- return min(offset, size);
return offset;
}
EXPORT_SYMBOL_GPL(iomap_seek_hole);
@@ -675,7 +672,6 @@ iomap_seek_data(struct inode *inode, loff_t offset, const struct iomap_ops *ops)
length -= ret;
}
- /* There is an implicit hole at the end of the file. */
if (length <= 0)
return -ENXIO;
return offset;
next prev parent reply other threads:[~2017-06-27 22:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-27 21:48 lseek SEEK_HOLE / SEEK_DATA fixes and switch to iomap V3-hch Christoph Hellwig
2017-06-27 21:48 ` [PATCH 1/6] xfs: rewrite xfs_dq_get_next_id using xfs_iext_lookup_extent Christoph Hellwig
2017-06-27 21:48 ` [PATCH 2/6] xfs: remove a whitespace-only line from xfs_fs_get_nextdqblk Christoph Hellwig
2017-06-27 21:48 ` [PATCH 3/6] vfs: Add page_cache_seek_hole_data helper Christoph Hellwig
2017-06-27 21:48 ` [PATCH 4/6] vfs: Add iomap_seek_hole and iomap_seek_data helpers Christoph Hellwig
2017-06-27 22:14 ` Andreas Grünbacher
2017-06-27 22:43 ` Christoph Hellwig [this message]
2017-06-27 22:49 ` Andreas Grünbacher
2017-06-27 21:48 ` [PATCH 5/6] xfs: Switch to iomap for SEEK_HOLE / SEEK_DATA Christoph Hellwig
2017-06-27 21:48 ` [PATCH 6/6] ext4: " Christoph Hellwig
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=20170627224326.GA12755@lst.de \
--to=hch@lst.de \
--cc=agruenba@redhat.com \
--cc=andreas.gruenbacher@gmail.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@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).