From: Al Viro <viro@zeniv.linux.org.uk>
To: Alex <alex.fcyrx@gmail.com>
Cc: brauner@kernel.org, jack@suse.cz, torvalds@linux-foundation.org,
paulmck@kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] fs: Remove obsolete logic in i_size_read/write
Date: Wed, 16 Jul 2025 14:12:50 +0100 [thread overview]
Message-ID: <20250716131250.GC2580412@ZenIV> (raw)
In-Reply-To: <20250716125304.1189790-1-alex.fcyrx@gmail.com>
On Wed, Jul 16, 2025 at 08:53:04PM +0800, Alex wrote:
> The logic is used to protect load/store tearing on 32 bit platforms,
> for example, after i_size_read returned, there is no guarantee that
> inode->size won't be changed. Therefore, READ/WRITE_ONCE suffice, which
> is already implied by smp_load_acquire/smp_store_release.
Sorry, what? The problem is not a _later_ change, it's getting the
upper and lower 32bit halves from different values.
Before: position is 0xffffffff
After: position is 0x100000000
The value that might be returned by your variant: 0x1ffffffff.
next prev parent reply other threads:[~2025-07-16 13:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-16 12:53 [PATCH] fs: Remove obsolete logic in i_size_read/write Alex
2025-07-16 13:12 ` Al Viro [this message]
2025-07-16 13:28 ` Alex
2025-07-16 13:41 ` Matthew Wilcox
2025-07-16 13:44 ` Alex
2025-07-16 13:57 ` Matthew Wilcox
2025-07-16 14:38 ` Alex
2025-07-17 5:05 ` kernel test robot
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=20250716131250.GC2580412@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=alex.fcyrx@gmail.com \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.