[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z4gR7u9WBnyApKQV@dread.disaster.area>
Date: Thu, 16 Jan 2025 06:52:14 +1100
From: Dave Chinner <david@...morbit.com>
To: Jinliang Zheng <alexjlzheng@...il.com>
Cc: dchinner@...hat.com, djwong@...nel.org, cem@...nel.org,
chandanbabu@...nel.org, linux-xfs@...r.kernel.org,
linux-kernel@...r.kernel.org,
Jinliang Zheng <alexjlzheng@...cent.com>
Subject: Re: [RESEND PATCH v3] xfs: fix the entry condition of exact EOF
block allocation optimization
On Wed, Jan 15, 2025 at 08:35:25PM +0800, Jinliang Zheng wrote:
> When we call create(), lseek() and write() sequentially, offset != 0
> cannot be used as a judgment condition for whether the file already
> has extents.
>
> Furthermore, when xfs_bmap_adjacent() has not given a better blkno,
> it is not necessary to use exact EOF block allocation.
>
> Suggested-by: Dave Chinner <david@...morbit.com>
> Signed-off-by: Jinliang Zheng <alexjlzheng@...cent.com>
> ---
> Changelog:
> - V3: use ap->eof to mark whether to use the EXACT allocation algorithm
> - V2: https://lore.kernel.org/linux-xfs/Z1I74KeyZRv2pBBT@dread.disaster.area/
> - V1: https://lore.kernel.org/linux-xfs/ZyFJm7xg7Msd6eVr@dread.disaster.area/T/#t
> ---
> fs/xfs/libxfs/xfs_bmap.c | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
Looks fine.
Reviewed-by: Dave Chinner <dchinner@...hat.com>
--
Dave Chinner
david@...morbit.com
Powered by blists - more mailing lists