On Thu, Jan 16, 2025 at 04:07:44PM -0600, Eric Sandeen wrote: > On 1/16/25 1:08 PM, Al Viro wrote: > > On Thu, Jan 16, 2025 at 12:49:32PM -0600, Eric Sandeen wrote: > > > >> + switch (opt) { > >> + case Opt_type: > >> + if (reconfigure && > >> + (ctx->mount_options & UFS_MOUNT_UFSTYPE) != result.uint_32) { > >> + pr_err("ufstype can't be changed during remount\n"); > >> + return -EINVAL; > >> } > >> + ufs_clear_opt(ctx->mount_options, UFS_MOUNT_UFSTYPE); > >> + ufs_set_opt(ctx->mount_options, result.uint_32); > >> + break; > > > > Do we really want to support ufstype=foo,ufstype=bar? > > well, we already do that today. Old code was: > > switch (token) { > case Opt_type_old: > ufs_clear_opt (*mount_options, UFSTYPE); > ufs_set_opt (*mount_options, UFSTYPE_OLD); > break; > case Opt_type_sunx86: > ufs_clear_opt (*mount_options, UFSTYPE); > ufs_set_opt (*mount_options, UFSTYPE_SUNx86); > break; > ... > > so I was going for a straight conversion for now so that the behavior > was exactly the same (i.e. keep the last-specified type. I know, it's > weird, who would do that? Still. Don't break userspace? And we've been > burned before.) FWIW, see viro/vfs.git #work.ufs - separating ufs flavour and on-error flags, dealing with -o ufstype conflicts, then your patch ported on top of that.