• Oleg Nesterov's avatar
    introduce --skip-mnt cli option · eb518936
    Oleg Nesterov authored
    Which obviously can be used to "ignore" the mounts we do not want or
    need to dump. The user should know what he does.
    
    Note: this patch changes parse_mountinfo() to check should_skip_mount().
    This is because imo we want to filter out the unwanted mounts asap, af
    if they do not exist. This increases the chances the dumping will fail
    if something else depends on this mount. Say, another mountpoint or an
    opened file.
    
    Perhaps it makes sense to teach should_skip_mount() to use fnmatch()
    and/or look at the optional "(fs|mnt)=" prefix to skip by fsname too.
    
    To me it would be better to force the user of this option to understand
    what it does. Say, if "dump" fails because the child mount can't find
    the skipped parent, he should add another --skip-mnt option or do not
    dump. Otherwise, if we do this automagically the user can probably be
    surpised, he might even miss the fact that we skip more than he asked.
    Signed-off-by: 's avatarOleg Nesterov <oleg@redhat.com>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    eb518936
proc_parse.c 39.7 KB