]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs_repair: check free space requirements before allowing upgrades
authorDarrick J. Wong <djwong@kernel.org>
Mon, 29 Jul 2024 23:23:19 +0000 (16:23 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:01:10 +0000 (17:01 -0700)
commit1bb554e3bb768728d078b7b46f75a2f54adf2334
treedfb21aba78aae8e46012700c55938631db388e0d
parent84e248f3e83f36388a52b350acb06115de61dda3
xfs_repair: check free space requirements before allowing upgrades

Currently, the V5 feature upgrades permitted by xfs_repair do not affect
filesystem space usage, so we haven't needed to verify the geometry.

However, this will change once we start to allow the sysadmin to add new
metadata indexes to existing filesystems.  Add all the infrastructure we
need to ensure that there's enough space for metadata space reservations
and per-AG reservations the next time the filesystem will be mounted.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
[david: Recompute transaction reservation values; Exit with error if upgrade fails]
Signed-off-by: Dave Chinner <david@fromorbit.com>
[djwong: Refuse to upgrade if any part of the fs has < 10% free]
Reviewed-by: Christoph Hellwig <hch@lst.de>
include/libxfs.h
repair/phase2.c