From: bugzilla-daemon@bugzilla.kernel.org
To: linux-ext4@vger.kernel.org
Subject: [Bug 200681] [inline_data] read() does not see what write() has just written through different FD in the same thread
Date: Sat, 13 Oct 2018 21:25:09 +0000 [thread overview]
Message-ID: <bug-200681-13602-FrG3k8bGSh@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-200681-13602@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=200681
--- Comment #8 from Theodore Tso (tytso@mit.edu) ---
Thanks for the repro. It looks like the critical factor is not the size of
the filesystem, but the blocksize. It just so happens that using a file system
of size of 8M causes mke2fs to default to a 1k block size. This can be seen by
trying testing with a file system created by:
mke2fs -Fq -t ext4 -O inline_data -I 1024 -b 1024 /dev/vdc
I've done some initial investigation, and something really strange is going on.
If an fsync(2) is forced write after the writes, the problem goes away. By
changing the size of the reads, it's the second read which is returning all
zeros --- up to the point where when the first read is made to be larger than
16k, at which point it looks like it's the last 4k page which is all zeros.
Unfortuantely, it's not clear what is happening. The best I can say at this
point is that it looks the problem is related to inline_data, where when doing
a large write which forces a conversion from an inline_data to normal file, and
where the blocksize is != the page size, something is going very wrong.
To date, I've been only testing inline_data with a blocksize of 4k, and that's
probably why I haven't seen any problems like this.
I'm curious how you found this bug; were you deliberately using a 1k block
size, or were you trying to use inline_data with very small file systems?
--
You are receiving this mail because:
You are watching the assignee of the bug.
next prev parent reply other threads:[~2018-10-14 5:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-200681-13602@https.bugzilla.kernel.org/>
2018-10-13 16:03 ` [Bug 200681] [inline_data] read() does not see what write() has just written through different FD in the same thread bugzilla-daemon
2018-10-13 16:04 ` bugzilla-daemon
2018-10-13 21:25 ` bugzilla-daemon [this message]
2018-10-14 7:29 ` bugzilla-daemon
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=bug-200681-13602-FrG3k8bGSh@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@bugzilla.kernel.org \
--cc=linux-ext4@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).