]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs_admin: revert online label setting ability
authorEric Sandeen <sandeen@sandeen.net>
Tue, 3 Mar 2020 01:38:12 +0000 (20:38 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Tue, 3 Mar 2020 01:38:12 +0000 (20:38 -0500)
commit5896e59eaf07b2da6cb4db030112eb0087aece8a
tree3388f93ec84090ca700132fad47273ffb02fdee1
parentaf60a99861dd2ab53ea2e5db76422f8847039b14
xfs_admin: revert online label setting ability

"xfs_admin can't print both label and UUID for mounted filesystems"
https://bugzilla.kernel.org/show_bug.cgi?id=206429

alerted us to the problem that if /any/ options that use xfs_io get
specified to xfs_admin, they are the /only/ ones that get run:

                # Try making the changes online, if supported
                if [ -n "$IO_OPTS" ] && mntpt="$(find_mntpt_for_arg "$1")"
                then
                        eval xfs_io -x -p xfs_admin $IO_OPTS "$mntpt"
                        test "$?" -eq 0 && exit 0
                fi

and thanks to the exit, the xfs_db operations don't get run at all.

We could move on to the xfs_db commands after executing the xfs_io
commands, but we build them all up in parallel at this time:

        l)      DB_OPTS=$DB_OPTS" -r -c label"
                IO_OPTS=$IO_OPTS" -r -c label"
                ;;

so we'd need to keep track of these, and not re-run them in xfs_db.

Another issue is that prior to this commit, we'd run commands in
command line order.

So I experimented with building up an array of commands, invoking xfs_db
or xfs_io one command at a time as needed for each, and ... it got overly
complicated.

It's broken now, and so far a clean solution isn't evident, and I hate to
leave it broken across another release.  So revert it for now.

Reverts: 3f153e051a ("xfs_admin: enable online label getting and setting")
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
db/xfs_admin.sh
man/man8/xfs_admin.8