• Home
  • Raw
  • Download

Lines Matching refs:r

234 	int r;  in sm_ll_extend()  local
252 r = dm_tm_new_block(ll->tm, &dm_sm_bitmap_validator, &b); in sm_ll_extend()
253 if (r < 0) in sm_ll_extend()
254 return r; in sm_ll_extend()
257 r = dm_tm_unlock(ll->tm, b); in sm_ll_extend()
258 if (r < 0) in sm_ll_extend()
259 return r; in sm_ll_extend()
264 r = ll->save_ie(ll, i, &idx); in sm_ll_extend()
265 if (r < 0) in sm_ll_extend()
266 return r; in sm_ll_extend()
275 int r; in sm_ll_lookup_bitmap() local
281 r = ll->load_ie(ll, index, &ie_disk); in sm_ll_lookup_bitmap()
282 if (r < 0) in sm_ll_lookup_bitmap()
283 return r; in sm_ll_lookup_bitmap()
285 r = dm_tm_read_lock(ll->tm, le64_to_cpu(ie_disk.blocknr), in sm_ll_lookup_bitmap()
287 if (r < 0) in sm_ll_lookup_bitmap()
288 return r; in sm_ll_lookup_bitmap()
298 int r = sm_ll_lookup_bitmap(ll, b, result); in sm_ll_lookup() local
300 if (r) in sm_ll_lookup()
301 return r; in sm_ll_lookup()
304 return r; in sm_ll_lookup()
306 r = dm_btree_lookup(&ll->ref_count_info, ll->ref_count_root, &b, &le_rc); in sm_ll_lookup()
307 if (r < 0) in sm_ll_lookup()
308 return r; in sm_ll_lookup()
312 return r; in sm_ll_lookup()
318 int r; in sm_ll_find_free_block() local
334 r = ll->load_ie(ll, i, &ie_disk); in sm_ll_find_free_block()
335 if (r < 0) in sm_ll_find_free_block()
336 return r; in sm_ll_find_free_block()
341 r = dm_tm_read_lock(ll->tm, le64_to_cpu(ie_disk.blocknr), in sm_ll_find_free_block()
343 if (r < 0) in sm_ll_find_free_block()
344 return r; in sm_ll_find_free_block()
348 r = sm_find_free(dm_bitmap_data(blk), in sm_ll_find_free_block()
351 if (r == -ENOSPC) { in sm_ll_find_free_block()
359 } else if (r < 0) { in sm_ll_find_free_block()
361 return r; in sm_ll_find_free_block()
364 r = dm_tm_unlock(ll->tm, blk); in sm_ll_find_free_block()
365 if (r < 0) in sm_ll_find_free_block()
366 return r; in sm_ll_find_free_block()
378 int r; in sm_ll_insert() local
387 r = ll->load_ie(ll, index, &ie_disk); in sm_ll_insert()
388 if (r < 0) in sm_ll_insert()
389 return r; in sm_ll_insert()
391 r = dm_tm_shadow_block(ll->tm, le64_to_cpu(ie_disk.blocknr), in sm_ll_insert()
393 if (r < 0) { in sm_ll_insert()
395 return r; in sm_ll_insert()
405 r = dm_tm_unlock(ll->tm, nb); in sm_ll_insert()
406 if (r < 0) in sm_ll_insert()
407 return r; in sm_ll_insert()
410 r = dm_btree_remove(&ll->ref_count_info, in sm_ll_insert()
413 if (r) in sm_ll_insert()
414 return r; in sm_ll_insert()
421 r = dm_tm_unlock(ll->tm, nb); in sm_ll_insert()
422 if (r < 0) in sm_ll_insert()
423 return r; in sm_ll_insert()
426 r = dm_btree_insert(&ll->ref_count_info, ll->ref_count_root, in sm_ll_insert()
428 if (r < 0) { in sm_ll_insert()
430 return r; in sm_ll_insert()
453 int r; in sm_ll_inc() local
456 r = sm_ll_lookup(ll, b, &rc); in sm_ll_inc()
457 if (r) in sm_ll_inc()
458 return r; in sm_ll_inc()
465 int r; in sm_ll_dec() local
468 r = sm_ll_lookup(ll, b, &rc); in sm_ll_dec()
469 if (r) in sm_ll_dec()
470 return r; in sm_ll_dec()
480 int r = 0; in sm_ll_commit() local
483 r = ll->commit(ll); in sm_ll_commit()
484 if (!r) in sm_ll_commit()
488 return r; in sm_ll_commit()
510 int r; in metadata_ll_init_index() local
513 r = dm_tm_new_block(ll->tm, &index_validator, &b); in metadata_ll_init_index()
514 if (r < 0) in metadata_ll_init_index()
515 return r; in metadata_ll_init_index()
525 int r; in metadata_ll_open() local
528 r = dm_tm_read_lock(ll->tm, ll->bitmap_root, in metadata_ll_open()
530 if (r) in metadata_ll_open()
531 return r; in metadata_ll_open()
544 int r, inc; in metadata_ll_commit() local
547 r = dm_tm_shadow_block(ll->tm, ll->bitmap_root, &index_validator, &b, &inc); in metadata_ll_commit()
548 if (r) in metadata_ll_commit()
549 return r; in metadata_ll_commit()
559 int r; in sm_ll_new_metadata() local
561 r = sm_ll_init(ll, tm); in sm_ll_new_metadata()
562 if (r < 0) in sm_ll_new_metadata()
563 return r; in sm_ll_new_metadata()
575 r = ll->init_index(ll); in sm_ll_new_metadata()
576 if (r < 0) in sm_ll_new_metadata()
577 return r; in sm_ll_new_metadata()
579 r = dm_btree_empty(&ll->ref_count_info, &ll->ref_count_root); in sm_ll_new_metadata()
580 if (r < 0) in sm_ll_new_metadata()
581 return r; in sm_ll_new_metadata()
589 int r; in sm_ll_open_metadata() local
597 r = sm_ll_init(ll, tm); in sm_ll_open_metadata()
598 if (r < 0) in sm_ll_open_metadata()
599 return r; in sm_ll_open_metadata()
655 int r; in sm_ll_new_disk() local
657 r = sm_ll_init(ll, tm); in sm_ll_new_disk()
658 if (r < 0) in sm_ll_new_disk()
659 return r; in sm_ll_new_disk()
671 r = ll->init_index(ll); in sm_ll_new_disk()
672 if (r < 0) in sm_ll_new_disk()
673 return r; in sm_ll_new_disk()
675 r = dm_btree_empty(&ll->ref_count_info, &ll->ref_count_root); in sm_ll_new_disk()
676 if (r < 0) in sm_ll_new_disk()
677 return r; in sm_ll_new_disk()
685 int r; in sm_ll_open_disk() local
693 r = sm_ll_init(ll, tm); in sm_ll_open_disk()
694 if (r < 0) in sm_ll_open_disk()
695 return r; in sm_ll_open_disk()