On 2024/3/12 20:21, Christoph Hellwig wrote: > On Mon, Mar 11, 2024 at 08:37:37AM -0700, Darrick J. Wong wrote: >>> +convert_delay: >>> + end_fsb = min(end_fsb, imap.br_startoff + imap.br_blockcount); >>> + xfs_iunlock(ip, lockmode); >>> + truncate_pagecache_range(inode, offset, XFS_FSB_TO_B(mp, end_fsb)); >>> + error = xfs_iomap_write_direct(ip, offset_fsb, end_fsb - offset_fsb, >>> + flags, &imap, &seq); >> >> I expected this to be a direct call to xfs_bmapi_convert_delalloc. >> What was the reason not for using that? > > Same here. The fact that we even convert delalloc reservations in > xfs_iomap_write_direct is something that doesn't make much sense > given that we're punching out delalloc reservations before starting > direct I/O. > OK, sure, I will use xfs_bmapi_convert_delalloc() in my next iteration. Thanks, Yi.