• Daniil Lunev's avatar
    vfs: function to prevent re-use of block-device-based superblocks · 04b94071
    Daniil Lunev authored
    The function is to be called from filesystem-specific code to mark a
    superblock to be ignored by superblock test and thus never re-used.  The
    function also unregisters bdi if the bdi is per-superblock to avoid
    collision if a new superblock is created to represent the filesystem.
    generic_shutdown_super() skips unregistering bdi for a retired superlock as
    it assumes retire function has already done it.
    
    This patch adds the functionality only for the block-device-based supers,
    since the primary use case of the feature is to gracefully handle force
    unmount of external devices, mounted with FUSE.  This can be further
    extended to cover all superblocks, if the need arises.
    Signed-off-by: default avatarDaniil Lunev <dlunev@chromium.org>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
    04b94071
super.c 46.5 KB