[PATCH v1] xfs_growfs: Allow shrink of realtime XFS

Nirjhar Roy (IBM)
2026-02-19T06:08:57Z

From: "Nirjhar Roy (IBM)" <nirjhar.roy.lists@gmail.com>

This patch allows shrinking of realtime XFS ioctl to be
passed to the kernel.

Signed-off-by: Nirjhar Roy (IBM) <nirjhar.roy.lists@gmail.com>
---
growfs/xfs_growfs.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/growfs/xfs_growfs.c b/growfs/xfs_growfs.c
index 0d0b2ae3..18174ea2 100644
--- a/growfs/xfs_growfs.c
+++ b/growfs/xfs_growfs.c
@@ -296,11 +296,12 @@ _("[EXPERIMENTAL] try to shrink unused space %lld, old size is %lld\n"),
error = 1;
}
if (!error && rsize < geo.rtblocks) {
- fprintf(stderr, _(
- "realtime size %lld too small, old size is %lld\n"),
+ fprintf(stderr,
+_("[EXPERIMENTAL] try to shrink realtime unused space %lld, old size is %lld\n"),
(long long)rsize, (long long)geo.rtblocks);
- error = 1;
- } else if (!error && rsize == geo.rtblocks) {
+ }
+
+ if (!error && rsize == geo.rtblocks) {
if (rflag)
fprintf(stderr, _(
"realtime size unchanged, skipping\n"));
--
2.34.1