Skip to content

Commit

Permalink
osbuilder/image-builder: disable reflink
Browse files Browse the repository at this point in the history
Disable reflink when using DAX. Reflink is a xfs feature that cannot be
used together with DAX.

fixes #577

Signed-off-by: Julio Montes <julio.montes@intel.com>
  • Loading branch information
Julio Montes committed Sep 1, 2020
1 parent c422d06 commit fcd29a2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/osbuilder/image-builder/image_builder.sh
Expand Up @@ -324,7 +324,12 @@ format_loop() {
;;

"${xfs_format}")
mkfs.xfs -q -f -b size="${block_size}" "${device}p1"
# DAX and reflink cannot be used together!
# Explicitly disable reflink, if it fails then reflink
# is not supported and '-m reflink=0' is not needed.
if mkfs.xfs -m reflink=0 -q -f -b size="${block_size}" "${device}p1" 2>&1 | grep -q "unknown option"; then
mkfs.xfs -q -f -b size="${block_size}" "${device}p1"
fi
;;

*)
Expand Down

0 comments on commit fcd29a2

Please sign in to comment.