Re: [PATCH] btrfs: always wait for ordered extents to avoid OE races

Qu Wenruo <[email protected]>
Newsgroups org.kernel.vger.linux-btrfs
Message-ID <[email protected]>

在 2026/6/26 18:45, Filipe Manana 写道:
> On Thu, Jun 25, 2026 at 11:39 PM Qu Wenruo <[email protected]> wrote:
[...]
>> If acceptable, I'll add the microbenchmark into the commit message in
>> the next update.
> 
> Instead of this approach, can we wait for the ordered extent(s) in DIO
> path that reverts i_size after the short write?

OK, I think that's possible.
I didn't see any special context requirement for iomap_end() callback.

But doing btrfs_start_ordered_extent() at the isize revert timing has 
one extra problem, it will break nowait.

As btrfs_start_ordered_extent() will call wait_event().

At least the current one we won't directly sleep (the wait is happening 
on the next buffered write).

Thanks,
Qu
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.