]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs_db: use uncached buffer reads to get the superblock
authorDarrick J. Wong <darrick.wong@oracle.com>
Sun, 1 Mar 2020 17:34:10 +0000 (12:34 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Sun, 1 Mar 2020 17:34:10 +0000 (12:34 -0500)
commita0846242747018db73abc2a57d7362aad36240f5
tree650ecbb1c0053b6709115f3c4cb90acfef525129
parent3f8a028ede974bfa2eb3b55df44be600b4d09198
xfs_db: use uncached buffer reads to get the superblock

Upon startup, xfs_db needs to check if it is even looking at an XFS
filesystem, and it needs the AG 0 superblock contents to initialize the
incore mount.  We cannot know the filesystem sector size until we read
the superblock, but we also do not want to introduce aliasing in the
buffer cache.  Convert this code to the new uncached buffer read API so
that we can stop open-coding it.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
db/init.c