Skip to content
  • Hanna Reitz's avatar
    eba8b096
    virtiofsd: Store every lo_inode's parent_dev · eba8b096
    Hanna Reitz authored
    
    
    We want to detect mount points in the shared tree.  We report them to
    the guest by setting the FUSE_ATTR_SUBMOUNT flag in fuse_attr.flags, but
    because the FUSE client will create a submount for every directory that
    has this flag set, we must do this only for the actual mount points.
    
    We can detect mount points by comparing a directory's st_dev with its
    parent's st_dev.  To be able to do so, we need to store the parent's
    st_dev in the lo_inode object.
    
    Note that mount points need not necessarily be directories; a single
    file can be a mount point as well.  However, for the sake of simplicity
    let us ignore any non-directory mount points for now.
    
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
    Message-Id: <20200909184028.262297-6-mreitz@redhat.com>
    Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
    Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
    eba8b096
    virtiofsd: Store every lo_inode's parent_dev
    Hanna Reitz authored
    
    
    We want to detect mount points in the shared tree.  We report them to
    the guest by setting the FUSE_ATTR_SUBMOUNT flag in fuse_attr.flags, but
    because the FUSE client will create a submount for every directory that
    has this flag set, we must do this only for the actual mount points.
    
    We can detect mount points by comparing a directory's st_dev with its
    parent's st_dev.  To be able to do so, we need to store the parent's
    st_dev in the lo_inode object.
    
    Note that mount points need not necessarily be directories; a single
    file can be a mount point as well.  However, for the sake of simplicity
    let us ignore any non-directory mount points for now.
    
    Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
    Message-Id: <20200909184028.262297-6-mreitz@redhat.com>
    Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
    Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
Loading