Linux Test Project
 help / color / mirror / Atom feed
From: "xuyang2018.jy@fujitsu.com" <xuyang2018.jy@fujitsu.com>
To: Petr Vorel <pvorel@suse.cz>
Cc: "ltp@lists.linux.it" <ltp@lists.linux.it>,
	"martin.doucha@suse.com" <martin.doucha@suse.com>
Subject: Re: [LTP] quotactl0{2, 3, 5, 7}.c dependency problems on older kernels
Date: Fri, 18 Mar 2022 03:16:45 +0000	[thread overview]
Message-ID: <6233F9CA.7060207@fujitsu.com> (raw)
In-Reply-To: <YjN+hsHidEX0ivoX@pevik>

Hi Petr
> Hi Xu,
>
> actually quotactl0{2,3,5,7}.c and quotactl03.c fail on only on v4.5:
>
> tst_kconfig.c:82: TINFO: Parsing kernel config '/.config'
> tst_device.c:88: TINFO: Found free device 0 '/dev/loop0'
> tst_test.c:996: TINFO: Formatting /dev/loop0 with xfs opts='' extra opts=''
> [  271.093416] XFS (loop0): Superblock has unknown read-only compatible features (0x4) enabled.
> [  271.096902] XFS (loop0): Attempted to mount read-only compatible filesystem read-write.
> [  271.100128] XFS (loop0): Filesystem can only be safely mounted read only.
> [  271.101852] XFS (loop0): SB validate failed with error -22.
> tst_test.c:1010: TBROK: mount(/dev/loop0, mntpoint, xfs, 0, 0x41d6a0) failed: EINVAL (22)
That is because you use a newer xfsprogs (it provides newer mkfs.xfs and 
enable reflink feature by default[1]). But older kernel can't regcozine 
this feature bits[2](it supports reflink feature bits since kernel 
4.9-rc1), then mount failed.

[1]https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?id=ec1b42e6d58dcb7cfc5de6fc825832944997e176
[2]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=f0ec1b8ef11df0a51954df7e3ff3ca4aadb0d34b

I don't think this is a problem, user should know its kernel version
and xfsprogs vesion. Linux distribution has sloved this well except you 
used yourself compiled kernel.

>
> Tested on config:
> grep -e QUOTA -e QFMT /.config
> CONFIG_XFS_QUOTA=y
> CONFIG_QUOTA=y
> CONFIG_QUOTA_NETLINK_INTERFACE=y
> # CONFIG_PRINT_QUOTA_WARNING is not set
> # CONFIG_QUOTA_DEBUG is not set
> CONFIG_QUOTA_TREE=y
> # CONFIG_QFMT_V1 is not set
> CONFIG_QFMT_V2=y
> CONFIG_QUOTACTL=y
> CONFIG_QUOTACTL_COMPAT=y
>
> But not work either on v4.10:
> [  299.235456] XFS (loop0): EXPERIMENTAL reflink feature enabled. Use at your own risk!
> [  299.239463] XFS (loop0): Mounting V5 Filesystem
> [  299.240950] XFS (loop0): Log size 1368 blocks too small, minimum size is 1580 blocks
In xfstests, we use -lsize parameter[3] or use a value then get the 
correct value from error log[4]. reflink feature will increase log 
size[5], so we can disable reflink feature by using mkfs.xfs -m 
reflink=0 /dev/loop0 (it also need mkfs.xfs support, so we may need a 
mkfs.xfs cmd version check[5], if meet this version, use mkfs.xfs -m 
reflink=0, if less than this version, we can ignore this version and 
don't use mkfs.xfs extra option).

Firstly, can you try mkfs.xfs -m reflink=0 way whether fix these  two 
problems?


[3]https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/commit/?id=7e07c4bebb08414ca8228ea91bdf57828fd4d110
[4]https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/tree/common/xfs#n81
[5]https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?id=a5132d9b3634fb6436d1f06642ceda82e64ea2f5

Best Regards
Yang Xu
> [  299.243357] XFS (loop0): AAIEEE! Log failed size checks. Abort!
> [  299.245183] XFS (loop0): log mount failed
> quotactl07.c:58: TBROK: mount(/dev/loop0, mntpoint, xfs, 0, 0x41d054) failed: EINVAL (22)
>
> (the same config)
>
> Tests use:
>
> all:
> .mntpoint = MNTPOINT,
>
> quotactl02.c
> .mnt_data = "usrquota,grpquota",
>
> quotactl03.c
> .mnt_data = "usrquota",
>
> quotactl05.c
> .mnt_data = "prjquota"
>
> quotactl07.c does no specific .mnt_data.
> but had .mnt_data = "usrquota" till recently - removed in
> eb1cd3e922 ("syscalls/quotactl07: Refactor this case")
>
> I guess newer kernel is needed.
> But checking usrquota for XFS it has "always" been there - added in
> a67d7c5f5d25 ("[XFS] Move platform specific mount option parse out of core XFS code")
> in v2.6.25-rc1
>
> Kind regards,
> Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-03-18  3:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-17 18:31 [LTP] quotactl0{2,3,5,7}.c dependency problems on older kernels Petr Vorel
2022-03-18  3:16 ` xuyang2018.jy [this message]
2022-03-18  3:44   ` [LTP] quotactl0{2, 3, 5, 7}.c " xuyang2018.jy
2022-03-18 12:23     ` Petr Vorel
2022-03-18  8:51   ` Petr Vorel
2022-03-18  9:26     ` xuyang2018.jy
2022-03-18  9:59       ` Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6233F9CA.7060207@fujitsu.com \
    --to=xuyang2018.jy@fujitsu.com \
    --cc=ltp@lists.linux.it \
    --cc=martin.doucha@suse.com \
    --cc=pvorel@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox