#compdef bcachefs

autoload -U is-at-least

_bcachefs() {
    typeset -A opt_args
    typeset -a _arguments_options
    local ret=1

    if is-at-least 5.2; then
        _arguments_options=(-s -S -C)
    else
        _arguments_options=(-s -C)
    fi

    local context curcontext="$curcontext" state line
    _arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_bcachefs_commands" \
"*::: :->bcachefs" \
&& ret=0
    case $state in
    (bcachefs)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
'-m+[]:MODE:(keys formats nodes nodes-ondisk)' \
'--mode=[]:MODE:(keys formats nodes nodes-ondisk)' \
'-b+[Btree to list from]:BTREE: ' \
'--btree=[Btree to list from]:BTREE: ' \
'-k+[Bkey type to list]:BKEY_TYPE: ' \
'--bkey-type=[Bkey type to list]:BKEY_TYPE: ' \
'-l+[Btree depth to descend to (0 == leaves)]:LEVEL: ' \
'--level=[Btree depth to descend to (0 == leaves)]:LEVEL: ' \
'-s+[Start position to list from]:START: ' \
'--start=[Start position to list from]:START: ' \
'-e+[End position]:END: ' \
'--end=[End position]:END: ' \
'-c+[Force color on/off. Default\: autodetect tty]:COLORIZE:(true false)' \
'--colorize=[Force color on/off. Default\: autodetect tty]:COLORIZE:(true false)' \
'-f[Check (fsck) the filesystem first]' \
'--fsck[Check (fsck) the filesystem first]' \
'*-v[Verbose mode]' \
'*--verbose[Verbose mode]' \
'-h[Print help]' \
'--help[Print help]' \
'*::devices:_files' \
&& ret=0
;;
(mount)
_arguments "${_arguments_options[@]}" : \
'-f+[Path to passphrase file]:PASSPHRASE_FILE:_files' \
'--passphrase-file=[Path to passphrase file]:PASSPHRASE_FILE:_files' \
'-k+[Passphrase policy to use in case of an encrypted filesystem. If not specified, the password will be searched for in the keyring. If not found, the password will be prompted or read from stdin, depending on whether the stdin is connected to a terminal or not]:UNLOCK_POLICY:((fail\:"Don'\''t ask for passphrase, if the key cannot be found in the keyring just fail"
wait\:"Wait for passphrase to become available before mounting"
ask\:"Interactively prompt the user for a passphrase"
stdin\:"Try to read the passphrase from \`stdin\` without prompting"))' \
'--key_location=[Passphrase policy to use in case of an encrypted filesystem. If not specified, the password will be searched for in the keyring. If not found, the password will be prompted or read from stdin, depending on whether the stdin is connected to a terminal or not]:UNLOCK_POLICY:((fail\:"Don'\''t ask for passphrase, if the key cannot be found in the keyring just fail"
wait\:"Wait for passphrase to become available before mounting"
ask\:"Interactively prompt the user for a passphrase"
stdin\:"Try to read the passphrase from \`stdin\` without prompting"))' \
'-o+[Mount options]:OPTIONS: ' \
'-t+[]:FS_TYPE: ' \
'--type=[]:FS_TYPE: ' \
'-c+[Force color on/off. Autodetect tty is used to define default\:]:COLORIZE:(true false)' \
'--colorize=[Force color on/off. Autodetect tty is used to define default\:]:COLORIZE:(true false)' \
'*-v[Verbose mode]' \
'*--verbose[Verbose mode]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
':dev -- Device, or UUID=\<UUID\>:' \
'::mountpoint -- Where the filesystem should be mounted. If not set, then the filesystem won'\''t actually be mounted. But all steps preceeding mounting the filesystem (e.g. asking for passphrase) will still be performed:_files' \
&& ret=0
;;
(completions)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':shell:(bash elvish fish powershell zsh)' \
&& ret=0
;;
(subvolume)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_bcachefs__subvolume_commands" \
"*::: :->subvolume" \
&& ret=0

    case $state in
    (subvolume)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-subvolume-command-$line[1]:"
        case $line[1] in
            (create)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::targets -- Paths:_files' \
&& ret=0
;;
(new)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::targets -- Paths:_files' \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::targets -- Path:_files' \
&& ret=0
;;
(del)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::targets -- Path:_files' \
&& ret=0
;;
(snapshot)
_arguments "${_arguments_options[@]}" : \
'-r[Make snapshot read only]' \
'--read-only[Make snapshot read only]' \
'-h[Print help]' \
'--help[Print help]' \
'::source:_files' \
':dest:_files' \
&& ret=0
;;
(snap)
_arguments "${_arguments_options[@]}" : \
'-r[Make snapshot read only]' \
'--read-only[Make snapshot read only]' \
'-h[Print help]' \
'--help[Print help]' \
'::source:_files' \
':dest:_files' \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
'--sort=[Sort order]:SORT:(name size time)' \
'--json[Output as JSON]' \
'-t[Show subvolume tree structure (implies -R)]' \
'--tree[Show subvolume tree structure (implies -R)]' \
'-R[List subvolumes recursively]' \
'--recursive[List subvolumes recursively]' \
'-s[Include snapshot subvolumes]' \
'--snapshots[Include snapshot subvolumes]' \
'--readonly[Only show read-only subvolumes]' \
'-h[Print help]' \
'--help[Print help]' \
':target -- Filesystem (device, mountpoint, or UUID):_files' \
&& ret=0
;;
(ls)
_arguments "${_arguments_options[@]}" : \
'--sort=[Sort order]:SORT:(name size time)' \
'--json[Output as JSON]' \
'-t[Show subvolume tree structure (implies -R)]' \
'--tree[Show subvolume tree structure (implies -R)]' \
'-R[List subvolumes recursively]' \
'--recursive[List subvolumes recursively]' \
'-s[Include snapshot subvolumes]' \
'--snapshots[Include snapshot subvolumes]' \
'--readonly[Only show read-only subvolumes]' \
'-h[Print help]' \
'--help[Print help]' \
':target -- Filesystem (device, mountpoint, or UUID):_files' \
&& ret=0
;;
(list-snapshots)
_arguments "${_arguments_options[@]}" : \
'--sort=[Sort order (flat view only)]:SORT:(name size time)' \
'-f[Show flat list instead of tree]' \
'--flat[Show flat list instead of tree]' \
'--json[Output as JSON]' \
'--readonly[Only show read-only snapshots (flat view only)]' \
'-h[Print help]' \
'--help[Print help]' \
':target -- Filesystem (device, mountpoint, or UUID):_files' \
&& ret=0
;;
(ls-snap)
_arguments "${_arguments_options[@]}" : \
'--sort=[Sort order (flat view only)]:SORT:(name size time)' \
'-f[Show flat list instead of tree]' \
'--flat[Show flat list instead of tree]' \
'--json[Output as JSON]' \
'--readonly[Only show read-only snapshots (flat view only)]' \
'-h[Print help]' \
'--help[Print help]' \
':target -- Filesystem (device, mountpoint, or UUID):_files' \
&& ret=0
;;
(list-snap)
_arguments "${_arguments_options[@]}" : \
'--sort=[Sort order (flat view only)]:SORT:(name size time)' \
'-f[Show flat list instead of tree]' \
'--flat[Show flat list instead of tree]' \
'--json[Output as JSON]' \
'--readonly[Only show read-only snapshots (flat view only)]' \
'-h[Print help]' \
'--help[Print help]' \
':target -- Filesystem (device, mountpoint, or UUID):_files' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_bcachefs__subvolume__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-subvolume-help-command-$line[1]:"
        case $line[1] in
            (create)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(snapshot)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list-snapshots)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(subvol)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_bcachefs__subvolume_commands" \
"*::: :->subvolume" \
&& ret=0

    case $state in
    (subvolume)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-subvolume-command-$line[1]:"
        case $line[1] in
            (create)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::targets -- Paths:_files' \
&& ret=0
;;
(new)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::targets -- Paths:_files' \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::targets -- Path:_files' \
&& ret=0
;;
(del)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::targets -- Path:_files' \
&& ret=0
;;
(snapshot)
_arguments "${_arguments_options[@]}" : \
'-r[Make snapshot read only]' \
'--read-only[Make snapshot read only]' \
'-h[Print help]' \
'--help[Print help]' \
'::source:_files' \
':dest:_files' \
&& ret=0
;;
(snap)
_arguments "${_arguments_options[@]}" : \
'-r[Make snapshot read only]' \
'--read-only[Make snapshot read only]' \
'-h[Print help]' \
'--help[Print help]' \
'::source:_files' \
':dest:_files' \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
'--sort=[Sort order]:SORT:(name size time)' \
'--json[Output as JSON]' \
'-t[Show subvolume tree structure (implies -R)]' \
'--tree[Show subvolume tree structure (implies -R)]' \
'-R[List subvolumes recursively]' \
'--recursive[List subvolumes recursively]' \
'-s[Include snapshot subvolumes]' \
'--snapshots[Include snapshot subvolumes]' \
'--readonly[Only show read-only subvolumes]' \
'-h[Print help]' \
'--help[Print help]' \
':target -- Filesystem (device, mountpoint, or UUID):_files' \
&& ret=0
;;
(ls)
_arguments "${_arguments_options[@]}" : \
'--sort=[Sort order]:SORT:(name size time)' \
'--json[Output as JSON]' \
'-t[Show subvolume tree structure (implies -R)]' \
'--tree[Show subvolume tree structure (implies -R)]' \
'-R[List subvolumes recursively]' \
'--recursive[List subvolumes recursively]' \
'-s[Include snapshot subvolumes]' \
'--snapshots[Include snapshot subvolumes]' \
'--readonly[Only show read-only subvolumes]' \
'-h[Print help]' \
'--help[Print help]' \
':target -- Filesystem (device, mountpoint, or UUID):_files' \
&& ret=0
;;
(list-snapshots)
_arguments "${_arguments_options[@]}" : \
'--sort=[Sort order (flat view only)]:SORT:(name size time)' \
'-f[Show flat list instead of tree]' \
'--flat[Show flat list instead of tree]' \
'--json[Output as JSON]' \
'--readonly[Only show read-only snapshots (flat view only)]' \
'-h[Print help]' \
'--help[Print help]' \
':target -- Filesystem (device, mountpoint, or UUID):_files' \
&& ret=0
;;
(ls-snap)
_arguments "${_arguments_options[@]}" : \
'--sort=[Sort order (flat view only)]:SORT:(name size time)' \
'-f[Show flat list instead of tree]' \
'--flat[Show flat list instead of tree]' \
'--json[Output as JSON]' \
'--readonly[Only show read-only snapshots (flat view only)]' \
'-h[Print help]' \
'--help[Print help]' \
':target -- Filesystem (device, mountpoint, or UUID):_files' \
&& ret=0
;;
(list-snap)
_arguments "${_arguments_options[@]}" : \
'--sort=[Sort order (flat view only)]:SORT:(name size time)' \
'-f[Show flat list instead of tree]' \
'--flat[Show flat list instead of tree]' \
'--json[Output as JSON]' \
'--readonly[Only show read-only snapshots (flat view only)]' \
'-h[Print help]' \
'--help[Print help]' \
':target -- Filesystem (device, mountpoint, or UUID):_files' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_bcachefs__subvolume__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-subvolume-help-command-$line[1]:"
        case $line[1] in
            (create)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(snapshot)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list-snapshots)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(set-file-option)
_arguments "${_arguments_options[@]}" : \
'--data_replicas=[Number of data replicas]:#: ' \
'--data-replicas=[Number of data replicas]:#: ' \
'--data_checksum=[]: :(none crc32c crc64 xxhash)' \
'--data-checksum=[]: :(none crc32c crc64 xxhash)' \
'--compression=[]: : ' \
'--background_compression=[]: : ' \
'--background-compression=[]: : ' \
'--foreground_target=[Device or label for foreground writes]:(target): ' \
'--foreground-target=[Device or label for foreground writes]:(target): ' \
'--background_target=[Device or label to move data to in the background]:(target): ' \
'--background-target=[Device or label to move data to in the background]:(target): ' \
'--promote_target=[Device or label to promote data to on read]:(target): ' \
'--promote-target=[Device or label to promote data to on read]:(target): ' \
'--erasure_code=[Enable erasure coding (DO NOT USE YET)]' \
'--erasure-code=[Enable erasure coding (DO NOT USE YET)]' \
'--casefold=[Dirent lookups are casefolded]' \
'--inodes_32bit=[Constrain inode numbers to 32 bits]' \
'--inodes-32bit=[Constrain inode numbers to 32 bits]' \
'--project=[]' \
'--nocow=[Nocow mode\: Writes will be done in place when possible. Snapshots and reflink will still caused writes to be COW Implicitly disables data checksumming, compression and encryption]' \
'--remove-all[Remove all file options]' \
'-h[Print help]' \
'--help[Print help]' \
':files:' \
&& ret=0
;;
(reflink-option-propagate)
_arguments "${_arguments_options[@]}" : \
'--set-may-update[Enable option propagation on old reflink_p extents that predate the may_update_options flag. Requires CAP_SYS_ADMIN. Only needed once per file for filesystems with reflinks created before the flag was introduced.]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':files:' \
&& ret=0
;;
(reset-counters)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':fs:' \
&& ret=0
;;
(version)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(data)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_bcachefs__data_commands" \
"*::: :->data" \
&& ret=0

    case $state in
    (data)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-data-command-$line[1]:"
        case $line[1] in
            (scrub)
_arguments "${_arguments_options[@]}" : \
'-m[Check metadata only]' \
'--metadata[Check metadata only]' \
'-h[Print help]' \
'--help[Print help]' \
':filesystem -- Filesystem path or device:' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_bcachefs__data__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-data-help-command-$line[1]:"
        case $line[1] in
            (scrub)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(device)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_bcachefs__device_commands" \
"*::: :->device" \
&& ret=0

    case $state in
    (device)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-device-command-$line[1]:"
        case $line[1] in
            (add)
_arguments "${_arguments_options[@]}" : \
'--block_size=[]:size: ' \
'--block-size=[]:size: ' \
'--btree_node_size=[Btree node size, default 256k]:size: ' \
'--btree-node-size=[Btree node size, default 256k]:size: ' \
'--errors=[Action to take on filesystem error]: :(continue fix_safe panic ro)' \
'--write_error_timeout=[Number of consecutive write errors allowed before kicking out a device]: : ' \
'--write-error-timeout=[Number of consecutive write errors allowed before kicking out a device]: : ' \
'--metadata_replicas=[Number of metadata replicas]:#: ' \
'--metadata-replicas=[Number of metadata replicas]:#: ' \
'--data_replicas=[Number of data replicas]:#: ' \
'--data-replicas=[Number of data replicas]:#: ' \
'--encoded_extent_max=[Maximum size of checksummed/compressed extents]:size: ' \
'--encoded-extent-max=[Maximum size of checksummed/compressed extents]:size: ' \
'--metadata_checksum=[]: :(none crc32c crc64 xxhash)' \
'--metadata-checksum=[]: :(none crc32c crc64 xxhash)' \
'--data_checksum=[]: :(none crc32c crc64 xxhash)' \
'--data-checksum=[]: :(none crc32c crc64 xxhash)' \
'--checksum_err_retry_nr=[]: : ' \
'--checksum-err-retry-nr=[]: : ' \
'--compression=[]: : ' \
'--background_compression=[]: : ' \
'--background-compression=[]: : ' \
'--str_hash=[Hash function for directory entries and xattrs]: :(crc32c crc64 siphash)' \
'--str-hash=[Hash function for directory entries and xattrs]: :(crc32c crc64 siphash)' \
'--metadata_target=[Device or label for metadata writes]:(target): ' \
'--metadata-target=[Device or label for metadata writes]:(target): ' \
'--foreground_target=[Device or label for foreground writes]:(target): ' \
'--foreground-target=[Device or label for foreground writes]:(target): ' \
'--background_target=[Device or label to move data to in the background]:(target): ' \
'--background-target=[Device or label to move data to in the background]:(target): ' \
'--promote_target=[Device or label to promote data to on read]:(target): ' \
'--promote-target=[Device or label to promote data to on read]:(target): ' \
'--erasure_code=[Enable erasure coding (DO NOT USE YET)]' \
'--erasure-code=[Enable erasure coding (DO NOT USE YET)]' \
'--casefold=[Dirent lookups are casefolded]' \
'--inodes_32bit=[Constrain inode numbers to 32 bits]' \
'--inodes-32bit=[Constrain inode numbers to 32 bits]' \
'--shard_inode_numbers_bits=[Shard new inode numbers by CPU id]: : ' \
'--shard-inode-numbers-bits=[Shard new inode numbers by CPU id]: : ' \
'--gc_reserve_percent=[Percentage of disk space to reserve for copygc]:%: ' \
'--gc-reserve-percent=[Percentage of disk space to reserve for copygc]:%: ' \
'--gc_reserve_bytes=[Amount of disk space to reserve for copygc Takes precedence over gc_reserve_percent if set]:%: ' \
'--gc-reserve-bytes=[Amount of disk space to reserve for copygc Takes precedence over gc_reserve_percent if set]:%: ' \
'--root_reserve_percent=[Percentage of disk space to reserve for superuser]:%: ' \
'--root-reserve-percent=[Percentage of disk space to reserve for superuser]:%: ' \
'--wide_macs=[Store full 128 bits of cryptographic MACs, instead of 80]' \
'--wide-macs=[Store full 128 bits of cryptographic MACs, instead of 80]' \
'--acl=[Enable POSIX acls]' \
'--usrquota=[Enable user quotas]' \
'--grpquota=[Enable group quotas]' \
'--prjquota=[Enable project quotas]' \
'--journal_transaction_names=[Log transaction function names in journal]' \
'--journal-transaction-names=[Log transaction function names in journal]' \
'--allocator_stuck_timeout=[Default timeout in seconds for stuck allocator messages]: : ' \
'--allocator-stuck-timeout=[Default timeout in seconds for stuck allocator messages]: : ' \
'--nocow=[Nocow mode\: Writes will be done in place when possible. Snapshots and reflink will still caused writes to be COW Implicitly disables data checksumming, compression and encryption]' \
'--state=[rw,ro,failed,spare]: :(rw ro evacuating spare)' \
'--bucket_size=[Specifies the bucket size; must be greater than the btree node size]:size: ' \
'--bucket-size=[Specifies the bucket size; must be greater than the btree node size]:size: ' \
'--durability=[Data written to this device will be considered to have already been replicated n times]:n: ' \
'--data_allowed=[Allowed data types for this device\: journal, btree, and/or user]:types: ' \
'--data-allowed=[Allowed data types for this device\: journal, btree, and/or user]:types: ' \
'--discard=[Enable discard/TRIM support]' \
'--rotational=[Disk is rotational; different behaviour for reconcile]' \
'-l+[Disk label]: : ' \
'--label=[Disk label]: : ' \
'-f[Use device even if it appears to already be formatted]' \
'--force[Use device even if it appears to already be formatted]' \
'-h[Print help]' \
'--help[Print help]' \
':filesystem -- Filesystem path or mountpoint:' \
':device -- Device to add:' \
&& ret=0
;;
(online)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':device -- Device path:' \
&& ret=0
;;
(offline)
_arguments "${_arguments_options[@]}" : \
'-f[Force, if data redundancy will be degraded]' \
'--force[Force, if data redundancy will be degraded]' \
'-h[Print help]' \
'--help[Print help]' \
':device -- Device path:' \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
'-f[Force removal, even if some data couldn'\''t be migrated]' \
'--force[Force removal, even if some data couldn'\''t be migrated]' \
'-F[Force removal, even if some metadata couldn'\''t be migrated]' \
'--force-metadata[Force removal, even if some metadata couldn'\''t be migrated]' \
'-h[Print help]' \
'--help[Print help]' \
':device -- Device path or numeric device index:' \
'::path -- Filesystem path (required when specifying device by index):' \
&& ret=0
;;
(evacuate)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':device -- Device path:' \
&& ret=0
;;
(set-state)
_arguments "${_arguments_options[@]}" : \
'-f[Force if data redundancy will be degraded]' \
'--force[Force if data redundancy will be degraded]' \
'-F[Force even if data will be lost]' \
'--force-if-data-lost[Force even if data will be lost]' \
'-o[Set state of an offline device]' \
'--offline[Set state of an offline device]' \
'-h[Print help]' \
'--help[Print help]' \
':new_state -- Device state:(rw ro evacuating spare)' \
':device -- Device path or numeric device index:' \
'::path -- Filesystem path (required when specifying device by index):' \
&& ret=0
;;
(resize)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':device -- Device path:' \
'::size -- New size (human-readable, e.g. 1G); defaults to device size:' \
&& ret=0
;;
(resize-journal)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':device -- Device path:' \
':size -- New journal size (human-readable, e.g. 1G):' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_bcachefs__device__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-device-help-command-$line[1]:"
        case $line[1] in
            (add)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(online)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(offline)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(evacuate)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(set-state)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(resize)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(resize-journal)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(dump)
_arguments "${_arguments_options[@]}" : \
'-o+[Output filename (without .qcow2 extension)]:OUTPUT: ' \
'-s+[Sanitize inline data and optionally filenames (data or filenames)]' \
'--sanitize=[Sanitize inline data and optionally filenames (data or filenames)]' \
'-f[Force; overwrite existing files]' \
'--force[Force; overwrite existing files]' \
'--nojournal[Don'\''t dump entire journal, just dirty entries]' \
'--noexcl[Open devices without O_EXCL]' \
'-v[Verbose output]' \
'--verbose[Verbose output]' \
'-h[Print help]' \
'--help[Print help]' \
'*::devices -- Devices to dump:' \
&& ret=0
;;
(format)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(mkfs)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(fs)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_bcachefs__fs_commands" \
"*::: :->fs" \
&& ret=0

    case $state in
    (fs)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-fs-command-$line[1]:"
        case $line[1] in
            (usage)
_arguments "${_arguments_options[@]}" : \
'*-f+[Comma-separated list of fields]:FIELDS:(replicas btree compression rebalance_work devices)' \
'*--fields=[Comma-separated list of fields]:FIELDS:(replicas btree compression rebalance_work devices)' \
'--help[Print help]' \
'-a[Print all accounting fields]' \
'--all[Print all accounting fields]' \
'-h[Human-readable units]' \
'--human-readable[Human-readable units]' \
'*::mountpoints -- Filesystem mountpoints:' \
&& ret=0
;;
(top)
_arguments "${_arguments_options[@]}" : \
'--help[Print help]' \
'-h[Human-readable units]' \
'--human-readable[Human-readable units]' \
'::filesystem -- Filesystem path, device, or UUID (default\: current directory):' \
&& ret=0
;;
(timestats)
_arguments "${_arguments_options[@]}" : \
'-s+[Sort by column]:SORT:(name count dur-min dur-max dur-total mean-since mean-recent stddev-since stddev-recent)' \
'--sort=[Sort by column]:SORT:(name count dur-min dur-max dur-total mean-since mean-recent stddev-since stddev-recent)' \
'-i+[Refresh interval in seconds (interactive mode)]:INTERVAL: ' \
'--interval=[Refresh interval in seconds (interactive mode)]:INTERVAL: ' \
'-a[Show stats with zero count]' \
'--all[Show stats with zero count]' \
'--json[Output raw JSON]' \
'--no-device-stats[Skip per-device IO latency stats]' \
'--once[One-shot output (no interactive TUI)]' \
'-h[Print help]' \
'--help[Print help]' \
'::filesystem -- Filesystem UUID, device, or mount point (default\: all):' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_bcachefs__fs__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-fs-help-command-$line[1]:"
        case $line[1] in
            (usage)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(top)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(timestats)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(fsck)
_arguments "${_arguments_options[@]}" : \
'*-o+[Additional mount options]:MOUNT_OPTS: ' \
'-p[Automatic repair (no questions)]' \
'-n[Don'\''t repair, only check for errors]' \
'-y[Assume "yes" to all questions]' \
'-f[Force checking even if filesystem is marked clean]' \
'-r[Don'\''t display more than 10 errors of a given type]' \
'--ratelimit_errors[Don'\''t display more than 10 errors of a given type]' \
'-k[Use the in-kernel fsck implementation]' \
'--kernel[Use the in-kernel fsck implementation]' \
'-K[Don'\''t use the in-kernel fsck implementation]' \
'--no-kernel[Don'\''t use the in-kernel fsck implementation]' \
'-v[Be verbose]' \
'-h[Print help]' \
'--help[Print help]' \
'*::devices -- Device path(s):' \
&& ret=0
;;
(image)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_bcachefs__image_commands" \
"*::: :->image" \
&& ret=0

    case $state in
    (image)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-image-command-$line[1]:"
        case $line[1] in
            (create)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(update)
_arguments "${_arguments_options[@]}" : \
'-s+[Source directory]:SOURCE: ' \
'--source=[Source directory]:SOURCE: ' \
'-a[Include allocation info in the filesystem]' \
'--keep-alloc[Include allocation info in the filesystem]' \
'-q[Only print errors]' \
'--quiet[Only print errors]' \
'*-v[Verbose filesystem initialization]' \
'*--verbose[Verbose filesystem initialization]' \
'-h[Print help]' \
'--help[Print help]' \
':image -- Image file to update:' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_bcachefs__image__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-image-help-command-$line[1]:"
        case $line[1] in
            (create)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(update)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(kill_btree_node)
_arguments "${_arguments_options[@]}" : \
'*-n+[Node to kill (btree\:level\:idx)]:NODES: ' \
'*--node=[Node to kill (btree\:level\:idx)]:NODES: ' \
'-d+[Device index (default\: kill all replicas)]:DEV: ' \
'--dev=[Device index (default\: kill all replicas)]:DEV: ' \
'-h[Print help]' \
'--help[Print help]' \
'*::devices -- Device(s):_files' \
&& ret=0
;;
(list_journal)
_arguments "${_arguments_options[@]}" : \
'-n+[Number of journal entries to print]:NR_ENTRIES: ' \
'--nr-entries=[Number of journal entries to print]:NR_ENTRIES: ' \
'-s+[Sequence number or range (seq or seq..seq)]:SEQ: ' \
'--seq=[Sequence number or range (seq or seq..seq)]:SEQ: ' \
'-b+[Filter by btree (+/-btree1,btree2)]:BTREE: ' \
'--btree=[Filter by btree (+/-btree1,btree2)]:BTREE: ' \
'-t+[Filter transactions by function (+/-fn1,fn2)]:TRANSACTION: ' \
'--transaction=[Filter transactions by function (+/-fn1,fn2)]:TRANSACTION: ' \
'-k+[Filter by key range (+/-bbpos\[-bbpos\],...)]:KEY: ' \
'--key=[Filter by key range (+/-bbpos\[-bbpos\],...)]:KEY: ' \
'-V+[Print bkey values (true/false)]:BKEY_VAL: ' \
'--bkey-val=[Print bkey values (true/false)]:BKEY_VAL: ' \
'-a[Read entire journal, not just contiguous entries]' \
'--all[Read entire journal, not just contiguous entries]' \
'-d[Only read dirty entries]' \
'--dirty-only[Only read dirty entries]' \
'-B[Include blacklisted entries]' \
'--blacklisted[Include blacklisted entries]' \
'-F[Only flush entries]' \
'--flush-only[Only flush entries]' \
'-D[Datetime entries only]' \
'--datetime[Datetime entries only]' \
'-H[Headers only]' \
'--headers-only[Headers only]' \
'--all-headers[Print all headers even if no transactions matched]' \
'-l[Include log-only entries when filtering]' \
'--log[Include log-only entries when filtering]' \
'-L[Only print transactions containing log messages]' \
'--log-only[Only print transactions containing log messages]' \
'-o[Print offset of each subentry]' \
'--offset[Print offset of each subentry]' \
'-v[Verbose mode]' \
'--verbose[Verbose mode]' \
'-h[Print help]' \
'--help[Print help]' \
'*::devices -- Devices:' \
&& ret=0
;;
(migrate)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(migrate-superblock)
_arguments "${_arguments_options[@]}" : \
'-d+[Device to create superblock for]:DEVICE: ' \
'--dev=[Device to create superblock for]:DEVICE: ' \
'-o+[Offset of existing superblock]:OFFSET: ' \
'--offset=[Offset of existing superblock]:OFFSET: ' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(reconcile)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_bcachefs__reconcile_commands" \
"*::: :->reconcile" \
&& ret=0

    case $state in
    (reconcile)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-reconcile-command-$line[1]:"
        case $line[1] in
            (status)
_arguments "${_arguments_options[@]}" : \
'*-t+[Reconcile types to display (comma-separated)]:TYPES:(replicas checksum erasure_code compression target high_priority pending stripes)' \
'*--types=[Reconcile types to display (comma-separated)]:TYPES:(replicas checksum erasure_code compression target high_priority pending stripes)' \
'--help[Print help]' \
'::filesystem -- Filesystem mountpoint:' \
&& ret=0
;;
(wait)
_arguments "${_arguments_options[@]}" : \
'*-t+[Reconcile types to wait on (comma-separated)]:TYPES:(replicas checksum erasure_code compression target high_priority pending stripes)' \
'*--types=[Reconcile types to wait on (comma-separated)]:TYPES:(replicas checksum erasure_code compression target high_priority pending stripes)' \
'--help[Print help]' \
'::filesystem -- Filesystem mountpoint:' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_bcachefs__reconcile__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-reconcile-help-command-$line[1]:"
        case $line[1] in
            (status)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(wait)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(recover-super)
_arguments "${_arguments_options[@]}" : \
'-d+[Size of filesystem on device, in bytes]:DEV_SIZE: ' \
'--dev_size=[Size of filesystem on device, in bytes]:DEV_SIZE: ' \
'-o+[Offset to probe, in bytes (must be a multiple of 512)]:OFFSET: ' \
'--offset=[Offset to probe, in bytes (must be a multiple of 512)]:OFFSET: ' \
'-l+[Length in bytes to scan from start and end of device]:SCAN_LEN: ' \
'--scan_len=[Length in bytes to scan from start and end of device]:SCAN_LEN: ' \
'-s+[Member device to recover from, in a multi-device fs]:SRC_DEVICE: ' \
'--src_device=[Member device to recover from, in a multi-device fs]:SRC_DEVICE: ' \
'-i+[Index of this device, if recovering from another device]:DEV_IDX: ' \
'--dev_idx=[Index of this device, if recovering from another device]:DEV_IDX: ' \
'-y[Recover without prompting]' \
'--yes[Recover without prompting]' \
'-v[Increase logging level]' \
'--verbose[Increase logging level]' \
'-h[Print help]' \
'--help[Print help]' \
':device -- Device to recover:' \
&& ret=0
;;
(recovery-pass)
_arguments "${_arguments_options[@]}" : \
'*-s+[Schedule a recovery pass]:SET: ' \
'*--set=[Schedule a recovery pass]:SET: ' \
'*-u+[Deschedule a recovery pass]:UNSET: ' \
'*--unset=[Deschedule a recovery pass]:UNSET: ' \
'-h[Print help]' \
'--help[Print help]' \
'*::devices -- Device path(s):' \
&& ret=0
;;
(scrub)
_arguments "${_arguments_options[@]}" : \
'-m[Check metadata only]' \
'--metadata[Check metadata only]' \
'-h[Print help]' \
'--help[Print help]' \
':filesystem -- Filesystem path or device:' \
&& ret=0
;;
(set-fs-option)
_arguments "${_arguments_options[@]}" : \
'--block_size=[]:size: ' \
'--block-size=[]:size: ' \
'--btree_node_size=[Btree node size, default 256k]:size: ' \
'--btree-node-size=[Btree node size, default 256k]:size: ' \
'--errors=[Action to take on filesystem error]: :(continue fix_safe panic ro)' \
'--write_error_timeout=[Number of consecutive write errors allowed before kicking out a device]: : ' \
'--write-error-timeout=[Number of consecutive write errors allowed before kicking out a device]: : ' \
'--metadata_replicas=[Number of metadata replicas]:#: ' \
'--metadata-replicas=[Number of metadata replicas]:#: ' \
'--data_replicas=[Number of data replicas]:#: ' \
'--data-replicas=[Number of data replicas]:#: ' \
'--encoded_extent_max=[Maximum size of checksummed/compressed extents]:size: ' \
'--encoded-extent-max=[Maximum size of checksummed/compressed extents]:size: ' \
'--metadata_checksum=[]: :(none crc32c crc64 xxhash)' \
'--metadata-checksum=[]: :(none crc32c crc64 xxhash)' \
'--data_checksum=[]: :(none crc32c crc64 xxhash)' \
'--data-checksum=[]: :(none crc32c crc64 xxhash)' \
'--checksum_err_retry_nr=[]: : ' \
'--checksum-err-retry-nr=[]: : ' \
'--compression=[]: : ' \
'--background_compression=[]: : ' \
'--background-compression=[]: : ' \
'--str_hash=[Hash function for directory entries and xattrs]: :(crc32c crc64 siphash)' \
'--str-hash=[Hash function for directory entries and xattrs]: :(crc32c crc64 siphash)' \
'--metadata_target=[Device or label for metadata writes]:(target): ' \
'--metadata-target=[Device or label for metadata writes]:(target): ' \
'--foreground_target=[Device or label for foreground writes]:(target): ' \
'--foreground-target=[Device or label for foreground writes]:(target): ' \
'--background_target=[Device or label to move data to in the background]:(target): ' \
'--background-target=[Device or label to move data to in the background]:(target): ' \
'--promote_target=[Device or label to promote data to on read]:(target): ' \
'--promote-target=[Device or label to promote data to on read]:(target): ' \
'--erasure_code=[Enable erasure coding (DO NOT USE YET)]' \
'--erasure-code=[Enable erasure coding (DO NOT USE YET)]' \
'--casefold=[Dirent lookups are casefolded]' \
'--casefold_disabled=[Disable casefolding filesystem wide]' \
'--casefold-disabled=[Disable casefolding filesystem wide]' \
'--inodes_32bit=[Constrain inode numbers to 32 bits]' \
'--inodes-32bit=[Constrain inode numbers to 32 bits]' \
'--shard_inode_numbers_bits=[Shard new inode numbers by CPU id]: : ' \
'--shard-inode-numbers-bits=[Shard new inode numbers by CPU id]: : ' \
'--btree_node_mem_ptr_optimization=[Stash pointer to in memory btree node in btree ptr]' \
'--btree-node-mem-ptr-optimization=[Stash pointer to in memory btree node in btree ptr]' \
'--gc_reserve_percent=[Percentage of disk space to reserve for copygc]:%: ' \
'--gc-reserve-percent=[Percentage of disk space to reserve for copygc]:%: ' \
'--gc_reserve_bytes=[Amount of disk space to reserve for copygc Takes precedence over gc_reserve_percent if set]:%: ' \
'--gc-reserve-bytes=[Amount of disk space to reserve for copygc Takes precedence over gc_reserve_percent if set]:%: ' \
'--root_reserve_percent=[Percentage of disk space to reserve for superuser]:%: ' \
'--root-reserve-percent=[Percentage of disk space to reserve for superuser]:%: ' \
'--wide_macs=[Store full 128 bits of cryptographic MACs, instead of 80]' \
'--wide-macs=[Store full 128 bits of cryptographic MACs, instead of 80]' \
'--inline_data=[Enable inline data extents]' \
'--inline-data=[Enable inline data extents]' \
'--promote_whole_extents=[Promote whole extents, instead of just part being read]' \
'--promote-whole-extents=[Promote whole extents, instead of just part being read]' \
'--acl=[Enable POSIX acls]' \
'--usrquota=[Enable user quotas]' \
'--grpquota=[Enable group quotas]' \
'--prjquota=[Enable project quotas]' \
'--degraded=[Allow mounting in degraded mode]: :(ask yes very no)' \
'--no_splitbrain_check=[Don'\''t kick drives out when splitbrain detected]' \
'--no-splitbrain-check=[Don'\''t kick drives out when splitbrain detected]' \
'--verbose=[Extra debugging information during mount/recovery]' \
'--journal_flush_delay=[Delay in milliseconds before automatic journal commits]: : ' \
'--journal-flush-delay=[Delay in milliseconds before automatic journal commits]: : ' \
'--journal_flush_disabled=[Disable journal flush on sync/fsync If enabled, writes can be lost, but only since the last journal write (default 1 second)]' \
'--journal-flush-disabled=[Disable journal flush on sync/fsync If enabled, writes can be lost, but only since the last journal write (default 1 second)]' \
'--journal_reclaim_delay=[Delay in milliseconds before automatic journal reclaim]: : ' \
'--journal-reclaim-delay=[Delay in milliseconds before automatic journal reclaim]: : ' \
'--writeback_timeout=[Delay seconds before writing back dirty data, overriding vm sysctls]: : ' \
'--writeback-timeout=[Delay seconds before writing back dirty data, overriding vm sysctls]: : ' \
'--move_bytes_in_flight=[Maximum Amount of IO to keep in flight by the move path]: : ' \
'--move-bytes-in-flight=[Maximum Amount of IO to keep in flight by the move path]: : ' \
'--move_ios_in_flight=[Maximum number of IOs to keep in flight by the move path]: : ' \
'--move-ios-in-flight=[Maximum number of IOs to keep in flight by the move path]: : ' \
'--fsck=[Run fsck on mount]' \
'--fsck_memory_usage_percent=[Maximum percentage of system ram fsck is allowed to pin]: : ' \
'--fsck-memory-usage-percent=[Maximum percentage of system ram fsck is allowed to pin]: : ' \
'--fix_errors=[Fix errors during fsck without asking]: : ' \
'--fix-errors=[Fix errors during fsck without asking]: : ' \
'--ratelimit_errors=[Ratelimit error messages during fsck]' \
'--ratelimit-errors=[Ratelimit error messages during fsck]' \
'--nochanges=[Super read only mode - no writes at all will be issued, even if we have to replay the journal]' \
'--norecovery=[Exit recovery immediately prior to journal replay]' \
'--journal_rewind=[Rewind journal]: : ' \
'--journal-rewind=[Rewind journal]: : ' \
'--recovery_passes=[Recovery passes to run explicitly]: : ' \
'--recovery-passes=[Recovery passes to run explicitly]: : ' \
'--recovery_passes_exclude=[Recovery passes to exclude]: : ' \
'--recovery-passes-exclude=[Recovery passes to exclude]: : ' \
'--recovery_pass_last=[Exit recovery after specified pass]: :(recovery_pass_empty scan_for_btree_nodes check_topology accounting_read alloc_read stripes_read initialize_subvolumes snapshots_read check_allocations trans_mark_dev_sbs fs_journal_alloc set_may_go_rw journal_replay merge_btree_nodes check_alloc_info check_lrus check_btree_backpointers check_backpointers_to_extents check_extents_to_backpointers check_alloc_to_lru_refs fs_freespace_init bucket_gens_init reconstruct_snapshots delete_dead_interior_snapshots check_snapshot_trees check_snapshots check_subvols check_subvol_children delete_dead_snapshots fs_upgrade_for_subvolumes check_inodes check_extents check_indirect_extents check_dirents check_xattrs check_root check_unreachable_inodes check_subvolume_structure check_directory_structure check_nlinks check_reconcile_work resume_logged_ops delete_dead_inodes kill_i_generation_keys fix_reflink_p set_fs_needs_reconcile btree_bitmap_gc lookup_root_inode)' \
'--recovery-pass-last=[Exit recovery after specified pass]: :(recovery_pass_empty scan_for_btree_nodes check_topology accounting_read alloc_read stripes_read initialize_subvolumes snapshots_read check_allocations trans_mark_dev_sbs fs_journal_alloc set_may_go_rw journal_replay merge_btree_nodes check_alloc_info check_lrus check_btree_backpointers check_backpointers_to_extents check_extents_to_backpointers check_alloc_to_lru_refs fs_freespace_init bucket_gens_init reconstruct_snapshots delete_dead_interior_snapshots check_snapshot_trees check_snapshots check_subvols check_subvol_children delete_dead_snapshots fs_upgrade_for_subvolumes check_inodes check_extents check_indirect_extents check_dirents check_xattrs check_root check_unreachable_inodes check_subvolume_structure check_directory_structure check_nlinks check_reconcile_work resume_logged_ops delete_dead_inodes kill_i_generation_keys fix_reflink_p set_fs_needs_reconcile btree_bitmap_gc lookup_root_inode)' \
'--journal_transaction_names=[Log transaction function names in journal]' \
'--journal-transaction-names=[Log transaction function names in journal]' \
'--allocator_stuck_timeout=[Default timeout in seconds for stuck allocator messages]: : ' \
'--allocator-stuck-timeout=[Default timeout in seconds for stuck allocator messages]: : ' \
'--noexcl=[Don'\''t open device in exclusive mode]' \
'--direct_io=[Use O_DIRECT (userspace only)]' \
'--direct-io=[Use O_DIRECT (userspace only)]' \
'--reconstruct_alloc=[Reconstruct alloc btree]' \
'--reconstruct-alloc=[Reconstruct alloc btree]' \
'--version_upgrade=[Set superblock to latest version, allowing any new features to be used]: :(compatible incompatible none)' \
'--version-upgrade=[Set superblock to latest version, allowing any new features to be used]: :(compatible incompatible none)' \
'--nocow=[Nocow mode\: Writes will be done in place when possible. Snapshots and reflink will still caused writes to be COW Implicitly disables data checksumming, compression and encryption]' \
'--nocow_enabled=[Enable nocow mode\: enables runtime locking in data move path needed if nocow will ever be in use ]' \
'--nocow-enabled=[Enable nocow mode\: enables runtime locking in data move path needed if nocow will ever be in use ]' \
'--copygc_enabled=[Enable copygc\: disable for debugging, or to quiet the system when doing performance testing ]' \
'--copygc-enabled=[Enable copygc\: disable for debugging, or to quiet the system when doing performance testing ]' \
'--reconcile_enabled=[Enable reconcile\: disable for debugging, or to quiet the system when doing performance testing ]' \
'--reconcile-enabled=[Enable reconcile\: disable for debugging, or to quiet the system when doing performance testing ]' \
'--reconcile_on_ac_only=[Enable reconcile while on mains power only ]' \
'--reconcile-on-ac-only=[Enable reconcile while on mains power only ]' \
'--auto_snapshot_deletion=[Enable automatic snapshot deletion\: disable for debugging, or to quiet the system when doing performance testing ]' \
'--auto-snapshot-deletion=[Enable automatic snapshot deletion\: disable for debugging, or to quiet the system when doing performance testing ]' \
'--state=[rw,ro,failed,spare]: :(rw ro evacuating spare)' \
'--bucket_size=[Specifies the bucket size; must be greater than the btree node size]:size: ' \
'--bucket-size=[Specifies the bucket size; must be greater than the btree node size]:size: ' \
'--durability=[Data written to this device will be considered to have already been replicated n times]:n: ' \
'--data_allowed=[Allowed data types for this device\: journal, btree, and/or user]:types: ' \
'--data-allowed=[Allowed data types for this device\: journal, btree, and/or user]:types: ' \
'--discard=[Enable discard/TRIM support]' \
'--rotational=[Disk is rotational; different behaviour for reconcile]' \
'--btree_node_prefetch=[BTREE_ITER_prefetch causes btree nodes to be  prefetched sequentially]' \
'--btree-node-prefetch=[BTREE_ITER_prefetch causes btree nodes to be  prefetched sequentially]' \
'*-d+[Device index for device-specific options]: : ' \
'*--dev-idx=[Device index for device-specific options]: : ' \
'-h[Print help]' \
'--help[Print help]' \
':devices -- Device path(s):' \
&& ret=0
;;
(set-passphrase)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::devices -- Devices (colon-separated or multiple arguments):' \
&& ret=0
;;
(remove-passphrase)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::devices -- Devices (colon-separated or multiple arguments):' \
&& ret=0
;;
(show-super)
_arguments "${_arguments_options[@]}" : \
'-f+[Superblock fields to print (comma-separated, or "all")]:FIELDS: ' \
'--fields=[Superblock fields to print (comma-separated, or "all")]:FIELDS: ' \
'-F+[Print a single superblock field only (no header)]:FIELD_ONLY: ' \
'--field-only=[Print a single superblock field only (no header)]:FIELD_ONLY: ' \
'--help[Print help]' \
'-l[Print superblock layout]' \
'--layout[Print superblock layout]' \
':device -- Device path:' \
&& ret=0
;;
(unlock)
_arguments "${_arguments_options[@]}" : \
'-k+[Keyring to add to]:KEYRING:(session user user_session)' \
'--keyring=[Keyring to add to]:KEYRING:(session user user_session)' \
'-f+[Passphrase file to read from (disables passphrase prompt)]:FILE:_files' \
'--file=[Passphrase file to read from (disables passphrase prompt)]:FILE:_files' \
'-c[Check if a device is encrypted]' \
'--check[Check if a device is encrypted]' \
'-h[Print help]' \
'--help[Print help]' \
':device -- Device:' \
&& ret=0
;;
(strip-alloc)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(undump)
_arguments "${_arguments_options[@]}" : \
'-f[Overwrite existing output files]' \
'--force[Overwrite existing output files]' \
'-h[Print help]' \
'--help[Print help]' \
'*::files -- qcow2 files to convert:' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_bcachefs__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-help-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(mount)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(completions)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(subvolume)
_arguments "${_arguments_options[@]}" : \
":: :_bcachefs__help__subvolume_commands" \
"*::: :->subvolume" \
&& ret=0

    case $state in
    (subvolume)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-help-subvolume-command-$line[1]:"
        case $line[1] in
            (create)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(snapshot)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list-snapshots)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(set-file-option)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(reflink-option-propagate)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(reset-counters)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(version)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(data)
_arguments "${_arguments_options[@]}" : \
":: :_bcachefs__help__data_commands" \
"*::: :->data" \
&& ret=0

    case $state in
    (data)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-help-data-command-$line[1]:"
        case $line[1] in
            (scrub)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(device)
_arguments "${_arguments_options[@]}" : \
":: :_bcachefs__help__device_commands" \
"*::: :->device" \
&& ret=0

    case $state in
    (device)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-help-device-command-$line[1]:"
        case $line[1] in
            (add)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(online)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(offline)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(evacuate)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(set-state)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(resize)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(resize-journal)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(dump)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(format)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(fs)
_arguments "${_arguments_options[@]}" : \
":: :_bcachefs__help__fs_commands" \
"*::: :->fs" \
&& ret=0

    case $state in
    (fs)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-help-fs-command-$line[1]:"
        case $line[1] in
            (usage)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(top)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(timestats)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(fsck)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(image)
_arguments "${_arguments_options[@]}" : \
":: :_bcachefs__help__image_commands" \
"*::: :->image" \
&& ret=0

    case $state in
    (image)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-help-image-command-$line[1]:"
        case $line[1] in
            (create)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(update)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(kill_btree_node)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list_journal)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(migrate)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(migrate-superblock)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(reconcile)
_arguments "${_arguments_options[@]}" : \
":: :_bcachefs__help__reconcile_commands" \
"*::: :->reconcile" \
&& ret=0

    case $state in
    (reconcile)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-help-reconcile-command-$line[1]:"
        case $line[1] in
            (status)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(wait)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(recover-super)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(recovery-pass)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(scrub)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(set-fs-option)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(set-passphrase)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remove-passphrase)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(show-super)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(unlock)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(strip-alloc)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(undump)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
}

(( $+functions[_bcachefs_commands] )) ||
_bcachefs_commands() {
    local commands; commands=(
'list:List filesystem metadata in textual form' \
'mount:Mount a bcachefs filesystem by its UUID' \
'completions:Generate shell completions' \
'subvolume:Subvolumes-related commands' \
'subvol:Subvolumes-related commands' \
'set-file-option:Set attributes on files in a bcachefs filesystem' \
'reflink-option-propagate:Propagate IO options to reflinked extents' \
'reset-counters:Reset filesystem counters' \
'version:Display version' \
'data:Manage filesystem data' \
'device:Manage devices within a filesystem' \
'dump:Dump filesystem metadata to a qcow2 image' \
'format:Format a new filesystem' \
'mkfs:Format a new filesystem' \
'fs:Manage a running filesystem' \
'fsck:Check an existing filesystem for errors' \
'image:Filesystem image commands' \
'kill_btree_node:Kill a specific btree node (debugging)' \
'list_journal:List filesystem journal entries' \
'migrate:Migrate an existing ext2/3/4 filesystem to bcachefs in place' \
'migrate-superblock:Create default superblock after migrating' \
'reconcile:Reconcile filesystem data' \
'recover-super:Attempt to recover overwritten superblock from backups' \
'recovery-pass:List and manage scheduled recovery passes' \
'scrub:Verify checksums and correct errors, if possible' \
'set-fs-option:Set a filesystem option' \
'set-passphrase:Change passphrase on an existing (unmounted) filesystem' \
'remove-passphrase:Remove passphrase on an existing (unmounted) filesystem' \
'show-super:Print superblock information to stdout' \
'unlock:Unlock an encrypted filesystem prior to running/mounting' \
'strip-alloc:Strip alloc info on a filesystem to be used read-only' \
'undump:Convert qcow2 dump files back to raw device images' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'bcachefs commands' commands "$@"
}
(( $+functions[_bcachefs__completions_commands] )) ||
_bcachefs__completions_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs completions commands' commands "$@"
}
(( $+functions[_bcachefs__data_commands] )) ||
_bcachefs__data_commands() {
    local commands; commands=(
'scrub:Verify checksums and correct errors, if possible' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'bcachefs data commands' commands "$@"
}
(( $+functions[_bcachefs__data__help_commands] )) ||
_bcachefs__data__help_commands() {
    local commands; commands=(
'scrub:Verify checksums and correct errors, if possible' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'bcachefs data help commands' commands "$@"
}
(( $+functions[_bcachefs__data__help__help_commands] )) ||
_bcachefs__data__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs data help help commands' commands "$@"
}
(( $+functions[_bcachefs__data__help__scrub_commands] )) ||
_bcachefs__data__help__scrub_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs data help scrub commands' commands "$@"
}
(( $+functions[_bcachefs__data__scrub_commands] )) ||
_bcachefs__data__scrub_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs data scrub commands' commands "$@"
}
(( $+functions[_bcachefs__device_commands] )) ||
_bcachefs__device_commands() {
    local commands; commands=(
'add:Add a new device to an existing filesystem' \
'online:Re-add a device to a running filesystem' \
'offline:Take a device offline, without removing it' \
'remove:Remove a device from a filesystem' \
'evacuate:Migrate data off a device' \
'set-state:Change the state of a device' \
'resize:Resize the filesystem on a device' \
'resize-journal:Resize the journal on a device' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'bcachefs device commands' commands "$@"
}
(( $+functions[_bcachefs__device__add_commands] )) ||
_bcachefs__device__add_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device add commands' commands "$@"
}
(( $+functions[_bcachefs__device__evacuate_commands] )) ||
_bcachefs__device__evacuate_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device evacuate commands' commands "$@"
}
(( $+functions[_bcachefs__device__help_commands] )) ||
_bcachefs__device__help_commands() {
    local commands; commands=(
'add:Add a new device to an existing filesystem' \
'online:Re-add a device to a running filesystem' \
'offline:Take a device offline, without removing it' \
'remove:Remove a device from a filesystem' \
'evacuate:Migrate data off a device' \
'set-state:Change the state of a device' \
'resize:Resize the filesystem on a device' \
'resize-journal:Resize the journal on a device' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'bcachefs device help commands' commands "$@"
}
(( $+functions[_bcachefs__device__help__add_commands] )) ||
_bcachefs__device__help__add_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device help add commands' commands "$@"
}
(( $+functions[_bcachefs__device__help__evacuate_commands] )) ||
_bcachefs__device__help__evacuate_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device help evacuate commands' commands "$@"
}
(( $+functions[_bcachefs__device__help__help_commands] )) ||
_bcachefs__device__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device help help commands' commands "$@"
}
(( $+functions[_bcachefs__device__help__offline_commands] )) ||
_bcachefs__device__help__offline_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device help offline commands' commands "$@"
}
(( $+functions[_bcachefs__device__help__online_commands] )) ||
_bcachefs__device__help__online_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device help online commands' commands "$@"
}
(( $+functions[_bcachefs__device__help__remove_commands] )) ||
_bcachefs__device__help__remove_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device help remove commands' commands "$@"
}
(( $+functions[_bcachefs__device__help__resize_commands] )) ||
_bcachefs__device__help__resize_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device help resize commands' commands "$@"
}
(( $+functions[_bcachefs__device__help__resize-journal_commands] )) ||
_bcachefs__device__help__resize-journal_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device help resize-journal commands' commands "$@"
}
(( $+functions[_bcachefs__device__help__set-state_commands] )) ||
_bcachefs__device__help__set-state_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device help set-state commands' commands "$@"
}
(( $+functions[_bcachefs__device__offline_commands] )) ||
_bcachefs__device__offline_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device offline commands' commands "$@"
}
(( $+functions[_bcachefs__device__online_commands] )) ||
_bcachefs__device__online_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device online commands' commands "$@"
}
(( $+functions[_bcachefs__device__remove_commands] )) ||
_bcachefs__device__remove_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device remove commands' commands "$@"
}
(( $+functions[_bcachefs__device__resize_commands] )) ||
_bcachefs__device__resize_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device resize commands' commands "$@"
}
(( $+functions[_bcachefs__device__resize-journal_commands] )) ||
_bcachefs__device__resize-journal_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device resize-journal commands' commands "$@"
}
(( $+functions[_bcachefs__device__set-state_commands] )) ||
_bcachefs__device__set-state_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device set-state commands' commands "$@"
}
(( $+functions[_bcachefs__dump_commands] )) ||
_bcachefs__dump_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs dump commands' commands "$@"
}
(( $+functions[_bcachefs__format_commands] )) ||
_bcachefs__format_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs format commands' commands "$@"
}
(( $+functions[_bcachefs__fs_commands] )) ||
_bcachefs__fs_commands() {
    local commands; commands=(
'usage:Display detailed filesystem usage' \
'top:Display runtime performance info' \
'timestats:Display bcachefs time statistics' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'bcachefs fs commands' commands "$@"
}
(( $+functions[_bcachefs__fs__help_commands] )) ||
_bcachefs__fs__help_commands() {
    local commands; commands=(
'usage:Display detailed filesystem usage' \
'top:Display runtime performance info' \
'timestats:Display bcachefs time statistics' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'bcachefs fs help commands' commands "$@"
}
(( $+functions[_bcachefs__fs__help__help_commands] )) ||
_bcachefs__fs__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs fs help help commands' commands "$@"
}
(( $+functions[_bcachefs__fs__help__timestats_commands] )) ||
_bcachefs__fs__help__timestats_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs fs help timestats commands' commands "$@"
}
(( $+functions[_bcachefs__fs__help__top_commands] )) ||
_bcachefs__fs__help__top_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs fs help top commands' commands "$@"
}
(( $+functions[_bcachefs__fs__help__usage_commands] )) ||
_bcachefs__fs__help__usage_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs fs help usage commands' commands "$@"
}
(( $+functions[_bcachefs__fs__timestats_commands] )) ||
_bcachefs__fs__timestats_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs fs timestats commands' commands "$@"
}
(( $+functions[_bcachefs__fs__top_commands] )) ||
_bcachefs__fs__top_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs fs top commands' commands "$@"
}
(( $+functions[_bcachefs__fs__usage_commands] )) ||
_bcachefs__fs__usage_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs fs usage commands' commands "$@"
}
(( $+functions[_bcachefs__fsck_commands] )) ||
_bcachefs__fsck_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs fsck commands' commands "$@"
}
(( $+functions[_bcachefs__help_commands] )) ||
_bcachefs__help_commands() {
    local commands; commands=(
'list:List filesystem metadata in textual form' \
'mount:Mount a bcachefs filesystem by its UUID' \
'completions:Generate shell completions' \
'subvolume:Subvolumes-related commands' \
'set-file-option:Set attributes on files in a bcachefs filesystem' \
'reflink-option-propagate:Propagate IO options to reflinked extents' \
'reset-counters:Reset filesystem counters' \
'version:Display version' \
'data:Manage filesystem data' \
'device:Manage devices within a filesystem' \
'dump:Dump filesystem metadata to a qcow2 image' \
'format:Format a new filesystem' \
'fs:Manage a running filesystem' \
'fsck:Check an existing filesystem for errors' \
'image:Filesystem image commands' \
'kill_btree_node:Kill a specific btree node (debugging)' \
'list_journal:List filesystem journal entries' \
'migrate:Migrate an existing ext2/3/4 filesystem to bcachefs in place' \
'migrate-superblock:Create default superblock after migrating' \
'reconcile:Reconcile filesystem data' \
'recover-super:Attempt to recover overwritten superblock from backups' \
'recovery-pass:List and manage scheduled recovery passes' \
'scrub:Verify checksums and correct errors, if possible' \
'set-fs-option:Set a filesystem option' \
'set-passphrase:Change passphrase on an existing (unmounted) filesystem' \
'remove-passphrase:Remove passphrase on an existing (unmounted) filesystem' \
'show-super:Print superblock information to stdout' \
'unlock:Unlock an encrypted filesystem prior to running/mounting' \
'strip-alloc:Strip alloc info on a filesystem to be used read-only' \
'undump:Convert qcow2 dump files back to raw device images' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'bcachefs help commands' commands "$@"
}
(( $+functions[_bcachefs__help__completions_commands] )) ||
_bcachefs__help__completions_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help completions commands' commands "$@"
}
(( $+functions[_bcachefs__help__data_commands] )) ||
_bcachefs__help__data_commands() {
    local commands; commands=(
'scrub:Verify checksums and correct errors, if possible' \
    )
    _describe -t commands 'bcachefs help data commands' commands "$@"
}
(( $+functions[_bcachefs__help__data__scrub_commands] )) ||
_bcachefs__help__data__scrub_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help data scrub commands' commands "$@"
}
(( $+functions[_bcachefs__help__device_commands] )) ||
_bcachefs__help__device_commands() {
    local commands; commands=(
'add:Add a new device to an existing filesystem' \
'online:Re-add a device to a running filesystem' \
'offline:Take a device offline, without removing it' \
'remove:Remove a device from a filesystem' \
'evacuate:Migrate data off a device' \
'set-state:Change the state of a device' \
'resize:Resize the filesystem on a device' \
'resize-journal:Resize the journal on a device' \
    )
    _describe -t commands 'bcachefs help device commands' commands "$@"
}
(( $+functions[_bcachefs__help__device__add_commands] )) ||
_bcachefs__help__device__add_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help device add commands' commands "$@"
}
(( $+functions[_bcachefs__help__device__evacuate_commands] )) ||
_bcachefs__help__device__evacuate_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help device evacuate commands' commands "$@"
}
(( $+functions[_bcachefs__help__device__offline_commands] )) ||
_bcachefs__help__device__offline_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help device offline commands' commands "$@"
}
(( $+functions[_bcachefs__help__device__online_commands] )) ||
_bcachefs__help__device__online_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help device online commands' commands "$@"
}
(( $+functions[_bcachefs__help__device__remove_commands] )) ||
_bcachefs__help__device__remove_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help device remove commands' commands "$@"
}
(( $+functions[_bcachefs__help__device__resize_commands] )) ||
_bcachefs__help__device__resize_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help device resize commands' commands "$@"
}
(( $+functions[_bcachefs__help__device__resize-journal_commands] )) ||
_bcachefs__help__device__resize-journal_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help device resize-journal commands' commands "$@"
}
(( $+functions[_bcachefs__help__device__set-state_commands] )) ||
_bcachefs__help__device__set-state_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help device set-state commands' commands "$@"
}
(( $+functions[_bcachefs__help__dump_commands] )) ||
_bcachefs__help__dump_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help dump commands' commands "$@"
}
(( $+functions[_bcachefs__help__format_commands] )) ||
_bcachefs__help__format_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help format commands' commands "$@"
}
(( $+functions[_bcachefs__help__fs_commands] )) ||
_bcachefs__help__fs_commands() {
    local commands; commands=(
'usage:Display detailed filesystem usage' \
'top:Display runtime performance info' \
'timestats:Display bcachefs time statistics' \
    )
    _describe -t commands 'bcachefs help fs commands' commands "$@"
}
(( $+functions[_bcachefs__help__fs__timestats_commands] )) ||
_bcachefs__help__fs__timestats_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help fs timestats commands' commands "$@"
}
(( $+functions[_bcachefs__help__fs__top_commands] )) ||
_bcachefs__help__fs__top_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help fs top commands' commands "$@"
}
(( $+functions[_bcachefs__help__fs__usage_commands] )) ||
_bcachefs__help__fs__usage_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help fs usage commands' commands "$@"
}
(( $+functions[_bcachefs__help__fsck_commands] )) ||
_bcachefs__help__fsck_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help fsck commands' commands "$@"
}
(( $+functions[_bcachefs__help__help_commands] )) ||
_bcachefs__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help help commands' commands "$@"
}
(( $+functions[_bcachefs__help__image_commands] )) ||
_bcachefs__help__image_commands() {
    local commands; commands=(
'create:Create a filesystem image' \
'update:Update a filesystem image, minimizing changes' \
    )
    _describe -t commands 'bcachefs help image commands' commands "$@"
}
(( $+functions[_bcachefs__help__image__create_commands] )) ||
_bcachefs__help__image__create_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help image create commands' commands "$@"
}
(( $+functions[_bcachefs__help__image__update_commands] )) ||
_bcachefs__help__image__update_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help image update commands' commands "$@"
}
(( $+functions[_bcachefs__help__kill_btree_node_commands] )) ||
_bcachefs__help__kill_btree_node_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help kill_btree_node commands' commands "$@"
}
(( $+functions[_bcachefs__help__list_commands] )) ||
_bcachefs__help__list_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help list commands' commands "$@"
}
(( $+functions[_bcachefs__help__list_journal_commands] )) ||
_bcachefs__help__list_journal_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help list_journal commands' commands "$@"
}
(( $+functions[_bcachefs__help__migrate_commands] )) ||
_bcachefs__help__migrate_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help migrate commands' commands "$@"
}
(( $+functions[_bcachefs__help__migrate-superblock_commands] )) ||
_bcachefs__help__migrate-superblock_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help migrate-superblock commands' commands "$@"
}
(( $+functions[_bcachefs__help__mount_commands] )) ||
_bcachefs__help__mount_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help mount commands' commands "$@"
}
(( $+functions[_bcachefs__help__reconcile_commands] )) ||
_bcachefs__help__reconcile_commands() {
    local commands; commands=(
'status:Show reconcile status' \
'wait:Wait for reconcile to finish' \
    )
    _describe -t commands 'bcachefs help reconcile commands' commands "$@"
}
(( $+functions[_bcachefs__help__reconcile__status_commands] )) ||
_bcachefs__help__reconcile__status_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help reconcile status commands' commands "$@"
}
(( $+functions[_bcachefs__help__reconcile__wait_commands] )) ||
_bcachefs__help__reconcile__wait_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help reconcile wait commands' commands "$@"
}
(( $+functions[_bcachefs__help__recover-super_commands] )) ||
_bcachefs__help__recover-super_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help recover-super commands' commands "$@"
}
(( $+functions[_bcachefs__help__recovery-pass_commands] )) ||
_bcachefs__help__recovery-pass_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help recovery-pass commands' commands "$@"
}
(( $+functions[_bcachefs__help__reflink-option-propagate_commands] )) ||
_bcachefs__help__reflink-option-propagate_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help reflink-option-propagate commands' commands "$@"
}
(( $+functions[_bcachefs__help__remove-passphrase_commands] )) ||
_bcachefs__help__remove-passphrase_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help remove-passphrase commands' commands "$@"
}
(( $+functions[_bcachefs__help__reset-counters_commands] )) ||
_bcachefs__help__reset-counters_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help reset-counters commands' commands "$@"
}
(( $+functions[_bcachefs__help__scrub_commands] )) ||
_bcachefs__help__scrub_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help scrub commands' commands "$@"
}
(( $+functions[_bcachefs__help__set-file-option_commands] )) ||
_bcachefs__help__set-file-option_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help set-file-option commands' commands "$@"
}
(( $+functions[_bcachefs__help__set-fs-option_commands] )) ||
_bcachefs__help__set-fs-option_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help set-fs-option commands' commands "$@"
}
(( $+functions[_bcachefs__help__set-passphrase_commands] )) ||
_bcachefs__help__set-passphrase_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help set-passphrase commands' commands "$@"
}
(( $+functions[_bcachefs__help__show-super_commands] )) ||
_bcachefs__help__show-super_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help show-super commands' commands "$@"
}
(( $+functions[_bcachefs__help__strip-alloc_commands] )) ||
_bcachefs__help__strip-alloc_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help strip-alloc commands' commands "$@"
}
(( $+functions[_bcachefs__help__subvolume_commands] )) ||
_bcachefs__help__subvolume_commands() {
    local commands; commands=(
'create:Create a new subvolume' \
'delete:Delete an existing subvolume' \
'snapshot:Create a snapshot of a subvolume' \
'list:List subvolumes' \
'list-snapshots:List snapshots and their disk usage' \
    )
    _describe -t commands 'bcachefs help subvolume commands' commands "$@"
}
(( $+functions[_bcachefs__help__subvolume__create_commands] )) ||
_bcachefs__help__subvolume__create_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help subvolume create commands' commands "$@"
}
(( $+functions[_bcachefs__help__subvolume__delete_commands] )) ||
_bcachefs__help__subvolume__delete_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help subvolume delete commands' commands "$@"
}
(( $+functions[_bcachefs__help__subvolume__list_commands] )) ||
_bcachefs__help__subvolume__list_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help subvolume list commands' commands "$@"
}
(( $+functions[_bcachefs__help__subvolume__list-snapshots_commands] )) ||
_bcachefs__help__subvolume__list-snapshots_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help subvolume list-snapshots commands' commands "$@"
}
(( $+functions[_bcachefs__help__subvolume__snapshot_commands] )) ||
_bcachefs__help__subvolume__snapshot_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help subvolume snapshot commands' commands "$@"
}
(( $+functions[_bcachefs__help__undump_commands] )) ||
_bcachefs__help__undump_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help undump commands' commands "$@"
}
(( $+functions[_bcachefs__help__unlock_commands] )) ||
_bcachefs__help__unlock_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help unlock commands' commands "$@"
}
(( $+functions[_bcachefs__help__version_commands] )) ||
_bcachefs__help__version_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help version commands' commands "$@"
}
(( $+functions[_bcachefs__image_commands] )) ||
_bcachefs__image_commands() {
    local commands; commands=(
'create:Create a filesystem image' \
'update:Update a filesystem image, minimizing changes' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'bcachefs image commands' commands "$@"
}
(( $+functions[_bcachefs__image__create_commands] )) ||
_bcachefs__image__create_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs image create commands' commands "$@"
}
(( $+functions[_bcachefs__image__help_commands] )) ||
_bcachefs__image__help_commands() {
    local commands; commands=(
'create:Create a filesystem image' \
'update:Update a filesystem image, minimizing changes' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'bcachefs image help commands' commands "$@"
}
(( $+functions[_bcachefs__image__help__create_commands] )) ||
_bcachefs__image__help__create_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs image help create commands' commands "$@"
}
(( $+functions[_bcachefs__image__help__help_commands] )) ||
_bcachefs__image__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs image help help commands' commands "$@"
}
(( $+functions[_bcachefs__image__help__update_commands] )) ||
_bcachefs__image__help__update_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs image help update commands' commands "$@"
}
(( $+functions[_bcachefs__image__update_commands] )) ||
_bcachefs__image__update_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs image update commands' commands "$@"
}
(( $+functions[_bcachefs__kill_btree_node_commands] )) ||
_bcachefs__kill_btree_node_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs kill_btree_node commands' commands "$@"
}
(( $+functions[_bcachefs__list_commands] )) ||
_bcachefs__list_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs list commands' commands "$@"
}
(( $+functions[_bcachefs__list_journal_commands] )) ||
_bcachefs__list_journal_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs list_journal commands' commands "$@"
}
(( $+functions[_bcachefs__migrate_commands] )) ||
_bcachefs__migrate_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs migrate commands' commands "$@"
}
(( $+functions[_bcachefs__migrate-superblock_commands] )) ||
_bcachefs__migrate-superblock_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs migrate-superblock commands' commands "$@"
}
(( $+functions[_bcachefs__mount_commands] )) ||
_bcachefs__mount_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs mount commands' commands "$@"
}
(( $+functions[_bcachefs__reconcile_commands] )) ||
_bcachefs__reconcile_commands() {
    local commands; commands=(
'status:Show reconcile status' \
'wait:Wait for reconcile to finish' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'bcachefs reconcile commands' commands "$@"
}
(( $+functions[_bcachefs__reconcile__help_commands] )) ||
_bcachefs__reconcile__help_commands() {
    local commands; commands=(
'status:Show reconcile status' \
'wait:Wait for reconcile to finish' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'bcachefs reconcile help commands' commands "$@"
}
(( $+functions[_bcachefs__reconcile__help__help_commands] )) ||
_bcachefs__reconcile__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs reconcile help help commands' commands "$@"
}
(( $+functions[_bcachefs__reconcile__help__status_commands] )) ||
_bcachefs__reconcile__help__status_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs reconcile help status commands' commands "$@"
}
(( $+functions[_bcachefs__reconcile__help__wait_commands] )) ||
_bcachefs__reconcile__help__wait_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs reconcile help wait commands' commands "$@"
}
(( $+functions[_bcachefs__reconcile__status_commands] )) ||
_bcachefs__reconcile__status_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs reconcile status commands' commands "$@"
}
(( $+functions[_bcachefs__reconcile__wait_commands] )) ||
_bcachefs__reconcile__wait_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs reconcile wait commands' commands "$@"
}
(( $+functions[_bcachefs__recover-super_commands] )) ||
_bcachefs__recover-super_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs recover-super commands' commands "$@"
}
(( $+functions[_bcachefs__recovery-pass_commands] )) ||
_bcachefs__recovery-pass_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs recovery-pass commands' commands "$@"
}
(( $+functions[_bcachefs__reflink-option-propagate_commands] )) ||
_bcachefs__reflink-option-propagate_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs reflink-option-propagate commands' commands "$@"
}
(( $+functions[_bcachefs__remove-passphrase_commands] )) ||
_bcachefs__remove-passphrase_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs remove-passphrase commands' commands "$@"
}
(( $+functions[_bcachefs__reset-counters_commands] )) ||
_bcachefs__reset-counters_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs reset-counters commands' commands "$@"
}
(( $+functions[_bcachefs__scrub_commands] )) ||
_bcachefs__scrub_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs scrub commands' commands "$@"
}
(( $+functions[_bcachefs__set-file-option_commands] )) ||
_bcachefs__set-file-option_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs set-file-option commands' commands "$@"
}
(( $+functions[_bcachefs__set-fs-option_commands] )) ||
_bcachefs__set-fs-option_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs set-fs-option commands' commands "$@"
}
(( $+functions[_bcachefs__set-passphrase_commands] )) ||
_bcachefs__set-passphrase_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs set-passphrase commands' commands "$@"
}
(( $+functions[_bcachefs__show-super_commands] )) ||
_bcachefs__show-super_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs show-super commands' commands "$@"
}
(( $+functions[_bcachefs__strip-alloc_commands] )) ||
_bcachefs__strip-alloc_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs strip-alloc commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume_commands] )) ||
_bcachefs__subvolume_commands() {
    local commands; commands=(
'create:Create a new subvolume' \
'new:Create a new subvolume' \
'delete:Delete an existing subvolume' \
'del:Delete an existing subvolume' \
'snapshot:Create a snapshot of a subvolume' \
'snap:Create a snapshot of a subvolume' \
'list:List subvolumes' \
'ls:List subvolumes' \
'list-snapshots:List snapshots and their disk usage' \
'ls-snap:List snapshots and their disk usage' \
'list-snap:List snapshots and their disk usage' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'bcachefs subvolume commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume__create_commands] )) ||
_bcachefs__subvolume__create_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs subvolume create commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume__delete_commands] )) ||
_bcachefs__subvolume__delete_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs subvolume delete commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume__help_commands] )) ||
_bcachefs__subvolume__help_commands() {
    local commands; commands=(
'create:Create a new subvolume' \
'delete:Delete an existing subvolume' \
'snapshot:Create a snapshot of a subvolume' \
'list:List subvolumes' \
'list-snapshots:List snapshots and their disk usage' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'bcachefs subvolume help commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume__help__create_commands] )) ||
_bcachefs__subvolume__help__create_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs subvolume help create commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume__help__delete_commands] )) ||
_bcachefs__subvolume__help__delete_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs subvolume help delete commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume__help__help_commands] )) ||
_bcachefs__subvolume__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs subvolume help help commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume__help__list_commands] )) ||
_bcachefs__subvolume__help__list_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs subvolume help list commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume__help__list-snapshots_commands] )) ||
_bcachefs__subvolume__help__list-snapshots_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs subvolume help list-snapshots commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume__help__snapshot_commands] )) ||
_bcachefs__subvolume__help__snapshot_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs subvolume help snapshot commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume__list_commands] )) ||
_bcachefs__subvolume__list_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs subvolume list commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume__list-snapshots_commands] )) ||
_bcachefs__subvolume__list-snapshots_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs subvolume list-snapshots commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume__snapshot_commands] )) ||
_bcachefs__subvolume__snapshot_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs subvolume snapshot commands' commands "$@"
}
(( $+functions[_bcachefs__undump_commands] )) ||
_bcachefs__undump_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs undump commands' commands "$@"
}
(( $+functions[_bcachefs__unlock_commands] )) ||
_bcachefs__unlock_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs unlock commands' commands "$@"
}
(( $+functions[_bcachefs__version_commands] )) ||
_bcachefs__version_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs version commands' commands "$@"
}

if [ "$funcstack[1]" = "_bcachefs" ]; then
    _bcachefs "$@"
else
    compdef _bcachefs bcachefs
fi
