From: Jiri Slaby <jslaby@suse.cz>
To: "Theodore Ts'o" <tytso@mit.edu>,
linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org,
Christoph Hellwig <hch@infradead.org>
Subject: Re: ext4 iomap SEEK broken [was: [GIT PULL] ext4 updates for 4.15]
Date: Mon, 12 Feb 2018 14:34:29 +0100 [thread overview]
Message-ID: <6db646d9-9ec0-ddda-d480-357cf3c70a09@suse.cz> (raw)
In-Reply-To: <45062110-e80c-f1e8-3710-743c1ae4d232@suse.cz>
On 02/12/2018, 01:14 PM, Jiri Slaby wrote:
> On 02/12/2018, 11:02 AM, Jiri Slaby wrote:
>> Given this happens only on 32bit kernel, I assume some 32bit overflow.
>> But I am unable to see it (yet).
>
> Just to add, a diff of strace in good and bad kernels:
> @@ -655,14 +655,4 @@
> _llseek(3, 4275568640, [4286054400], SEEK_DATA) = 0
> _llseek(3, 4286054400, [4288675840], SEEK_HOLE) = 0
> _llseek(3, 4288675840, [4299161600], SEEK_DATA) = 0
> -_llseek(3, 4299161600, [4301783040], SEEK_HOLE) = 0
> +_llseek(3, 4299161600, [4299161600], SEEK_HOLE) = 2621440
>
> llseek returns a very invalid value when it comes to 0x100400000.
It gets cropped to 0x400000, so:
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -3523,7 +3523,7 @@ static int ext4_iomap_begin(struct inode *inode,
loff_t offset, loff_t length,
iomap->flags |= IOMAP_F_DIRTY;
iomap->bdev = inode->i_sb->s_bdev;
iomap->dax_dev = sbi->s_daxdev;
- iomap->offset = first_block << blkbits;
+ iomap->offset = (u64)first_block << blkbits;
iomap->length = (u64)map.m_len << blkbits;
if (ret == 0) {
sounds about right?
> regards,
--
js
suse labs
next prev parent reply other threads:[~2018-02-12 13:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-13 3:15 [GIT PULL] ext4 updates for 4.15 Theodore Ts'o
2017-11-13 16:25 ` Theodore Ts'o
2017-11-14 20:59 ` Linus Torvalds
2017-11-15 0:56 ` Theodore Ts'o
2017-11-15 1:11 ` Linus Torvalds
2018-02-12 10:02 ` ext4 iomap SEEK broken [was: [GIT PULL] ext4 updates for 4.15] Jiri Slaby
2018-02-12 12:14 ` Jiri Slaby
2018-02-12 13:34 ` Jiri Slaby [this message]
2018-02-12 13:38 ` Jiri Slaby
2018-02-12 16:10 ` Theodore Ts'o
2018-02-12 20:23 ` Jiri Slaby
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=6db646d9-9ec0-ddda-d480-357cf3c70a09@suse.cz \
--to=jslaby@suse.cz \
--cc=hch@infradead.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
/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
all inboxes | Powered by JetHome®