]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/alloc_foreground.c
Update bcachefs sources to 33a60d9b05 bcachefs: Assorted fixes for clang
[bcachefs-tools-debian] / libbcachefs / alloc_foreground.c
index fcb7311b184463313b965b01ef1785c1bdc09c43..1f4c5b38562d9cabb4b886b794c9750d7e64b1a8 100644 (file)
@@ -1042,8 +1042,12 @@ static bool should_drop_bucket(struct open_bucket *ob, struct bch_fs *c,
                unsigned i;
 
                if (!drop && ob->ec) {
+                       unsigned nr_blocks;
+
                        mutex_lock(&ob->ec->lock);
-                       for (i = 0; i < ob->ec->new_stripe.key.v.nr_blocks; i++) {
+                       nr_blocks = bkey_i_to_stripe(&ob->ec->new_stripe.key)->v.nr_blocks;
+
+                       for (i = 0; i < nr_blocks; i++) {
                                if (!ob->ec->blocks[i])
                                        continue;