summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorCatherine Hoang <catherine.hoang@oracle.com>2023-10-17 13:12:08 -0700
committerChandan Babu R <chandanbabu@kernel.org>2023-10-23 12:02:26 +0530
commit14a537983b228cb050ceca3a5b743d01315dc4aa (patch)
tree80220a7108071c545088ef495d37fb3d5ae70b05 /tools
parent35dc55b9e80cb9ec4bcb969302000b002b2ed850 (diff)
downloadlinux-stable-14a537983b228cb050ceca3a5b743d01315dc4aa.tar.gz
linux-stable-14a537983b228cb050ceca3a5b743d01315dc4aa.tar.bz2
linux-stable-14a537983b228cb050ceca3a5b743d01315dc4aa.zip
xfs: allow read IO and FICLONE to run concurrently
One of our VM cluster management products needs to snapshot KVM image files so that they can be restored in case of failure. Snapshotting is done by redirecting VM disk writes to a sidecar file and using reflink on the disk image, specifically the FICLONE ioctl as used by "cp --reflink". Reflink locks the source and destination files while it operates, which means that reads from the main vm disk image are blocked, causing the vm to stall. When an image file is heavily fragmented, the copy process could take several minutes. Some of the vm image files have 50-100 million extent records, and duplicating that much metadata locks the file for 30 minutes or more. Having activities suspended for such a long time in a cluster node could result in node eviction. Clone operations and read IO do not change any data in the source file, so they should be able to run concurrently. Demote the exclusive locks taken by FICLONE to shared locks to allow reads while cloning. While a clone is in progress, writes will take the IOLOCK_EXCL, so they block until the clone completes. Link: https://lore.kernel.org/linux-xfs/8911B94D-DD29-4D6E-B5BC-32EAF1866245@oracle.com/ Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions