runtime: remove wrong xfs options

"data=ordered" and "errors=remount-ro" are wrong options in xfs.
(they are ext4 options)
<https://manpages.ubuntu.com/manpages/focal/man5/xfs.5.html>

Fixes: #11205

Signed-off-by: Shunsuke Kimura <pbrehpuum@gmail.com>
This commit is contained in:
Shunsuke Kimura
2025-04-29 05:17:47 +09:00
parent b97bc03ecb
commit 62639c861e
3 changed files with 18 additions and 8 deletions

View File

@@ -150,7 +150,11 @@ func GetKernelRootParams(rootfstype string, disableNvdimm bool, dax bool) ([]Par
kernelRootParams = append(kernelRootParams, Param{"rootflags", "ro"})
}
case XFS:
fallthrough
if dax {
kernelRootParams = append(kernelRootParams, Param{"rootflags", "dax ro"})
} else {
kernelRootParams = append(kernelRootParams, Param{"rootflags", "ro"})
}
// EXT4 filesystem is used by default.
case EXT4:
if dax {

View File

@@ -64,7 +64,7 @@ func TestGetKernelRootParams(t *testing.T) {
rootfstype: string(XFS),
expected: []Param{
{"root", string(Nvdimm)},
{"rootflags", "data=ordered,errors=remount-ro ro"},
{"rootflags", "ro"},
{"rootfstype", string(XFS)},
},
disableNvdimm: false,
@@ -75,7 +75,7 @@ func TestGetKernelRootParams(t *testing.T) {
rootfstype: string(XFS),
expected: []Param{
{"root", string(Nvdimm)},
{"rootflags", "dax,data=ordered,errors=remount-ro ro"},
{"rootflags", "dax ro"},
{"rootfstype", string(XFS)},
},
disableNvdimm: false,
@@ -86,7 +86,7 @@ func TestGetKernelRootParams(t *testing.T) {
rootfstype: string(XFS),
expected: []Param{
{"root", string(VirtioBlk)},
{"rootflags", "data=ordered,errors=remount-ro ro"},
{"rootflags", "ro"},
{"rootfstype", string(XFS)},
},
disableNvdimm: true,