Update bcachefs sources to 44dc1f2695 bcachefs: Fix stripe_idx_to_delete()

This commit is contained in:
Kent Overstreet 2019-07-11 12:46:42 -04:00
parent f96ba8e0aa
commit 33c91e2ff4
3 changed files with 4 additions and 2 deletions

View File

@ -1 +1 @@
b91a514413ecdd15e0f9d8290761d24663a93425
44dc1f269553f33cce43628444970efb85a7e802

View File

@ -575,7 +575,8 @@ static ssize_t stripe_idx_to_delete(struct bch_fs *c)
{
ec_stripes_heap *h = &c->ec_stripes_heap;
return h->data[0].blocks_nonempty == 0 ? h->data[0].idx : -1;
return h->used && h->data[0].blocks_nonempty == 0
? h->data[0].idx : -1;
}
static inline int ec_stripes_heap_cmp(ec_stripes_heap *h,

View File

@ -309,6 +309,7 @@ void bch2_fs_read_only(struct bch_fs *c)
*/
percpu_ref_kill(&c->writes);
cancel_work_sync(&c->ec_stripe_delete_work);
cancel_delayed_work(&c->pd_controllers_update);
/*