summaryrefslogtreecommitdiff
tag namedefrag-freespace_2022-11-09 (2e4c14acd41357536760e2e8df82e9ea6f11d39f)
tag date2022-11-09 19:10:47 -0800
tagged byDarrick J. Wong <djwong@kernel.org>
tagged objectcommit e936e495ae...
xfs: defragment free space
These patches contain experimental code to enable userspace to defragment the free space in a filesystem. Two purposes are imagined for this functionality: clearing space at the end of a filesystem before shrinking it, and clearing free space in anticipation of making a large allocation. The first patch adds a new fallocate mode that allows userspace to allocate free space from the filesystem into a file. The goal here is to allow the filesystem shrink process to prevent allocation from a certain part of the filesystem while a free space defragmenter evacuates all the files from the doomed part of the filesystem. The second patch amends the online repair system to allow the sysadmin to forcibly rebuild metadata structures, even if they're not corrupt. Without adding an ioctl to move metadata btree blocks, this is the only way to dislodge metadata. Signed-off-by: Darrick J. Wong <djwong@kernel.org> -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEUzaAxoMeQq6m2jMV+H93GTRKtOsFAmNsa7cACgkQ+H93GTRK tOvCYQ//S9t7QkYLRJZ4W5DKp2Y5Nb8bGCVU0OCUQz3QrPhdLw7vwchd2uj7UKUx KfAzsCE8fY0a9r9N6EAZTt+LsAFmVjjo3CEMNnZk5ENmFsJ0mJ91k3rR3RogmD+5 0ZlTEJjH9mqvf6vz65dUprkLWgmtLr997rslbQ5YQtYlbW0bieqnCuYhFolbwu2C BIuMdA1VXQ1WZHNoj2WRW6S+2nZg8n47j2Zx6WaDc2Pf4CUZzrEqjOBVLwB6nyAm 9/OfWeUbWKDt9F8G74qPmGJeYf3dsqjDzn9ffzZpAnIRSv4jDo+X+SyRothkyrZq HZ/8LlZlZ++K0VtepqMmP/oRZa7FUPVFW/LpW9E8nYSAbK/NV87GdvhGeJ7QMDM8 91aAVcqbNWSM/Yf23I7g8CjBiN2Y3/RA7X1KmFS5Seuv4rpyrtkjqWyqqIeEWUuP 4uBga+ekiCnD0louKEssDqiYxzXLz7BJpppmoAP34BzZoQs+9WNtzEsTGulbFCuK rrSdOpsin8ZUC8r1MNhVRRqniUlrf2OFuTn2PtUOy9Kg6p3n/QmFKCbShl6Yw0vc 4dA0rvLDq5RNAdepV/innz9xpJrErmltFZiCEmwW7d9mF0KSKXhH6Bz0KTk3eLpS XudFj1Itrt6GHNO36ozQPGkj8nNLUQTpYseI13mJz6b1qorf7xg= =m7Je -----END PGP SIGNATURE-----