|
|
14809d |
From 7e8275f8939988f18f9a4a596381ca215fde2270 Mon Sep 17 00:00:00 2001
|
|
|
14809d |
From: Eric Sandeen <sandeen@redhat.com>
|
|
|
14809d |
Date: Mon, 4 Nov 2019 15:35:49 -0500
|
|
|
14809d |
Subject: [PATCH] xfs_growfs: allow mounted device node as argument
|
|
|
14809d |
|
|
|
14809d |
Up until:
|
|
|
14809d |
|
|
|
14809d |
b97815a0 xfs_growfs: ensure target path is an active xfs mountpoint
|
|
|
14809d |
|
|
|
14809d |
xfs_growfs actually accepted a mounted block device name as the
|
|
|
14809d |
primary argument, because it could be found in the mount table.
|
|
|
14809d |
|
|
|
14809d |
It turns out that Ansible was making use of this undocumented behavior,
|
|
|
14809d |
and it's trivial to allow it, so put it back in place and document
|
|
|
14809d |
it this time.
|
|
|
14809d |
|
|
|
14809d |
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
|
|
|
14809d |
Reviewed-by: Christoph Hellwig <hch@lst.de>
|
|
|
14809d |
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
|
|
|
14809d |
---
|
|
|
14809d |
growfs/xfs_growfs.c | 3 +++
|
|
|
14809d |
man/man8/xfs_growfs.8 | 10 +++++++++-
|
|
|
14809d |
2 files changed, 12 insertions(+), 1 deletion(-)
|
|
|
14809d |
|
|
|
14809d |
diff --git a/growfs/xfs_growfs.c b/growfs/xfs_growfs.c
|
|
|
14809d |
index eab15984..6c62833b 100644
|
|
|
14809d |
--- a/growfs/xfs_growfs.c
|
|
|
14809d |
+++ b/growfs/xfs_growfs.c
|
|
|
14809d |
@@ -141,6 +141,9 @@ main(int argc, char **argv)
|
|
|
14809d |
}
|
|
|
14809d |
|
|
|
14809d |
fs = fs_table_lookup_mount(rpath);
|
|
|
14809d |
+ if (!fs)
|
|
|
14809d |
+ fs = fs_table_lookup_blkdev(rpath);
|
|
|
14809d |
+
|
|
|
14809d |
if (!fs) {
|
|
|
14809d |
fprintf(stderr, _("%s: %s is not a mounted XFS filesystem\n"),
|
|
|
14809d |
progname, argv[optind]);
|
|
|
14809d |
diff --git a/man/man8/xfs_growfs.8 b/man/man8/xfs_growfs.8
|
|
|
14809d |
index 7e6a387c..60a88189 100644
|
|
|
14809d |
--- a/man/man8/xfs_growfs.8
|
|
|
14809d |
+++ b/man/man8/xfs_growfs.8
|
|
|
14809d |
@@ -35,7 +35,12 @@ xfs_growfs \- expand an XFS filesystem
|
|
|
14809d |
.B \-R
|
|
|
14809d |
.I size
|
|
|
14809d |
]
|
|
|
14809d |
+[
|
|
|
14809d |
.I mount-point
|
|
|
14809d |
+|
|
|
|
14809d |
+.I block-device
|
|
|
14809d |
+]
|
|
|
14809d |
+
|
|
|
14809d |
.br
|
|
|
14809d |
.B xfs_growfs \-V
|
|
|
14809d |
.SH DESCRIPTION
|
|
|
14809d |
@@ -45,7 +50,10 @@ expands an existing XFS filesystem (see
|
|
|
14809d |
The
|
|
|
14809d |
.I mount-point
|
|
|
14809d |
argument is the pathname of the directory where the filesystem
|
|
|
14809d |
-is mounted. The filesystem must be mounted to be grown (see
|
|
|
14809d |
+is mounted. The
|
|
|
14809d |
+.I block-device
|
|
|
14809d |
+argument is the device name of a mounted XFS filesystem.
|
|
|
14809d |
+The filesystem must be mounted to be grown (see
|
|
|
14809d |
.BR mount (8)).
|
|
|
14809d |
The existing contents of the filesystem are undisturbed, and the added space
|
|
|
14809d |
becomes available for additional file storage.
|
|
|
14809d |
--
|
|
|
14809d |
2.17.0
|
|
|
14809d |
|