common/rc: not run swapfile test for DAX
PATCH 1/1 common/rc: not run swapfile test for DAX
From: root <[email protected]>
DAX doesn't support swapfile. Without this patch, _require_scratch_swapfile always returns fail for fsdax. Now change to notrun.
--- common/rc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
common/rc +5 -1
@@ -2384,7 +2384,11 @@ _require_scratch_swapfile() ext2|ext3|ext4|xfs) if ! swapon "$SCRATCH_MNT/swap" >/dev/null 2>&1; then _scratch_unmount - _fail "swapon failed for $FSTYP" + if _normalize_mount_options | egrep -q "dax(=always| |$)"; then + _notrun "swapfiles are not supported" + else + _fail "swapon failed for $FSTYP" + fi fi ;; *)
Signature · 1 line
2.27.0
Quoted 7 lines · On Sat, Apr 17, 2021 at 12:46:55PM -0400, [email protected] wrote:
From: root <[email protected]>
DAX doesn't support swapfile. Without this patch,
_require_scratch_swapfilealways returns fail for fsdax. Now change to notrun.Signed-off-by root <[email protected]>
Who?
Quoted 9 lines
--- common/rc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)common/rc +0
-0
common/rc _require_scratch_swapfile() · line 2387
Quoted 5 lines
common/rc +1
-1@@ -2384,7 +2384,11 @@ _require_scratch_swapfile() ext2|ext3|ext4|xfs) if ! swapon "$SCRATCH_MNT/swap" >/dev/null 2>&1; then _scratch_unmount - _fail "swapon failed for $FSTYP" + if _normalize_mount_options | egrep -q "dax(=always| |$)"; then
Doesn't the STATX_ATTR_DAX test above take care of this?
--D
Quoted 10 lines
common/rc +4
-0+ _notrun "swapfiles are not supported" + else + _fail "swapon failed for $FSTYP" + fi fi ;; *)Signature · 1 line
2.27.0
Hi,
----- Original Message -----
Quoted 9 lines
From: "Darrick J. Wong" <[email protected]>
To: [email protected]
Cc: [email protected]
Sent: Sunday, April 18, 2021 12:54:58 AM
Subject: Re: [PATCH v1] common/rc: not run swapfile test for DAXQuoted 2 lines · On Sat, Apr 17, 2021 at 12:46:55PM -0400, [email protected] wrote:
From: root <[email protected]>
Quoted 7 lines
Quoted 5 lines
DAX doesn't support swapfile. Without this patch,
_require_scratch_swapfilealways returns fail for fsdax. Now change to notrun.Signed-off-by root <[email protected]>Who?
Please ignore it. It's added automatically by my client.
Quoted 5 lines
Quoted 5 lines
--- common/rc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Quoted 12 lines
common/rc _require_scratch_swapfile() · line 2387
Quoted 10 lines
common/rc +1
-1@@ -2384,7 +2384,11 @@ _require_scratch_swapfile() ext2|ext3|ext4|xfs) if ! swapon "$SCRATCH_MNT/swap" >/dev/null 2>&1; then _scratch_unmount - _fail "swapon failed for $FSTYP" + if _normalize_mount_options | egrep -q "dax(=always| |$)"; thenDoesn't the
STATX_ATTR_DAXtest above take care of this?
Yes, need to consider STATX_ATTR_DAX. I will update it.
Thanks.
Quoted 15 lines
--D
Quoted 10 lines
common/rc +4
-1+ _notrun "swapfiles are not supported" + else + _fail "swapon failed for $FSTYP" + fi fi ;; *) --2.27.0