]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: force the log after remapping a synchronous-writes file
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 4 Sep 2020 17:20:16 +0000 (10:20 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 16 Sep 2020 03:52:42 +0000 (20:52 -0700)
commitcc42af7f9fccb684adb14177bbc7ee5c1f37b96c
treed68ee1f987d446ad538ad04d8e71e127dc03c684
parent1ae6670a311774d386318b67b42654846cb513a9
xfs: force the log after remapping a synchronous-writes file

Commit 9700dd3e35d4 tried to make it so that a remap operation would
force the log out to disk if the filesystem is mounted with mandatory
synchronous writes.  Unfortunately, that commit failed to handle the
case where the inode or the file descriptor require mandatory
synchronous writes.

Refactor the check into into a helper that will look for all three
conditions, and now we can treat reflink just like any other synchronous
write.

Fixes: 9700dd3e35d4 ("xfs: reflink should force the log out if mounted with wsync")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_file.c