Lines Matching +full:9 +full:k

168 				new->k.p, BTREE_ITER_slots, old, ret) {  in bch2_sum_sector_overwrites()
169 s64 sectors = min(new->k.p.offset, old.k->p.offset) - in bch2_sum_sector_overwrites()
170 max(bkey_start_offset(&new->k), in bch2_sum_sector_overwrites()
171 bkey_start_offset(old.k)); in bch2_sum_sector_overwrites()
174 (bkey_extent_is_allocation(&new->k) - in bch2_sum_sector_overwrites()
175 bkey_extent_is_allocation(old.k)); in bch2_sum_sector_overwrites()
178 *disk_sectors_delta -= new->k.p.snapshot == old.k->p.snapshot in bch2_sum_sector_overwrites()
183 (new->k.p.snapshot != old.k->p.snapshot || in bch2_sum_sector_overwrites()
188 if (bkey_ge(old.k->p, new->k.p)) in bch2_sum_sector_overwrites()
215 struct bkey_s_c k = bch2_bkey_get_iter(trans, &iter, BTREE_ID_inodes, in bch2_extent_update_i_size_sectors() local
220 int ret = bkey_err(k); in bch2_extent_update_i_size_sectors()
228 struct bkey_i *k_mut = bch2_trans_kmalloc_nomemzero(trans, bkey_bytes(k.k) + 8); in bch2_extent_update_i_size_sectors()
233 bkey_reassemble(k_mut, k); in bch2_extent_update_i_size_sectors()
235 if (unlikely(k_mut->k.type != KEY_TYPE_inode_v3)) { in bch2_extent_update_i_size_sectors()
255 if (inode->k.p.snapshot != iter.snapshot) { in bch2_extent_update_i_size_sectors()
256 inode->k.p.snapshot = iter.snapshot; in bch2_extent_update_i_size_sectors()
271 struct bkey_i *k, in bch2_extent_update() argument
292 ret = bch2_extent_trim_atomic(trans, iter, k); in bch2_extent_update()
296 next_pos = k->k.p; in bch2_extent_update()
298 ret = bch2_sum_sector_overwrites(trans, iter, k, in bch2_extent_update()
322 min(k->k.p.offset << 9, new_i_size), in bch2_extent_update()
324 bch2_trans_update(trans, iter, k, 0) ?: in bch2_extent_update()
342 struct bkey_i *k = bch2_keylist_front(keys); in bch2_write_index_default() local
347 .inum = k->k.p.inode, in bch2_write_index_default()
358 k = bch2_keylist_front(keys); in bch2_write_index_default()
359 bch2_bkey_buf_copy(&sk, c, k); in bch2_write_index_default()
362 &sk.k->k.p.snapshot); in bch2_write_index_default()
369 bkey_start_pos(&sk.k->k), in bch2_write_index_default()
372 ret = bch2_bkey_set_needs_rebalance(c, sk.k, &op->opts) ?: in bch2_write_index_default()
373 bch2_extent_update(trans, inum, &iter, sk.k, in bch2_write_index_default()
384 if (bkey_ge(iter.pos, k->k.p)) in bch2_write_index_default()
387 bch2_cut_front(iter.pos, k); in bch2_write_index_default()
400 const struct bkey_i *k, in bch2_submit_wbio_replicas() argument
403 struct bkey_ptrs_c ptrs = bch2_bkey_ptrs_c(bkey_i_to_s_c(k)); in bch2_submit_wbio_replicas()
434 n->inode_offset = bkey_start_offset(&k->k); in bch2_submit_wbio_replicas()
488 if (bkey_extent_is_direct_data(&src->k)) { in bch2_write_drop_io_error_ptrs()
497 memmove_u64s_down(dst, src, src->k.u64s); in bch2_write_drop_io_error_ptrs()
538 insert->k.p.inode, insert->k.p.offset << 9, in __bch2_write_index()
657 wbio->inode_offset << 9, in bch2_write_endio()
698 e->k.p = op->pos; in init_append_extent()
699 e->k.size = crc.uncompressed_size; in init_append_extent()
700 e->k.bversion = version; in init_append_extent()
722 min(wp->sectors_free << 9, src->bi_iter.bi_size); in bch2_write_bio_alloc()
783 bio_advance(bio, op->crc.offset << 9); in bch2_write_rechecksum()
784 bio->bi_iter.bi_size = op->crc.live_size << 9; in bch2_write_rechecksum()
832 op->crc.uncompressed_size <= c->opts.encoded_extent_max >> 9 && in bch2_write_prep_encoded_data()
950 dst->bi_iter.bi_size < (wp->sectors_free << 9) && in bch2_write_extent()
967 dst_len = min_t(unsigned, dst_len, wp->sectors_free << 9); in bch2_write_extent()
989 op->nonce += src_len >> 9; in bch2_write_extent()
1013 src_len >> 9, in bch2_write_extent()
1014 bio_sectors(src) - (src_len >> 9), in bch2_write_extent()
1028 src_len >> 9, in bch2_write_extent()
1029 bio_sectors(src) - (src_len >> 9), in bch2_write_extent()
1033 crc.compressed_size = dst_len >> 9; in bch2_write_extent()
1034 crc.uncompressed_size = src_len >> 9; in bch2_write_extent()
1035 crc.live_size = src_len >> 9; in bch2_write_extent()
1071 dst = bio_split(src, total_input >> 9, in bch2_write_extent()
1085 op->pos.offset << 9, in bch2_write_extent()
1099 struct bkey_s_c k) in bch2_extent_is_writeable() argument
1107 if (k.k->type != KEY_TYPE_extent) in bch2_extent_is_writeable()
1110 e = bkey_s_c_to_extent(k); in bch2_extent_is_writeable()
1129 struct bkey_s_c k, in bch2_nocow_write_convert_one_unwritten() argument
1132 if (!bch2_extents_match(bkey_i_to_s_c(orig), k)) { in bch2_nocow_write_convert_one_unwritten()
1137 struct bkey_i *new = bch2_bkey_make_mut_noupdate(trans, k); in bch2_nocow_write_convert_one_unwritten()
1142 bch2_cut_front(bkey_start_pos(&orig->k), new); in bch2_nocow_write_convert_one_unwritten()
1143 bch2_cut_back(orig->k.p, new); in bch2_nocow_write_convert_one_unwritten()
1157 min(new->k.p.offset << 9, new_i_size), 0) ?: in bch2_nocow_write_convert_one_unwritten()
1169 bkey_start_pos(&orig->k), orig->k.p, in bch2_nocow_write_convert_unwritten()
1170 BTREE_ITER_intent, k, in bch2_nocow_write_convert_unwritten()
1172 bch2_nocow_write_convert_one_unwritten(trans, &iter, orig, k, op->new_i_size); in bch2_nocow_write_convert_unwritten()
1179 insert->k.p.inode, insert->k.p.offset << 9, in bch2_nocow_write_convert_unwritten()
1221 struct bkey_s_c k; in bch2_nocow_write() local
1251 k = bch2_btree_iter_peek_slot(&iter); in bch2_nocow_write()
1252 ret = bkey_err(k); in bch2_nocow_write()
1257 if (unlikely(k.k->p.snapshot != snapshot || in bch2_nocow_write()
1258 !bch2_extent_is_writeable(op, k))) in bch2_nocow_write()
1264 k.k->u64s)) in bch2_nocow_write()
1268 struct bkey_ptrs_c ptrs = bch2_bkey_ptrs_c(k); in bch2_nocow_write()
1289 bkey_reassemble(op->insert_keys.top, k); in bch2_nocow_write()
1312 if (k.k->p.offset < op->pos.offset + bio_sectors(bio)) { in bch2_nocow_write()
1313 bio = bio_split(bio, k.k->p.offset - op->pos.offset, in bch2_nocow_write()
1344 op->pos.inode, op->pos.offset << 9, in bch2_nocow_write()
1387 (bch2_bkey_val_to_text(&buf, c, k), buf.buf))) { in bch2_nocow_write()
1469 op->pos.offset << 9, in __bch2_write()
1543 id->k.p = op->pos; in bch2_write_data_inline()
1544 id->k.bversion = op->version; in bch2_write_data_inline()
1545 id->k.size = sectors; in bch2_write_data_inline()
1553 set_bkey_val_bytes(&id->k, data_len); in bch2_write_data_inline()
1601 op->pos.offset << 9, in CLOSURE_CALLBACK()
1623 op->new_i_size - (op->pos.offset << 9)); in CLOSURE_CALLBACK()