mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-12-08 00:00:12 +03:00
cmd_fs_usage: BCH_DATA_unstriped isn't a real bucket type
Some checks failed
build / bcachefs-tools-deb (ubuntu-24.04) (push) Has been cancelled
build / bcachefs-tools-rpm (push) Has been cancelled
build / bcachefs-tools-msrv (push) Has been cancelled
Nix Flake actions / nix-matrix (push) Has been cancelled
Nix Flake actions / ${{ matrix.name }} (${{ matrix.system }}) (push) Has been cancelled
Some checks failed
build / bcachefs-tools-deb (ubuntu-24.04) (push) Has been cancelled
build / bcachefs-tools-rpm (push) Has been cancelled
build / bcachefs-tools-msrv (push) Has been cancelled
Nix Flake actions / nix-matrix (push) Has been cancelled
Nix Flake actions / ${{ matrix.name }} (${{ matrix.system }}) (push) Has been cancelled
BCH_DATA_unstriped tracks unstriped data in stripe member buckets, it double counts a portion of BCH_DATA_stripe. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
6abef4e0ed
commit
06c8b3dd63
@ -52,10 +52,9 @@ static void dev_usage_to_text(struct printbuf *out,
|
||||
struct bch_ioctl_dev_usage_v2 *u = bchu_dev_usage(fs, d->idx);
|
||||
|
||||
u64 used = 0, capacity = u->nr_buckets * u->bucket_size;
|
||||
for (unsigned type = 0; type < u->nr_data_types; type++) {
|
||||
if (!data_type_is_empty(type))
|
||||
for (unsigned type = 0; type < u->nr_data_types; type++)
|
||||
if (type != BCH_DATA_unstriped)
|
||||
used += u->d[type].sectors;
|
||||
}
|
||||
|
||||
prt_printf(out, "%s (device %u):\t%s\r%s\r %02u%%\n",
|
||||
d->label ?: "(no label)", d->idx,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user