[LTP] [PATCH] Fix ioctl_ficlone on XFS without reflink support

Cyril Hrubis chrubis@suse.cz
Tue Oct 1 13:39:52 CEST 2024


Hi!
> > I suppose that we need to add .mkfs_ver string to the struct tst_fs and
> > possibly .kernel_ver as well so that we can add both checks to the
> > structures as:
> > 
> > 	{
> > 		.type = "xfs",
> > 		.mkfs_ver = ">= 5.1.0",
> > 		.kernel_ver = ">= 4.9.0",
> > 		...
> > 	}
> 
> It'd be simpler to add .skip_if_unsupported flag to struct tst_fs and 
> then simply TCONF the single filesystem if mount() returns EOPNOTSUPP. 
> That way we don't need hardcoded version checks for the kernel. MKFS 
> versions checks would still be needed, though.

That's not a 100% correct either, with that we will not catch if the
functionality was disabled in the kernel by a mistake.

So I think that we need:

- minimal kernel version where the functionality was added in upstream
  in the tst_fs structure
- try to mount the fs
- if we get EOPNOTSUPP and current kernel is older than the minimal
  version report TCONF
- otherwise report TFAIL

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list