Lines Matching refs:insert
229 struct bkey *insert, in bch_btree_ptr_insert_fixup() argument
235 if (!KEY_OFFSET(insert)) in bch_btree_ptr_insert_fixup()
339 struct bkey *insert, in bch_extent_insert_fixup() argument
348 BUG_ON(!KEY_OFFSET(insert)); in bch_extent_insert_fixup()
349 BUG_ON(!KEY_SIZE(insert)); in bch_extent_insert_fixup()
357 if (bkey_cmp(&START_KEY(k), insert) >= 0) { in bch_extent_insert_fixup()
364 if (bkey_cmp(k, &START_KEY(insert)) <= 0) in bch_extent_insert_fixup()
393 if (KEY_START(k) > KEY_START(insert) + sectors_found) in bch_extent_insert_fixup()
408 sectors_found = KEY_OFFSET(k) - KEY_START(insert); in bch_extent_insert_fixup()
411 if (bkey_cmp(insert, k) < 0 && in bch_extent_insert_fixup()
412 bkey_cmp(&START_KEY(insert), &START_KEY(k)) > 0) { in bch_extent_insert_fixup()
422 bch_subtract_dirty(k, c, KEY_START(insert), in bch_extent_insert_fixup()
423 KEY_SIZE(insert)); in bch_extent_insert_fixup()
439 insert); in bch_extent_insert_fixup()
448 bch_cut_front(insert, top); in bch_extent_insert_fixup()
449 bch_cut_back(&START_KEY(insert), k); in bch_extent_insert_fixup()
454 if (bkey_cmp(insert, k) < 0) { in bch_extent_insert_fixup()
455 bch_cut_front(insert, k); in bch_extent_insert_fixup()
457 if (bkey_cmp(&START_KEY(insert), &START_KEY(k)) > 0) in bch_extent_insert_fixup()
458 old_offset = KEY_START(insert); in bch_extent_insert_fixup()
461 bkey_cmp(&START_KEY(insert), &START_KEY(k)) <= 0) { in bch_extent_insert_fixup()
468 __bch_cut_back(&START_KEY(insert), k); in bch_extent_insert_fixup()
480 } else if (sectors_found < KEY_SIZE(insert)) { in bch_extent_insert_fixup()
481 SET_KEY_OFFSET(insert, KEY_OFFSET(insert) - in bch_extent_insert_fixup()
482 (KEY_SIZE(insert) - sectors_found)); in bch_extent_insert_fixup()
483 SET_KEY_SIZE(insert, sectors_found); in bch_extent_insert_fixup()
487 if (KEY_DIRTY(insert)) in bch_extent_insert_fixup()
488 bcache_dev_sectors_dirty_add(c, KEY_INODE(insert), in bch_extent_insert_fixup()
489 KEY_START(insert), in bch_extent_insert_fixup()
490 KEY_SIZE(insert)); in bch_extent_insert_fixup()