Re: [PATCH] xfs_io: support -c <cmd> without <file> args

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 05, 2016 at 09:04:45AM +0200, Amir Goldstein wrote:
> There is an undocumented and possibly unused feature in xfs_io
> where all commands are executed per file given in the file args list.
> 
> This feature creates ambiguity when trying to execute commands
> such as "open" and "file" from command line.
> 
> When running xfs_io -c <cmd> without any file args, xfs_io exits
> without doing anything. This behavior is undocumented and does not
> make much sense either.
> 
> Change the behavior in the case where no file args are given in
> command line to execute every command exactly once, exactly as if
> the commands where executed from an interactive shell.
> 
> This enables writing proper xfs_io scripts in command line, which
> include "open" and "file" commands.

NACK.

This does not fix any of the underlying problems. It just adds
another WTF case to CLI processing as two things that should be
equivlent now behave differently. i.e.

$ xfs_io -c "open foo" -c "open bar" -c file

and 

$ xfs_io -c "open bar" -c file foo

will have different behaviour, even though the man page says they
should be equivalent and do exactly the same thing.

Fix the underlying problems once and for all: do not hack bandaids
into the code that only hides the symptom for your specific use
case.

-Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux