Skip to content

Commit

Permalink
cmdlib: use BTRFS for the cache2.qcow2
Browse files Browse the repository at this point in the history
We switched to ext4 to get away from using reflinks (see [1])
but the problem was actually specific to XFS. It's now been
fixed upstream in [2], but we need to wait for it to get back
backported to stable branches. Let's switch to BTRFS for now
so we can still get the space savings of reflinks, while avoiding
the reflink bug in XFS.

[1] #3728
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4b2f459d86252619448455013f581836c8b1b7da
  • Loading branch information
dustymabe authored and jlebon committed Mar 15, 2024
1 parent b1ae5e8 commit 4b8e936
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cmdlib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,9 @@ runvm_with_cache_snapshot() {
(
# shellcheck source=src/libguestfish.sh
source /usr/lib/coreos-assembler/libguestfish.sh
virt-format --filesystem=ext4 --label=cosa-cache -a cache2.qcow2.tmp)
# XXX switch back to XFS here when XFS bugfix has been backported
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4b2f459d86252619448455013f581836c8b1b7da
virt-format --filesystem=btrfs --label=cosa-cache -a cache2.qcow2.tmp)
mv -T cache2.qcow2.tmp "${workdir}"/cache/cache2.qcow2
fi
# And remove the old one
Expand Down

0 comments on commit 4b8e936

Please sign in to comment.