Re: [PATCH v3] btrfs-progs: add verbose option to btrfs device scan

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

 



On 10/8/19 1:41 AM, David Sterba wrote:
On Wed, Oct 02, 2019 at 12:11:52PM +0800, Anand Jain wrote:
To help debug device scan issues, add verbose option to btrfs device scan.

The common options like --verbose are going to be added into the global
command so I'd rather avoid adding them to new subcommands as this would
become unnecessary compatibility issue.

There's an pattern to follow, the output formats (--format). So add a
definition for global verbosity options, add new GETOPT_VAL global enum
values that do not clash with existing options, add relevant
HELPINFO_INSERT_ text string and use it in commands where needed.


 IMO a debug option should rather be at the top level command.
 If verbose is the top level it would emit a lot of unwanted messages.
 Here is how a user is using --verbose option in dev scan.


https://lore.kernel.org/linux-btrfs/2daf15de-d1e7-b56a-be51-a6a3062ad28a@xxxxxxxxxx/T/#t

------------
useful to get the list of devices it finds.
------------

 OR I didn't get the whole idea here. Looks like you are suggesting
 something like

  btrfs --verbose device scan
  btrfs --verbose subvolume list <mnt>
  ::

 How does the user will know if a subcommand will have any verbose
 or not?

 How would you not emit unwanted messages and keep the output clutter
 free.


Thanks, Anand



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux