mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-23 00:00:02 +03:00
Update bcachefs sources to 82792a451950 bcachefs: Switch some bch2_dev_rcu() calls to _noerror
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
cd35891eb9
commit
bc5d903fda
@ -1 +1 @@
|
|||||||
ec2ddb95112b8967753591b16e2e439eee76c5b1
|
82792a451950397b8594b399bed03cfda1f31299
|
||||||
|
@ -55,7 +55,7 @@ int bch2_backpointer_validate(struct bch_fs *c, struct bkey_s_c k,
|
|||||||
struct bkey_s_c_backpointer bp = bkey_s_c_to_backpointer(k);
|
struct bkey_s_c_backpointer bp = bkey_s_c_to_backpointer(k);
|
||||||
|
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
struct bch_dev *ca = bch2_dev_rcu(c, bp.k->p.inode);
|
struct bch_dev *ca = bch2_dev_rcu_noerror(c, bp.k->p.inode);
|
||||||
if (!ca) {
|
if (!ca) {
|
||||||
/* these will be caught by fsck */
|
/* these will be caught by fsck */
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
@ -89,7 +89,7 @@ void bch2_backpointer_to_text(struct printbuf *out, const struct bch_backpointer
|
|||||||
void bch2_backpointer_k_to_text(struct printbuf *out, struct bch_fs *c, struct bkey_s_c k)
|
void bch2_backpointer_k_to_text(struct printbuf *out, struct bch_fs *c, struct bkey_s_c k)
|
||||||
{
|
{
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
struct bch_dev *ca = bch2_dev_rcu(c, k.k->p.inode);
|
struct bch_dev *ca = bch2_dev_rcu_noerror(c, k.k->p.inode);
|
||||||
if (ca) {
|
if (ca) {
|
||||||
struct bpos bucket = bp_pos_to_bucket(ca, k.k->p);
|
struct bpos bucket = bp_pos_to_bucket(ca, k.k->p);
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
@ -673,7 +673,7 @@ static int check_extent_to_backpointers(struct btree_trans *trans,
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
struct bch_dev *ca = bch2_dev_rcu(c, p.ptr.dev);
|
struct bch_dev *ca = bch2_dev_rcu_noerror(c, p.ptr.dev);
|
||||||
if (ca)
|
if (ca)
|
||||||
bch2_extent_ptr_to_bp(c, ca, btree, level, k, p, entry, &bucket_pos, &bp);
|
bch2_extent_ptr_to_bp(c, ca, btree, level, k, p, entry, &bucket_pos, &bp);
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
|
@ -1027,7 +1027,7 @@ void bch2_extent_ptr_to_text(struct printbuf *out, struct bch_fs *c, const struc
|
|||||||
{
|
{
|
||||||
out->atomic++;
|
out->atomic++;
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
struct bch_dev *ca = bch2_dev_rcu(c, ptr->dev);
|
struct bch_dev *ca = bch2_dev_rcu_noerror(c, ptr->dev);
|
||||||
if (!ca) {
|
if (!ca) {
|
||||||
prt_printf(out, "ptr: %u:%llu gen %u%s", ptr->dev,
|
prt_printf(out, "ptr: %u:%llu gen %u%s", ptr->dev,
|
||||||
(u64) ptr->offset, ptr->gen,
|
(u64) ptr->offset, ptr->gen,
|
||||||
@ -1131,8 +1131,9 @@ static int extent_ptr_validate(struct bch_fs *c,
|
|||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
/* bad pointers are repaired by check_fix_ptrs(): */
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
struct bch_dev *ca = bch2_dev_rcu(c, ptr->dev);
|
struct bch_dev *ca = bch2_dev_rcu_noerror(c, ptr->dev);
|
||||||
if (!ca) {
|
if (!ca) {
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -524,7 +524,7 @@ static void bch2_sb_update(struct bch_fs *c)
|
|||||||
c->sb.time_units_per_sec = NSEC_PER_SEC / c->sb.nsec_per_time_unit;
|
c->sb.time_units_per_sec = NSEC_PER_SEC / c->sb.nsec_per_time_unit;
|
||||||
|
|
||||||
/* XXX this is wrong, we need a 96 or 128 bit integer type */
|
/* XXX this is wrong, we need a 96 or 128 bit integer type */
|
||||||
c->sb.time_base_lo = div64_u64(le64_to_cpu(src->time_base_lo),
|
c->sb.time_base_lo = div_u64(le64_to_cpu(src->time_base_lo),
|
||||||
c->sb.nsec_per_time_unit);
|
c->sb.nsec_per_time_unit);
|
||||||
c->sb.time_base_hi = le32_to_cpu(src->time_base_hi);
|
c->sb.time_base_hi = le32_to_cpu(src->time_base_hi);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user