Lines Matching refs:ret

114 	int ret = 0;
126 ret = bch2_bkey_ptrs_invalid(c, k, flags, err);
128 return ret;
177 int ret = 0;
186 ret = bch2_check_bucket_ref(trans, s.s_c, ptr, sectors, data_type,
189 if (ret)
200 ret = -EIO;
210 ret = -EIO;
223 ret = -EIO;
236 ret = bch2_trans_update(trans, &iter, &a->k_i, 0);
237 if (ret)
241 return ret;
259 int ret = 0;
274 ret = -EINVAL;
281 ret = bch2_check_bucket_ref(trans, k, ptr, sectors, data_type,
284 if (ret)
295 if (!ret)
299 return ret;
335 int ret = bch2_update_replicas_list(trans, &r.e, sectors * new_s->nr_redundant);
336 if (ret)
337 return ret;
345 int ret = bch2_update_replicas_list(trans, &r.e, sectors * old_s->nr_redundant);
346 if (ret)
347 return ret;
359 int ret = bch2_trans_mark_stripe_bucket(trans,
361 if (ret)
362 return ret;
366 int ret = bch2_trans_mark_stripe_bucket(trans,
368 if (ret)
369 return ret;
443 int ret = mark_stripe_bucket(trans, new, i, flags);
444 if (ret)
445 return ret;
448 int ret = bch2_update_replicas(c, new, &m->r.e,
451 if (ret) {
457 return ret;
769 int ret;
773 ret = bkey_err(k);
774 if (ret)
777 ret = -ENOENT;
783 return ret;
794 int ret = 0;
804 ret = lockrestart_do(trans, get_stripe_key_trans(trans, rbio->pick.ec.idx, buf));
805 if (ret) {
807 "error doing reconstruct read: error %i looking up stripe", ret);
817 ret = -EIO;
825 ret = -EIO;
829 ret = ec_stripe_buf_init(buf, offset, bio_sectors(&rbio->bio));
830 if (ret)
841 ret = -EIO;
847 ret = ec_do_recov(c, buf);
848 if (ret)
856 return ret;
916 bool ret = false;
919 ret = __bch2_stripe_is_open(c, idx);
922 return ret;
929 bool ret;
932 ret = !__bch2_stripe_is_open(c, idx);
933 if (ret) {
941 return ret;
1060 int ret;
1064 ret = bkey_err(k);
1065 if (ret)
1070 ret = -EINVAL;
1082 ret = -EINVAL;
1086 ret = bch2_btree_delete_at(trans, &iter, 0);
1089 return ret;
1105 int ret = bch2_trans_do(c, NULL, NULL, BCH_TRANS_COMMIT_no_enospc,
1107 bch_err_fn(c, ret);
1108 if (ret)
1131 int ret;
1135 ret = bkey_err(k);
1136 if (ret)
1143 ret = -EINVAL;
1153 ret = -EINVAL;
1169 ret = bch2_trans_update(trans, &iter, &new->k_i, 0);
1172 return ret;
1189 int ret, dev, block;
1191 ret = bch2_get_next_backpointer(trans, bucket, gen,
1193 if (ret)
1194 return ret;
1218 ret = bkey_err(k);
1219 if (ret)
1220 return ret;
1243 ret = PTR_ERR_OR_ZERO(n);
1244 if (ret)
1264 ret = bch2_trans_update(trans, &iter, n, 0);
1267 return ret;
1278 int ret = 0;
1281 ret = commit_do(trans, NULL, NULL,
1286 if (ret)
1294 return ret;
1302 int ret = 0;
1304 ret = bch2_btree_write_buffer_flush_sync(trans);
1305 if (ret)
1309 ret = ec_stripe_update_bucket(trans, s, i);
1310 if (ret)
1316 return ret;
1326 int ret;
1337 ret = blkdev_issue_zeroout(ca->disk_sb.bdev,
1344 if (ret)
1345 s->err = ret;
1364 int ret;
1419 ret = bch2_trans_do(c, &s->res, NULL,
1425 bch_err_msg(c, ret, "creating stripe key");
1426 if (ret) {
1430 ret = ec_stripe_update_extents(c, &s->new_stripe);
1431 bch_err_msg(c, ret, "error updating extents");
1432 if (ret)
1701 int ret;
1706 ret = bch2_trans_mutex_lock(trans, &c->ec_stripe_head_lock);
1707 if (ret)
1708 return ERR_PTR(ret);
1720 ret = bch2_trans_mutex_lock(trans, &h->lock);
1721 if (ret)
1722 h = ERR_PTR(ret);
1747 int ret = 0;
1765 ret = bch2_bucket_alloc_set_trans(trans, &buckets,
1786 if (ret)
1787 return ret;
1792 ret = bch2_bucket_alloc_set_trans(trans, &buckets,
1812 if (ret)
1813 return ret;
1827 s64 ret = -1;
1847 ret = stripe_idx;
1852 return ret;
1862 int ret;
1872 ret = get_stripe_key_trans(trans, idx, &h->s->existing_stripe);
1873 bch2_fs_fatal_err_on(ret && !bch2_err_matches(ret, BCH_ERR_transaction_restart), c,
1874 "reading stripe key: %s", bch2_err_str(ret));
1875 if (ret) {
1877 return ret;
1886 ret = ec_stripe_buf_init(&h->s->existing_stripe, 0, h->blocksize);
1887 if (ret) {
1889 return ret;
1928 int ret;
1931 ret = bch2_disk_reservation_get(c, &h->s->res,
1935 if (ret)
1936 return ret;
1940 BTREE_ITER_SLOTS|BTREE_ITER_INTENT, k, ret) {
1948 ret = -BCH_ERR_ENOSPC_stripe_create;
1959 if (ret)
1962 ret = ec_stripe_mem_alloc(trans, &iter);
1963 if (ret) {
1971 return ret;
1987 int ret;
1994 ret = ec_new_stripe_alloc(c, h);
1995 if (ret) {
2008 ret = new_stripe_alloc_buckets(trans, h, BCH_WATERMARK_stripe, NULL) ?:
2010 if (!ret)
2012 if (bch2_err_matches(ret, BCH_ERR_transaction_restart) ||
2013 bch2_err_matches(ret, ENOMEM))
2021 ret = __bch2_ec_stripe_head_reuse(trans, h);
2022 if (!ret)
2024 if (waiting || !cl || ret != -BCH_ERR_stripe_alloc_blocked)
2028 ret = new_stripe_alloc_buckets(trans, h, watermark, NULL) ?:
2030 if (ret)
2047 ret = new_stripe_alloc_buckets(trans, h, watermark, cl);
2048 if (ret)
2052 ret = ec_stripe_buf_init(&h->s->new_stripe, 0, h->blocksize);
2053 if (ret)
2064 return ERR_PTR(ret);
2112 bool ret;
2115 ret = list_empty(&c->ec_stripe_new_list);
2118 return ret;
2128 int ret = bch2_trans_run(c,
2134 ret = __ec_stripe_mem_alloc(c, k.k->p.offset, GFP_KERNEL);
2135 if (ret)
2153 bch_err_fn(c, ret);
2154 return ret;