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

Cyril Hrubis <[email protected]>
Newsgroups gmane.linux.ltp
Message-ID <[email protected]>
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
[email protected]

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.