[CRIU] [RFC] FSTYPE__UNSUPPORTED/AUTO && non-virtual filesystems

Oleg Nesterov oleg at redhat.com
Tue Mar 31 04:53:51 PDT 2015


Pavel,

Our discussion with Christopher was a bit confusing and off-topic.
Could you please comment this hack? I mostly mean the problem, not
the change itself.

Please ignore the note about --ignore-this-mountpoint, this is
another thing.

On 03/28, Oleg Nesterov wrote:
>
> On 03/27, Oleg Nesterov wrote:
> >
> > I tried to dump/restore the dummy (/bin/sleep actually) application
> > running in unshared mnt namespace. Dump/Restore fails because a lot
> > of filesystems are FSTYPE__UNSUPPORTED: xfs, hugetlbfs, autofs, configfs,
> > selinuxfs.
> >
> > OK, lets forget about xfs for the moment.
> 
> Now lets return to xfs.
> 
> It is FSTYPE__UNSUPPORTED too, and restore obviously fails even if I
> turn it into FSTYPE__AUTO via command line. Because resolve_source()
> insists on kdev_major() == 0.
> 
> Can't we relax this check? Just try to use mi->source "optimistically" ?
> At least for FSTYPE__AUTO ?
> 
> I understand that the patch below is not what we really want. And I
> have to admit that I do not really understand all implications. But
> perhaps something like this simple make sense anyway? Again, if the
> user does (say) "--xxx xfs" he should know what it does...
> 
> With this hack I can finally dump/restore the application running with
> unshared mnt ns on rhel-7 without unmounting /boot.
> 
> BUT. This makes me think again that we do want --ignore-this-mountpoint
> option. Why not? And afaics trivial to implement. Of course, this will
> be "use at your own risk" too.
> 
> Oleg.
> 
> --- a/mount.c
> +++ b/mount.c
> @@ -1392,6 +1392,15 @@ static char *resolve_source(struct mount_info *mi)
>  		 */
>  		return mi->source;
>  
> +	if (mi->fstype->code == FSTYPE__AUTO) {
> +		struct stat st;
> +
> +		if (!stat(mi->source, &st) && S_ISBLK(st.st_mode) &&
> +		    major(st.st_rdev) == kdev_major(mi->s_dev) &&
> +		    minor(st.st_rdev) == kdev_minor(mi->s_dev))
> +			return mi->source;
> +	}
> +
>  	pr_err("No device for %s mount\n", mi->mountpoint);
>  	return NULL;
>  }



More information about the CRIU mailing list