Re: [PATCH V2] xfs_admin: revert online label setting ability

Dave Chinner
2020-03-03T01:18:13Z

On Mon, Mar 02, 2020 at 08:35:02AM -0600, Eric Sandeen wrote:
> "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>
> ---

Looks fine, I understand why now :)

Reviewed-by: Dave Chinner <dchinner@redhat.com>