• Stanislav Kinsburskiy's avatar
    autofs: show pipe inode in mount options · c83aa55d
    Stanislav Kinsburskiy authored
    This is required for CRIU (Checkpoint Restart In Userspace) to migrate a
    mount point when write end in user space is closed.
    
    Below is a brief description of the problem.
    
    To migrate a non-catatonic autofs mount point, one has to restore the
    control pipe between kernel and autofs master process.
    
    One of the autofs masters is systemd, which closes pipe write end after
    passing it to the kernel with mount call.
    
    To be able to restore the systemd control pipe one has to know which
    read pipe end in systemd corresponds to the write pipe end in the
    kernel.  The pipe "fd" in mount options is not enough because it was
    closed and probably replaced by some other descriptor.
    
    Thus, some other attribute is required to be able to find the read pipe
    end.  The best attribute to use to find the correct pipe end is inode
    number becuase it's unique for the whole system and can't be reused
    while the autofs mount exists.
    
    This attribute can also be used to recognize a situation where an autofs
    mount has no master (no process with specified "pgrp" or no file
    descriptor with "pipe_ino", specified in autofs mount options).
    Signed-off-by: default avatarStanislav Kinsburskiy <skinsbursky@virtuozzo.com>
    Signed-off-by: default avatarIan Kent <raven@themaw.net>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    c83aa55d
inode.c 8.72 KB