Jan Kara <jack@xxxxxxx> 于2025年1月6日周一 23:51写道: > > On Fri 20-12-24 23:16:18, Julian Sun wrote: > > Ext4 provides the feature of storing data inline and automatically > > converts it to extent data when appropriate. However, files stored > > as extents cannot be converted back to inline data after truncation, > > even if the file size allows for inline data storage. > > This patch set implements the feature to store large truncated files > > as inline data when suitable, improving disk utilization. > > Patches 1-3 include some cleanups and fixes. > > Patches 4-6 refactor the functions responsible for writing inline data, > > consolidating their logic for better code organization. > > Patch 7 implements the feature of storing truncated files as inline data > > on the next write operation. > > Thanks for the patches! So ext4 inline data feature is a bit problematic > and has some locking issues in the implementation which we didn't manage to > fix [1]. We are even considering just disabling this feature due to the > complications with it. Hence I don't quite like further complicating this > code by adding possibility to create inline data in an inode after it had > data blocks allocated. That being said I like the preparatory cleanups in > this patch series. These are useful regardless of the feature itself. Ok. It looks fine to me. Thank you for your clarification. > > Honza > > [1] See our attempts in thread: > https://lore.kernel.org/all/d704ce55-321a-9c1d-1f8b-3360a0fdf978@xxxxxxxxxx > > -- > Jan Kara <jack@xxxxxxxx> > SUSE Labs, CR Thanks, -- Julian Sun <sunjunchao2870@xxxxxxxxx>