Re: [PATCH -next v2 03/22] ext4: only order data when partially block truncating down
From: Jan Kara
Date: Tue Feb 10 2026 - 09:09:26 EST
On Tue 10-02-26 20:02:51, Zhang Yi wrote:
> On 2/9/2026 4:28 PM, Zhang Yi wrote:
> > On 2/6/2026 11:35 PM, Jan Kara wrote:
> >> On Fri 06-02-26 19:09:53, Zhang Yi wrote:
> >>> On 2/5/2026 11:05 PM, Jan Kara wrote:
> >>>> So how about the following:
> >>>
> >>> Let me see, please correct me if my understanding is wrong, ana there are
> >>> also some points I don't get.
> >>>
> >>>> We expand our io_end processing with the
> >>>> ability to journal i_disksize updates after page writeback completes. Then
>
> While I was extending the end_io path of buffered_head to support updating
> i_disksize, I found another problem that requires discussion.
>
> Supporting updates to i_disksize in end_io requires starting a handle, which
> conflicts with the data=ordered mode because folios written back through the
> journal process cannot initiate any handles; otherwise, this may lead to a
> deadlock. This limitation does not affect the iomap path, as it does not use
> the data=ordered mode at all. However, in the buffered_head path, online
> defragmentation (if this change works, it should be the last user) still uses
> the data=ordered mode.
Right and my intention was to use reserved handle for the i_disksize update
similarly as we currently use reserved handle for unwritten extent
conversion after page writeback is done.
Honza
--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR