* Re: LBS support for EXT4
[not found] <6ac7ce67-b54b-437e-9409-7da9402c9de1@pankajraghav.com>
@ 2025-06-20 15:55 ` Jan Kara
2025-06-21 0:25 ` Baokun Li
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Jan Kara @ 2025-06-20 15:55 UTC (permalink / raw)
To: Pankaj Raghav
Cc: Jan Kara, tytso, Luis Chamberlain, Pankaj Raghav, linux-ext4,
Zhang Yi
[added ext4 list and Zhang to CC]
Hi,
On Thu 19-06-25 15:05:14, Pankaj Raghav wrote:
> Hello Jan and Ted,
>
> As you might know, I added LBS support to XFS sometime back. And after
> that Luis added LBS support to block devices/buffer head path.
>
> And now that EXT4 supports large folios, it should be possible to add LBS
> support to EXT4.
>
> I started digging in to the code, and it looks like it might require some
> rework throughout EXT4 and lot of testing.
>
> My question is:
>
> I have seen patches from Zhang Yi to add iomap buffered IO support to EXT4.
> If that happens, then adding LBS support should become trivial.
>
> Do you think it might happen soon or it is going to take more time?
> Seeing the patches it is hard for me to say what the status is as the
> last patches posted for them was last year.
Well, time is always relative so it's difficult to tell what do you mean by
"soon" :). We are definitely interested in converting ext4 to iomap.
Currently we are fixing up some remaining issues caused by conversion to
support large order folios but after that iomap conversion would be a next
logical step. Zhang Yi had patches for that, I'm not sure how much from
them is left to apply after the large order folios have landed.
> The reason I am asking is, should I take up the challenge to add LBS
> support with buffer heads in EXT4, or should I wait until iomap patches
> are merged.
I think better spent time would be to help with the iomap conversion. I
don't think there will be that much coding left (perhaps some more exotic
features need attention) but there's definitely testing needed and review
is always welcome and most needed...
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: LBS support for EXT4
2025-06-20 15:55 ` LBS support for EXT4 Jan Kara
@ 2025-06-21 0:25 ` Baokun Li
2025-06-21 2:54 ` Zhang Yi
2025-06-23 13:14 ` Pankaj Raghav
2 siblings, 0 replies; 12+ messages in thread
From: Baokun Li @ 2025-06-21 0:25 UTC (permalink / raw)
To: Pankaj Raghav
Cc: Jan Kara, tytso, Luis Chamberlain, Pankaj Raghav, linux-ext4,
Zhang Yi, Baokun Li
Hi Pankaj Raghav,
We have some local patches that enable LBS (Logical Block Size) support in
ext4. Previously, we held off on releasing them because of an issue with
bdev LBS support in migration scenarios, and Zhang Yi's folio-related
patches hadn't been merged yet.
Now that both of these prerequisites are met, I will rebase and send out
this patch series as soon as possible.
Regards,
Baokun
On 2025/6/20 23:55, Jan Kara wrote:
> [added ext4 list and Zhang to CC]
>
> Hi,
>
> On Thu 19-06-25 15:05:14, Pankaj Raghav wrote:
>> Hello Jan and Ted,
>>
>> As you might know, I added LBS support to XFS sometime back. And after
>> that Luis added LBS support to block devices/buffer head path.
>>
>> And now that EXT4 supports large folios, it should be possible to add LBS
>> support to EXT4.
>>
>> I started digging in to the code, and it looks like it might require some
>> rework throughout EXT4 and lot of testing.
>>
>> My question is:
>>
>> I have seen patches from Zhang Yi to add iomap buffered IO support to EXT4.
>> If that happens, then adding LBS support should become trivial.
>>
>> Do you think it might happen soon or it is going to take more time?
>> Seeing the patches it is hard for me to say what the status is as the
>> last patches posted for them was last year.
> Well, time is always relative so it's difficult to tell what do you mean by
> "soon" :). We are definitely interested in converting ext4 to iomap.
> Currently we are fixing up some remaining issues caused by conversion to
> support large order folios but after that iomap conversion would be a next
> logical step. Zhang Yi had patches for that, I'm not sure how much from
> them is left to apply after the large order folios have landed.
>
>> The reason I am asking is, should I take up the challenge to add LBS
>> support with buffer heads in EXT4, or should I wait until iomap patches
>> are merged.
> I think better spent time would be to help with the iomap conversion. I
> don't think there will be that much coding left (perhaps some more exotic
> features need attention) but there's definitely testing needed and review
> is always welcome and most needed...
>
> Honza
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: LBS support for EXT4
2025-06-20 15:55 ` LBS support for EXT4 Jan Kara
2025-06-21 0:25 ` Baokun Li
@ 2025-06-21 2:54 ` Zhang Yi
2025-06-23 13:22 ` Pankaj Raghav
2025-06-23 13:14 ` Pankaj Raghav
2 siblings, 1 reply; 12+ messages in thread
From: Zhang Yi @ 2025-06-21 2:54 UTC (permalink / raw)
To: Jan Kara, Pankaj Raghav
Cc: tytso, Luis Chamberlain, Pankaj Raghav, linux-ext4
Hi Pankaj and Jan,
On 2025/6/20 23:55, Jan Kara wrote:
> [added ext4 list and Zhang to CC]
>
> Hi,
>
> On Thu 19-06-25 15:05:14, Pankaj Raghav wrote:
>> Hello Jan and Ted,
>>
>> As you might know, I added LBS support to XFS sometime back. And after
>> that Luis added LBS support to block devices/buffer head path.
>>
>> And now that EXT4 supports large folios, it should be possible to add LBS
>> support to EXT4.
>>
>> I started digging in to the code, and it looks like it might require some
>> rework throughout EXT4 and lot of testing.
>>
>> My question is:
>>
>> I have seen patches from Zhang Yi to add iomap buffered IO support to EXT4.
>> If that happens, then adding LBS support should become trivial.
>>
>> Do you think it might happen soon or it is going to take more time?
>> Seeing the patches it is hard for me to say what the status is as the
>> last patches posted for them was last year.
>
> Well, time is always relative so it's difficult to tell what do you mean by
> "soon" :). We are definitely interested in converting ext4 to iomap.
> Currently we are fixing up some remaining issues caused by conversion to
> support large order folios but after that iomap conversion would be a next
> logical step. Zhang Yi had patches for that, I'm not sure how much from
> them is left to apply after the large order folios have landed.
We have been working on the conversion of ext4 to iomap. The conversion
process for iomap has proven to be more complex than anticipated due to
numerous prerequisite issues and necessary refactors that must be
integrated. Currently, all prerequisite patches(perhaps) have been merged
into the latest 6.16-rc1 release, so I am rebasing my iomap series recently.
However, I have encountered some blocking issues during the rebase, and
I am trying to resolve them. I hope to release it as soon as possible.
>
>> The reason I am asking is, should I take up the challenge to add LBS
>> support with buffer heads in EXT4, or should I wait until iomap patches
>> are merged.
>
> I think better spent time would be to help with the iomap conversion. I
> don't think there will be that much coding left (perhaps some more exotic
> features need attention) but there's definitely testing needed and review
> is always welcome and most needed...
>
My colleagues, Baokun and Zhihao, have been working on LBS support for a
couple of months, based on my two large folio series (buffer_head and
iomap convesion) and the bdev large folio series form Luis. They will
release the first version after testing as soon as possible.
Best regards,
Yi.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: LBS support for EXT4
2025-06-20 15:55 ` LBS support for EXT4 Jan Kara
2025-06-21 0:25 ` Baokun Li
2025-06-21 2:54 ` Zhang Yi
@ 2025-06-23 13:14 ` Pankaj Raghav
2025-06-23 14:17 ` Theodore Ts'o
2 siblings, 1 reply; 12+ messages in thread
From: Pankaj Raghav @ 2025-06-23 13:14 UTC (permalink / raw)
To: Jan Kara
Cc: tytso, Luis Chamberlain, Pankaj Raghav, linux-ext4, Zhang Yi,
Baokun Li
Thanks a lot Jan, Zhang and Baokun. I think now I have a clear idea on IOMAP and LBS efforts
for EXT4.
>> The reason I am asking is, should I take up the challenge to add LBS
>> support with buffer heads in EXT4, or should I wait until iomap patches
>> are merged.
>
> I think better spent time would be to help with the iomap conversion. I
> don't think there will be that much coding left (perhaps some more exotic
> features need attention) but there's definitely testing needed and review
> is always welcome and most needed...
>
We will definitely help reviewing and testing the IOMAP and LBS patches. :)
--
Pankaj
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: LBS support for EXT4
2025-06-21 2:54 ` Zhang Yi
@ 2025-06-23 13:22 ` Pankaj Raghav
0 siblings, 0 replies; 12+ messages in thread
From: Pankaj Raghav @ 2025-06-23 13:22 UTC (permalink / raw)
To: Zhang Yi, Jan Kara; +Cc: tytso, Luis Chamberlain, Pankaj Raghav, linux-ext4
>> I think better spent time would be to help with the iomap conversion. I
>> don't think there will be that much coding left (perhaps some more exotic
>> features need attention) but there's definitely testing needed and review
>> is always welcome and most needed...
>>
>
> My colleagues, Baokun and Zhihao, have been working on LBS support for a
> couple of months, based on my two large folio series (buffer_head and
> iomap convesion) and the bdev large folio series form Luis. They will
> release the first version after testing as soon as possible.
>
That is great. Feel free to CC me and Luis. We can help with reviewing and testing
the patches. :)
--
Pankaj
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: LBS support for EXT4
2025-06-23 13:14 ` Pankaj Raghav
@ 2025-06-23 14:17 ` Theodore Ts'o
2025-06-25 11:13 ` Pankaj Raghav (Samsung)
0 siblings, 1 reply; 12+ messages in thread
From: Theodore Ts'o @ 2025-06-23 14:17 UTC (permalink / raw)
To: Pankaj Raghav
Cc: Jan Kara, Luis Chamberlain, Pankaj Raghav, linux-ext4, Zhang Yi,
Baokun Li
If you want to review and test the ext4/iomap changes, that would be
great. Be aware, though, that there are some features of ext4
(example: data journalling, fscrypt, fsverity, etc.) that the current
iomap buffered I/O code may not support today. The alternatives are
to keep the existing ext4 code paths for those file system features,
or to try to add that functionality into iomap. There are of course
tradeoffs to both alternatives; one might result in more code that we
have to maintain; the other might require a lot more work.
It _might_ be less effort to add LBS support to native ext4 code. I
think the main thing is to make sure that we always we use a large
folio and not fall back to a sub-blocksize set of pages. So again,
it's all about tradeoffs and what you consider to be the highest
priority.
For myself, my primary concern is to keep the code maintainable and to
not result in any test regressions. If your goal is to get more file
systems to use iomap for buffered I/O, that might be different than
those who are aiming to get performance or improved hardware support
ASAP as your higher priority. I will say that in the ideal world, we
would eventually migrate to use the iomap code for buffered I/O for at
least the most common case. But if we end up having an intermediate
way station where we have large folio support for LBS before we get to
that desired end state, I'm open to that, so long as the code stays
maintainable and bug-free(tm). :-)
Cheers,
- Ted
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: LBS support for EXT4
2025-06-23 14:17 ` Theodore Ts'o
@ 2025-06-25 11:13 ` Pankaj Raghav (Samsung)
2025-06-25 11:51 ` Baokun Li
0 siblings, 1 reply; 12+ messages in thread
From: Pankaj Raghav (Samsung) @ 2025-06-25 11:13 UTC (permalink / raw)
To: Theodore Ts'o
Cc: Jan Kara, Luis Chamberlain, Pankaj Raghav, linux-ext4, Zhang Yi,
Baokun Li
Thanks for the reply, Ted.
On Mon, Jun 23, 2025 at 10:17:53AM -0400, Theodore Ts'o wrote:
> If you want to review and test the ext4/iomap changes, that would be
> great. Be aware, though, that there are some features of ext4
> (example: data journalling, fscrypt, fsverity, etc.) that the current
> iomap buffered I/O code may not support today. The alternatives are
> to keep the existing ext4 code paths for those file system features,
> or to try to add that functionality into iomap. There are of course
> tradeoffs to both alternatives; one might result in more code that we
> have to maintain; the other might require a lot more work.
>
> It _might_ be less effort to add LBS support to native ext4 code. I
> think the main thing is to make sure that we always we use a large
> folio and not fall back to a sub-blocksize set of pages. So again,
> it's all about tradeoffs and what you consider to be the highest
> priority.
@Baokun are your LBS patches based on the native ext4 code or on top of
Zhang's iomap patches.
>
> For myself, my primary concern is to keep the code maintainable and to
> not result in any test regressions. If your goal is to get more file
> systems to use iomap for buffered I/O, that might be different than
> those who are aiming to get performance or improved hardware support
> ASAP as your higher priority. I will say that in the ideal world, we
> would eventually migrate to use the iomap code for buffered I/O for at
> least the most common case. But if we end up having an intermediate
> way station where we have large folio support for LBS before we get to
> that desired end state, I'm open to that, so long as the code stays
> maintainable and bug-free(tm). :-)
>
This makes sense. Thanks, Ted.
--
Pankaj Raghav
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: LBS support for EXT4
2025-06-25 11:13 ` Pankaj Raghav (Samsung)
@ 2025-06-25 11:51 ` Baokun Li
2025-06-25 12:25 ` Pankaj Raghav (Samsung)
2025-06-25 12:39 ` Theodore Ts'o
0 siblings, 2 replies; 12+ messages in thread
From: Baokun Li @ 2025-06-25 11:51 UTC (permalink / raw)
To: Pankaj Raghav (Samsung)
Cc: Jan Kara, Luis Chamberlain, Pankaj Raghav, linux-ext4, Zhang Yi,
Theodore Ts'o
On 2025/6/25 19:13, Pankaj Raghav (Samsung) wrote:
> Thanks for the reply, Ted.
>
> On Mon, Jun 23, 2025 at 10:17:53AM -0400, Theodore Ts'o wrote:
>> If you want to review and test the ext4/iomap changes, that would be
>> great. Be aware, though, that there are some features of ext4
>> (example: data journalling, fscrypt, fsverity, etc.) that the current
>> iomap buffered I/O code may not support today. The alternatives are
>> to keep the existing ext4 code paths for those file system features,
>> or to try to add that functionality into iomap. There are of course
>> tradeoffs to both alternatives; one might result in more code that we
>> have to maintain; the other might require a lot more work.
>>
>> It _might_ be less effort to add LBS support to native ext4 code. I
>> think the main thing is to make sure that we always we use a large
>> folio and not fall back to a sub-blocksize set of pages. So again,
>> it's all about tradeoffs and what you consider to be the highest
>> priority.
> @Baokun are your LBS patches based on the native ext4 code or on top of
> Zhang's iomap patches.
Now that mainline ext4 supports buffer head large folios, we'll first
focus on LBS support based on buffer heads. The main work involves adapting
ext4's internal logic (e.g., block allocation, read/write operations,
defragmentation) and clean up the process related to buffer head.
This doesn't conflict with iomap buffer write support. The iomap framework
already supports LBS (as xfs is already using it), so once ext4's internal
logic is adapted, Zhang Yi's iomap buffer write patches should also support
LBS upon their merge.
Cheers,
Baokun
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: LBS support for EXT4
2025-06-25 11:51 ` Baokun Li
@ 2025-06-25 12:25 ` Pankaj Raghav (Samsung)
2025-06-25 12:39 ` Theodore Ts'o
1 sibling, 0 replies; 12+ messages in thread
From: Pankaj Raghav (Samsung) @ 2025-06-25 12:25 UTC (permalink / raw)
To: Baokun Li
Cc: Jan Kara, Luis Chamberlain, Pankaj Raghav, linux-ext4, Zhang Yi,
Theodore Ts'o
On Wed, Jun 25, 2025 at 07:51:56PM +0800, Baokun Li wrote:
> On 2025/6/25 19:13, Pankaj Raghav (Samsung) wrote:
> > Thanks for the reply, Ted.
> >
> > On Mon, Jun 23, 2025 at 10:17:53AM -0400, Theodore Ts'o wrote:
> > > If you want to review and test the ext4/iomap changes, that would be
> > > great. Be aware, though, that there are some features of ext4
> > > (example: data journalling, fscrypt, fsverity, etc.) that the current
> > > iomap buffered I/O code may not support today. The alternatives are
> > > to keep the existing ext4 code paths for those file system features,
> > > or to try to add that functionality into iomap. There are of course
> > > tradeoffs to both alternatives; one might result in more code that we
> > > have to maintain; the other might require a lot more work.
> > >
> > > It _might_ be less effort to add LBS support to native ext4 code. I
> > > think the main thing is to make sure that we always we use a large
> > > folio and not fall back to a sub-blocksize set of pages. So again,
> > > it's all about tradeoffs and what you consider to be the highest
> > > priority.
> > @Baokun are your LBS patches based on the native ext4 code or on top of
> > Zhang's iomap patches.
> Now that mainline ext4 supports buffer head large folios, we'll first
> focus on LBS support based on buffer heads. The main work involves adapting
> ext4's internal logic (e.g., block allocation, read/write operations,
> defragmentation) and clean up the process related to buffer head.
Makes sense. When we added the LBS support to XFS, the changes in XFS
itself was very minimal. But I can imagine there is a bit more work and
testing involved in adding LBS support to EXT4 with buffer heads.
> This doesn't conflict with iomap buffer write support. The iomap framework
> already supports LBS (as xfs is already using it), so once ext4's internal
> logic is adapted, Zhang Yi's iomap buffer write patches should also support
> LBS upon their merge.
Yes. iomap has all the logic to handle LBS.
Thanks for the clarification. Looking forward to the patches.
--
Pankaj Raghav
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: LBS support for EXT4
2025-06-25 11:51 ` Baokun Li
2025-06-25 12:25 ` Pankaj Raghav (Samsung)
@ 2025-06-25 12:39 ` Theodore Ts'o
1 sibling, 0 replies; 12+ messages in thread
From: Theodore Ts'o @ 2025-06-25 12:39 UTC (permalink / raw)
To: Baokun Li
Cc: Pankaj Raghav (Samsung), Jan Kara, Luis Chamberlain,
Pankaj Raghav, linux-ext4, Zhang Yi
On Wed, Jun 25, 2025 at 07:51:56PM +0800, Baokun Li wrote:
> Now that mainline ext4 supports buffer head large folios, we'll first
> focus on LBS support based on buffer heads. The main work involves adapting
> ext4's internal logic (e.g., block allocation, read/write operations,
> defragmentation) and clean up the process related to buffer head.
That makes sense; ext4 uses buffer heads for metadata blocks, and so
even if we were using the buffered iomap code, that only is relevant
to the data path, so the changes so that jbd2 and ext4 can suport
large blocks while updating inode table blocks, allocation bitmaps,
etc. would be needed anyway.
Cheers,
- Ted
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: LBS support for ext4
[not found] <c0ea5334-6439-4ec9-a1eb-a9eb0863c3b7@pankajraghav.com>
@ 2025-10-09 8:07 ` Zhang Yi
2025-10-09 8:38 ` Pankaj Raghav
0 siblings, 1 reply; 12+ messages in thread
From: Zhang Yi @ 2025-10-09 8:07 UTC (permalink / raw)
To: Pankaj Raghav
Cc: Baokun Li, Luis Chamberlain, Swarna Prabhu, Ext4 Developers List,
Zhang Yi
[added ext4 list to CC]
Hi, Pankaj! Thank you for your letter.
On 10/7/2025 7:21 PM, Pankaj Raghav wrote:
> Hi Baokun and Zhang,
>
> I hope you both are doing well.
>
> I was wondering recently about LBS support for ext4. You said you were working on them and have some
> local patches that enabled them [1]. Is there any update on that and when do you plan to post them
> on the mailing list? :)
>
The current development work for ext4 LBS is essentially complete, and
testing is underway using various configurations of xfstests-bld.
However, since many test cases in the existing xfstests have
dependencies, such as rely on a 4KB block size image. So numerous cases
have failed. It is now necessary to analyze each failed case
individually and establish a new testing baseline.
> We are very interested in adding this support to ext4, so please let us know if you need some help
> with the review or testing.
>
Baokun has been working on this, but the failure cases have not yet been
fully analyzed and he is currently on an urgent business trip. We can
send out an RFC series by mid to late this month after he returns.
Testing, analysis and review are welcome!
Best Regards,
Yi.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: LBS support for ext4
2025-10-09 8:07 ` LBS support for ext4 Zhang Yi
@ 2025-10-09 8:38 ` Pankaj Raghav
0 siblings, 0 replies; 12+ messages in thread
From: Pankaj Raghav @ 2025-10-09 8:38 UTC (permalink / raw)
To: Zhang Yi
Cc: Baokun Li, Luis Chamberlain, Swarna Prabhu, Ext4 Developers List,
Zhang Yi
On 10/9/25 10:07, Zhang Yi wrote:
> [added ext4 list to CC]
>
> Hi, Pankaj! Thank you for your letter.
>
> On 10/7/2025 7:21 PM, Pankaj Raghav wrote:
>> Hi Baokun and Zhang,
>>
>> I hope you both are doing well.
>>
>> I was wondering recently about LBS support for ext4. You said you were working on them and have some
>> local patches that enabled them [1]. Is there any update on that and when do you plan to post them
>> on the mailing list? :)
>>
>
> The current development work for ext4 LBS is essentially complete, and
> testing is underway using various configurations of xfstests-bld.
> However, since many test cases in the existing xfstests have
> dependencies, such as rely on a 4KB block size image. So numerous cases
> have failed. It is now necessary to analyze each failed case
> individually and establish a new testing baseline.
>
Yes, we had similar issues with XFS where the test assumed the block size
can never be > PS. I fixed most of the issues in generic but I am not sure
about ext4 specific test cases.
>> We are very interested in adding this support to ext4, so please let us know if you need some help
>> with the review or testing.
>>
>
> Baokun has been working on this, but the failure cases have not yet been
> fully analyzed and he is currently on an urgent business trip. We can
> send out an RFC series by mid to late this month after he returns.
> Testing, analysis and review are welcome!
>
Perfect. Thanks a lot for the update and including the list in the conversation :)
--
Pankaj
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2025-10-09 8:38 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <c0ea5334-6439-4ec9-a1eb-a9eb0863c3b7@pankajraghav.com>
2025-10-09 8:07 ` LBS support for ext4 Zhang Yi
2025-10-09 8:38 ` Pankaj Raghav
[not found] <6ac7ce67-b54b-437e-9409-7da9402c9de1@pankajraghav.com>
2025-06-20 15:55 ` LBS support for EXT4 Jan Kara
2025-06-21 0:25 ` Baokun Li
2025-06-21 2:54 ` Zhang Yi
2025-06-23 13:22 ` Pankaj Raghav
2025-06-23 13:14 ` Pankaj Raghav
2025-06-23 14:17 ` Theodore Ts'o
2025-06-25 11:13 ` Pankaj Raghav (Samsung)
2025-06-25 11:51 ` Baokun Li
2025-06-25 12:25 ` Pankaj Raghav (Samsung)
2025-06-25 12:39 ` Theodore Ts'o
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).