Skip to content

Rework output of btrfs subvolume list #515

Open
@kdave

Description

@kdave

The current output of subvolume listing is ancient and the command also available only to the root user (using the search ioctl). We have the user accessible ioctls available and can use them but there's a backward compatibility issue. The command could be (and likely is) used in scripts, that eg. people use for backups, so changing the output will have an impact and potentially a bad one.

Nevertheless, we want to let users to list the subvolumes and also improve the output formatting. The compatibility options:

  1. no backward compatibility, rework the output, command available for user and root giving the same output
  2. half compatibility, when command is run as user the output will be new, while for root it will be the old one unchanged
  3. full compatibility but old output, adding support for user listiging but keeping the output
  4. add a new completely new command (eg. 'ls') without any compatibility issues but at some usability cost

Proposed changes:

  • drop 'top level' from the output, it's not useful and is confused with parent subvolume
  • default to tabular output
  • columns: id, generation, flags, path
    • flags are not just readonly, but subvolume (u), snapshot (s), read-only (r), writable (w), send timestamp set (S), received subvolume (R), and maybe something related to qgroups
  • additional size information, generations, uuid etc can be optional

Compatibility is a separate problem and the output can be prepared independently in another command available in the experimental mode so we can get some feedback.

Related projects:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions