[LTP] [PATCH] refluxfs: Check kernel reflink support before mount

Cyril Hrubis chrubis@suse.cz
Thu Aug 13 16:15:46 CEST 2026


Hi!
> > @@ -993,9 +993,15 @@ int safe_mount(const char *file, const int lineno, void (*cleanup_fn)(void),
> >   			"mount.%s failed with %i", filesystemtype, rval);
> >   		return -1;
> >   	} else if (rval == -1) {
> > -		tst_brkm_(file, lineno, TBROK | TERRNO, cleanup_fn,
> > -			"mount(%s, %s, %s, %lu, %p) failed", source, target,
> > -			filesystemtype, mountflags, data);
> > +		if (errno == EOPNOTSUPP) {
> > +			tst_brkm_(file, lineno, TCONF | TERRNO, cleanup_fn,
> > +				"mount(%s, %s, %s, %lu, %p) failed with EOPNOTSUPP", source, target,
> > +				filesystemtype, mountflags, data);
> > +		} else {
> > +			tst_brkm_(file, lineno, TBROK | TERRNO, cleanup_fn,
> > +				"mount(%s, %s, %s, %lu, %p) failed", source, target,
> > +				filesystemtype, mountflags, data);
> > +		}
> >   	} else {
> >   		tst_brkm_(file, lineno, TBROK | TERRNO, cleanup_fn,
> >   			"Invalid mount(%s, %s, %s, %lu, %p) return value %d",
> 
> Hi,
> yes, but I think it'd be better to add a setting to struct tst_test to 
> enable this TCONF check only for specific tests. By default, EOPNOTSUPP 
> should still trigger TBROK.
> 
> Something like:
> .mount_check_support = 1

Shoudn't that be per filesystem and live in tst_fs structure?

Either way we will need a flag to the safe_mount() added first...

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list