mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-12-09 00:00:17 +03:00
Update bcachefs sources to bd6ed9fb42 fixup! bcachefs: Fix initialization of bch_write_op.nonce
This commit is contained in:
parent
2b8c1bb091
commit
08802949e2
@ -1 +1 @@
|
|||||||
3f3f9698592290e98a727f5023115c1775be7d5f
|
bd6ed9fb42c0aa36d1f4a21eeab45fe12e1fb792
|
||||||
|
|||||||
@ -770,7 +770,12 @@ struct btree *bch2_btree_node_get(struct btree_trans *trans, struct btree_path *
|
|||||||
|
|
||||||
if (c->opts.btree_node_mem_ptr_optimization) {
|
if (c->opts.btree_node_mem_ptr_optimization) {
|
||||||
b = btree_node_mem_ptr(k);
|
b = btree_node_mem_ptr(k);
|
||||||
if (b)
|
/*
|
||||||
|
* Check b->hash_val _before_ calling btree_node_lock() - this
|
||||||
|
* might not be the node we want anymore, and trying to lock the
|
||||||
|
* wrong node could cause an unneccessary transaction restart:
|
||||||
|
*/
|
||||||
|
if (b && b->hash_val == btree_ptr_hash_val(k))
|
||||||
goto lock_node;
|
goto lock_node;
|
||||||
}
|
}
|
||||||
retry:
|
retry:
|
||||||
|
|||||||
@ -795,6 +795,9 @@ bch2_trans_commit_get_rw_cold(struct btree_trans *trans)
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
if (!bch2_trans_relock(trans))
|
||||||
|
return -EINTR;
|
||||||
|
|
||||||
percpu_ref_get(&c->writes);
|
percpu_ref_get(&c->writes);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -263,7 +263,7 @@ int bch2_migrate_write_init(struct bch_fs *c, struct migrate_write *m,
|
|||||||
*/
|
*/
|
||||||
bkey_for_each_crc(k.k, ptrs, crc, entry)
|
bkey_for_each_crc(k.k, ptrs, crc, entry)
|
||||||
if (bch2_csum_type_is_encryption(crc.csum_type)) {
|
if (bch2_csum_type_is_encryption(crc.csum_type)) {
|
||||||
m->op.nonce = crc.nonce + m->op.crc.offset;
|
m->op.nonce = crc.nonce + crc.offset;
|
||||||
m->op.csum_type = crc.csum_type;
|
m->op.csum_type = crc.csum_type;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user