]> 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>
Thu, 15 Aug 2024 18:58:27 +0000 (11:58 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 16 Aug 2024 21:57:43 +0000 (14:57 -0700)
commit14c6b92a3e1432edcadfa144f5ef3f36bfc97071
treebd208d9905bb53f839aba584e8928aed1600ffe8
parent01c7fa4d8a16056dba2a1c8360c1b2304bdcfd4c
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