diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-10-08 18:45:29 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:29 -0400 |
commit | 37954a275fce612f60406bc79f5bc0b07b4b6558 (patch) | |
tree | 14acd88d70f6424860f91195622a167ef4eb1374 /fs/bcachefs/extents.h | |
parent | 9ef6068c4dce124235b335847570ae8f2bf2911d (diff) | |
download | lwn-37954a275fce612f60406bc79f5bc0b07b4b6558.tar.gz lwn-37954a275fce612f60406bc79f5bc0b07b4b6558.zip |
bcachefs: Limit pointers to being in only one stripe
This make the disk accounting code saner, and it's not clear why we'd
ever want the same data to be in multiple stripes simultaneously.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/extents.h')
-rw-r--r-- | fs/bcachefs/extents.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/bcachefs/extents.h b/fs/bcachefs/extents.h index 7253cd01db6a..cc7ee9067b50 100644 --- a/fs/bcachefs/extents.h +++ b/fs/bcachefs/extents.h @@ -228,7 +228,7 @@ struct bkey_ptrs { __label__ out; \ \ (_ptr).idx = 0; \ - (_ptr).ec_nr = 0; \ + (_ptr).has_ec = false; \ \ __bkey_extent_entry_for_each_from(_entry, _end, _entry) \ switch (extent_entry_type(_entry)) { \ @@ -242,7 +242,8 @@ struct bkey_ptrs { entry_to_crc(_entry)); \ break; \ case BCH_EXTENT_ENTRY_stripe_ptr: \ - (_ptr).ec[(_ptr).ec_nr++] = _entry->stripe_ptr; \ + (_ptr).ec = _entry->stripe_ptr; \ + (_ptr).has_ec = true; \ break; \ } \ out: \ |