diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-06-04 18:10:23 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-06-04 18:10:29 -0400 |
commit | 8642d4ae10f167a2eb850403f6d2b60757242b31 (patch) | |
tree | 6cd7f6586f779a806e7f33c8f3e76aebc1cf1064 /libbcachefs/quota.c | |
parent | 1f78fed4693a5361f56508daac59bebd5b556379 (diff) |
Update bcachefs sources to 7c0fe6f104 bcachefs: Fix bch2_fsck_ask_yn()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/quota.c')
-rw-r--r-- | libbcachefs/quota.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libbcachefs/quota.c b/libbcachefs/quota.c index 310eb9d2..d20ec976 100644 --- a/libbcachefs/quota.c +++ b/libbcachefs/quota.c @@ -576,6 +576,13 @@ static int bch2_fs_quota_read_inode(struct btree_trans *trans, le32_to_cpu(s_t.master_subvol), k.k->p.offset, }, &u); + /* + * Inode might be deleted in this snapshot - the easiest way to handle + * that is to just skip it here: + */ + if (bch2_err_matches(ret, ENOENT)) + goto advance; + if (ret) return ret; @@ -615,7 +622,7 @@ int bch2_fs_quota_read(struct bch_fs *c) POS_MIN, BTREE_ITER_PREFETCH|BTREE_ITER_ALL_SNAPSHOTS, k, bch2_fs_quota_read_inode(&trans, &iter, k)); if (ret) - bch_err(c, "err in quota_read: %s", bch2_err_str(ret)); + bch_err(c, "%s: err %s", __func__, bch2_err_str(ret)); bch2_trans_exit(&trans); return ret; @@ -893,7 +900,7 @@ static int bch2_get_next_quota(struct super_block *sb, struct kqid *kqid, ret = -ENOENT; found: mutex_unlock(&q->lock); - return ret; + return bch2_err_class(ret); } static int bch2_set_quota_trans(struct btree_trans *trans, @@ -953,7 +960,7 @@ static int bch2_set_quota(struct super_block *sb, struct kqid qid, bch2_set_quota_trans(&trans, &new_quota, qdq)) ?: __bch2_quota_set(c, bkey_i_to_s_c(&new_quota.k_i), qdq); - return ret; + return bch2_err_class(ret); } const struct quotactl_ops bch2_quotactl_operations = { |