Skip to content
  • Darrick J. Wong's avatar
    xfs: allow single bulkstat of special inodes · bf3cb394
    Darrick J. Wong authored
    
    
    Create a new bulk ireq flag that enables userspace to ask us for a
    special inode number instead of interpreting @ino as a literal inode
    number.  This enables us to query the root inode easily.
    
    The reason for adding the ability to query specifically the root
    directory inode is that certain programs (xfsdump and xfsrestore) want
    to confirm when they've been pointed to the root directory.  The
    userspace code assumes the root directory is always the first result
    from calling bulkstat with lastino == 0, but this isn't true if the
    (initial btree roots + initial AGFL + inode alignment padding) is itself
    long enough to be allocated to new inodes if all of those blocks should
    happen to be free at the same time.  Rather than make userspace guess
    at internal filesystem state, we provide a direct query.
    
    Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
    Reviewed-by: default avatarAllison Collins <allison.henderson@oracle.com>
    Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
    bf3cb394