linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [WIP] [RFC PATCH] xfs_growfs: allow shrinking unused space in the last AG
@ 2020-10-28 11:40 Gao Xiang
  2021-03-24 17:32 ` Darrick J. Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Gao Xiang @ 2020-10-28 11:40 UTC (permalink / raw)
  To: linux-xfs; +Cc: Gao Xiang

This allows shrinking operation can pass into kernel.

Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
---
preliminary version.

 growfs/xfs_growfs.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/growfs/xfs_growfs.c b/growfs/xfs_growfs.c
index a68b515d..d45ba703 100644
--- a/growfs/xfs_growfs.c
+++ b/growfs/xfs_growfs.c
@@ -246,12 +246,11 @@ main(int argc, char **argv)
 			error = 1;
 		}
 
-		if (!error && dsize < geo.datablocks) {
-			fprintf(stderr, _("data size %lld too small,"
-				" old size is %lld\n"),
+		if (!error && dsize < geo.datablocks)
+			fprintf(stderr,
+_("[EXPERIMENTAL] try to shrink unused space %lld, old size is %lld\n"),
 				(long long)dsize, (long long)geo.datablocks);
-			error = 1;
-		} else if (!error &&
+		if (!error &&
 			   dsize == geo.datablocks && maxpct == geo.imaxpct) {
 			if (dflag)
 				fprintf(stderr, _(
-- 
2.18.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-25  0:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-28 11:40 [WIP] [RFC PATCH] xfs_growfs: allow shrinking unused space in the last AG Gao Xiang
2021-03-24 17:32 ` Darrick J. Wong
2021-03-25  0:44   ` Gao Xiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).