* [PATCH v1] common/rc: not run swapfile test for DAX
@ 2021-04-17 16:46 xifeng
2021-04-17 16:54 ` Darrick J. Wong
0 siblings, 1 reply; 3+ messages in thread
From: xifeng @ 2021-04-17 16:46 UTC (permalink / raw)
To: fstests; +Cc: xifeng, root
From: root <root@hp-dl385pg8-01.rhts.eng.pek2.redhat.com>
DAX doesn't support swapfile. Without this patch,
_require_scratch_swapfile always returns fail for fsdax. Now
change to notrun.
Signed-off-by: root <root@hp-dl385pg8-01.rhts.eng.pek2.redhat.com>
---
common/rc | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/common/rc b/common/rc
index 23f86ce6..d02b9f72 100644
--- a/common/rc
+++ b/common/rc
@@ -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
;;
*)
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1] common/rc: not run swapfile test for DAX
2021-04-17 16:46 [PATCH v1] common/rc: not run swapfile test for DAX xifeng
@ 2021-04-17 16:54 ` Darrick J. Wong
2021-04-23 12:59 ` Xiaoli Feng
0 siblings, 1 reply; 3+ messages in thread
From: Darrick J. Wong @ 2021-04-17 16:54 UTC (permalink / raw)
To: xifeng; +Cc: fstests
On Sat, Apr 17, 2021 at 12:46:55PM -0400, xifeng@redhat.com wrote:
> From: root <root@hp-dl385pg8-01.rhts.eng.pek2.redhat.com>
>
> DAX doesn't support swapfile. Without this patch,
> _require_scratch_swapfile always returns fail for fsdax. Now
> change to notrun.
>
> Signed-off-by: root <root@hp-dl385pg8-01.rhts.eng.pek2.redhat.com>
Who?
> ---
> common/rc | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/common/rc b/common/rc
> index 23f86ce6..d02b9f72 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -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
> + _notrun "swapfiles are not supported"
> + else
> + _fail "swapon failed for $FSTYP"
> + fi
> fi
> ;;
> *)
> --
> 2.27.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] common/rc: not run swapfile test for DAX
2021-04-17 16:54 ` Darrick J. Wong
@ 2021-04-23 12:59 ` Xiaoli Feng
0 siblings, 0 replies; 3+ messages in thread
From: Xiaoli Feng @ 2021-04-23 12:59 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: fstests
Hi,
----- Original Message -----
> From: "Darrick J. Wong" <djwong@kernel.org>
> To: xifeng@redhat.com
> Cc: fstests@vger.kernel.org
> Sent: Sunday, April 18, 2021 12:54:58 AM
> Subject: Re: [PATCH v1] common/rc: not run swapfile test for DAX
>
> On Sat, Apr 17, 2021 at 12:46:55PM -0400, xifeng@redhat.com wrote:
> > From: root <root@hp-dl385pg8-01.rhts.eng.pek2.redhat.com>
> >
> > DAX doesn't support swapfile. Without this patch,
> > _require_scratch_swapfile always returns fail for fsdax. Now
> > change to notrun.
> >
> > Signed-off-by: root <root@hp-dl385pg8-01.rhts.eng.pek2.redhat.com>
>
> Who?
Please ignore it. It's added automatically by my client.
>
> > ---
> > common/rc | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/common/rc b/common/rc
> > index 23f86ce6..d02b9f72 100644
> > --- a/common/rc
> > +++ b/common/rc
> > @@ -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?
Yes, need to consider STATX_ATTR_DAX. I will update it.
Thanks.
>
> --D
>
> > + _notrun "swapfiles are not supported"
> > + else
> > + _fail "swapon failed for $FSTYP"
> > + fi
> > fi
> > ;;
> > *)
> > --
> > 2.27.0
> >
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-04-23 12:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-17 16:46 [PATCH v1] common/rc: not run swapfile test for DAX xifeng
2021-04-17 16:54 ` Darrick J. Wong
2021-04-23 12:59 ` Xiaoli Feng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).