common/defrag: Skip defrag tests on DAX-enabled filesystems
PATCH 1/1 common/defrag: Skip defrag tests on DAX-enabled filesystems
Online defragmentation is not supported on DAX-enabled filesystems because DAX bypasses the page cache required for defrag operations.
Add check in _require_defrag() to skip tests when DAX is enabled, avoiding false failures on ext4/301-304, ext4/308 and generic/018.
--- common/defrag | 4 ++++ 1 file changed, 4 insertions(+)
common/defrag +4 -0
@@ -6,6 +6,10 @@ _require_defrag() { + # Defragmentation is not supported on DAX-enabled filesystems + if echo "$MOUNT_OPTIONS" | grep -qw "dax"; then + _notrun "Defragmentation not supported on DAX-enabled filesystem" + fi case "$FSTYP" in xfs) # xfs_fsr does preallocates, require "falloc"
Signature · 1 line
2.45.1
Quoted 7 lines · Disha Goel
Online defragmentation is not supported on DAX-enabled filesystems because DAX bypasses the page cache required for defrag operations.
Add check in
_require_defrag()to skip tests when DAX is enabled, avoiding false failures on ext4/301-304, ext4/308 and generic/018.Signed-off-by Disha Goel <[email protected]>
Looks good Disha, feel free to add:
One small comment:
common/defrag line 9
Quoted 13 lines
--- common/defrag | 4 ++++ 1 file changed, 4 insertions(+)common/defrag +1
-0@@ -6,6 +6,10 @@ _require_defrag() { + # Defragmentation is not supported on DAX-enabled filesystems
I think this comment is not needed as _notrun explains it already
Quoted 9 lines
common/defrag +3
-0+ if echo "$MOUNT_OPTIONS" | grep -qw "dax"; then + _notrun "Defragmentation not supported on DAX-enabled filesystem" + fi case "$FSTYP" in xfs) # xfs_fsr does preallocates, require "falloc"Signature · 1 line
2.45.1
Quoted 16 lines · Disha Goel
Online defragmentation is not supported on DAX-enabled filesystems because DAX bypasses the page cache required for defrag operations.
Add check in
_require_defrag()to skip tests when DAX is enabled, avoiding false failures on ext4/301-304, ext4/308 and generic/018.Signed-off-by Disha Goel <[email protected]>--- common/defrag | 4 ++++ 1 file changed, 4 insertions(+)common/defrag +0
-0
common/defrag line 12
Quoted 7 lines
common/defrag +4
-0@@ -6,6 +6,10 @@ _require_defrag() { + # Defragmentation is not supported on DAX-enabled filesystems + if echo "$MOUNT_OPTIONS" | grep -qw "dax"; then + _notrun "Defragmentation not supported on DAX-enabled filesystem" + fi
Defrag doesn't work on XFS on DAX as well? It seems to work fine on my VMs...
<confused>
--D
Quoted 7 lines
common/defrag +0
-0case "$FSTYP" in xfs) # xfs_fsr does preallocates, require "falloc"Signature · 1 line
2.45.1
Quoted 18 lines · Darrick J. Wong
Quoted 17 lines · Disha Goel
Online defragmentation is not supported on DAX-enabled filesystems because DAX bypasses the page cache required for defrag operations.
Add check in
_require_defrag()to skip tests when DAX is enabled, avoiding false failures on ext4/301-304, ext4/308 and generic/018.Signed-off-by Disha Goel <[email protected]>--- common/defrag | 4 ++++ 1 file changed, 4 insertions(+)common/defrag +0
-0@@ -6,6 +6,10 @@
Quoted 10 lines
common/defrag line 12
Quoted 6 lines
common/defrag +4
-0_require_defrag() { + # Defragmentation is not supported on DAX-enabled filesystems + if echo "$MOUNT_OPTIONS" | grep -qw "dax"; then + _notrun "Defragmentation not supported on DAX-enabled filesystem" + fiDefrag doesn't work on XFS on DAX as well? It seems to work fine on my VMs...
Thank you for pointing this out. You're right — I missed that xfs defrag works fine with dax.
I'll fix this in v2 to only skip for ext4.
Quoted 11 lines
<confused>
--D
Quoted 7 lines
common/defrag +0
-0case "$FSTYP" in xfs) # xfs_fsr does preallocates, require "falloc"Signature · 1 line
2.45.1
Signature · 2 lines
Regards, Disha
Quoted 24 lines · Ojaswin Mujoo
Quoted 7 lines · Disha Goel
Online defragmentation is not supported on DAX-enabled filesystems because DAX bypasses the page cache required for defrag operations.
Add check in
_require_defrag()to skip tests when DAX is enabled, avoiding false failures on ext4/301-304, ext4/308 and generic/018.Signed-off-by Disha Goel <[email protected]>Looks good Disha, feel free to add:
Reviewed-by Ojaswin Mujoo <[email protected]>One small comment:
Quoted 10 lines
--- common/defrag | 4 ++++ 1 file changed, 4 insertions(+)common/defrag +0
-0@@ -6,6 +6,10 @@
Quoted 5 lines
common/defrag line 9
Quoted 3 lines
common/defrag +1
-0_require_defrag() { + # Defragmentation is not supported on DAX-enabled filesystemsI think this comment is not needed as
_notrunexplains it already
Thanks, I'll fix this in v2.
Quoted 10 lines
Quoted 10 lines
common/defrag +3
-0+ if echo "$MOUNT_OPTIONS" | grep -qw "dax"; then + _notrun "Defragmentation not supported on DAX-enabled filesystem" + fi case "$FSTYP" in xfs) # xfs_fsr does preallocates, require "falloc"Signature · 1 line
2.45.1
Signature · 2 lines
Regards, Disha