]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs: fix xfs_get_extsz_hint behavior with realtime alwayscow files
authorDarrick J. Wong <djwong@kernel.org>
Wed, 3 Jul 2024 21:22:31 +0000 (14:22 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 31 Jul 2024 01:46:58 +0000 (18:46 -0700)
commit13df6286459f68d844a0e45d0f75e094231fe56c
tree02ed1f660bec1fa08290824e9f2b5f3fdd4ebbeb
parent5300d72e1df2d859d341b8add8117f4027443658
xfs: fix xfs_get_extsz_hint behavior with realtime alwayscow files

Currently, we (ab)use xfs_get_extsz_hint so that it always returns a
nonzero value for realtime files.  This apparently was done to disable
delayed allocation for realtime files.

However, once we enable realtime reflink, we can also turn on the
alwayscow flag to force CoW writes to realtime files.  In this case, the
logic will incorrectly send the write through the delalloc write path.

Fix this by adjusting the logic slightly.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
libxfs/xfs_bmap.c