diff options
Diffstat (limited to 'libbcachefs/ec.c')
-rw-r--r-- | libbcachefs/ec.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libbcachefs/ec.c b/libbcachefs/ec.c index 5287b5ee..045a3316 100644 --- a/libbcachefs/ec.c +++ b/libbcachefs/ec.c @@ -739,7 +739,6 @@ found_slot: bch2_trans_update(&trans, iter, &stripe->k_i); ret = bch2_trans_commit(&trans, NULL, NULL, - BTREE_INSERT_ATOMIC| BTREE_INSERT_NOFAIL); err: if (ret == -EINTR) @@ -822,7 +821,6 @@ static int ec_stripe_update_ptrs(struct bch_fs *c, bch2_trans_update(&trans, iter, sk.k); ret = bch2_trans_commit(&trans, NULL, NULL, - BTREE_INSERT_ATOMIC| BTREE_INSERT_NOFAIL| BTREE_INSERT_USE_RESERVE); if (ret == -EINTR) @@ -1259,8 +1257,13 @@ int bch2_stripes_write(struct bch_fs *c, unsigned flags, bool *wrote) if (!m->dirty) continue; - ret = __bch2_stripe_write_key(&trans, iter, m, giter.pos, - new_key, flags); + do { + bch2_trans_reset(&trans, TRANS_RESET_MEM); + + ret = __bch2_stripe_write_key(&trans, iter, m, + giter.pos, new_key, flags); + } while (ret == -EINTR); + if (ret) break; |