]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: allow single bulkstat of special inodes
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 14 Aug 2019 22:05:17 +0000 (18:05 -0400)
committerEric Sandeen <sandeen@redhat.com>
Wed, 14 Aug 2019 22:05:17 +0000 (18:05 -0400)
commit6d739937ae648de59cb236098dfffa1c3c6d097e
tree1182728d51806a63347d5f69e918f68442544e75
parent55bcd62d06fa33d8c99bdc58c57f6dd313b6220b
xfs: allow single bulkstat of special inodes

Source kernel commit: bf3cb394479210a9ebcf8fef7a7f8fcabc7b9928

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: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Allison Collins <allison.henderson@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_fs.h