]> www.infradead.org Git - users/hch/xfs.git/commit
xfs: fix xfs_get_extsz_hint behavior with realtime alwayscow files
authorDarrick J. Wong <djwong@kernel.org>
Thu, 15 Aug 2024 18:49:33 +0000 (11:49 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 16 Aug 2024 21:54:33 +0000 (14:54 -0700)
commit88d818c96cde9e47ece7fd868f78615fd34d85b2
tree07515f22f067f6500efe06486e61638b949f9ab9
parent68353b0dc0927a3c0e05b38f6961360294155bee
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>
fs/xfs/libxfs/xfs_bmap.c