| /linux-6.15/fs/bcachefs/ |
| H A D | journal.h | 199 entry->u64s = cpu_to_le16(u64s); in bch2_journal_add_entry_noreservation() 201 le32_add_cpu(&jset->u64s, jset_u64s(u64s)); in bch2_journal_add_entry_noreservation() 214 unsigned u64s) in journal_entry_init() argument 216 entry->u64s = cpu_to_le16(u64s); in journal_entry_init() 223 return jset_u64s(u64s); in journal_entry_init() 239 unsigned level, unsigned u64s) in bch2_journal_add_entry() argument 245 EBUG_ON(actual > res->u64s); in bch2_journal_add_entry() 248 res->u64s -= actual; in bch2_journal_add_entry() 319 while (res->u64s) in bch2_journal_res_put() 365 new.cur_entry_offset += res->u64s; in journal_res_get_fast() [all …]
|
| H A D | util.h | 423 unsigned u64s) in memcpy_u64s_small() argument 428 while (u64s--) in memcpy_u64s_small() 433 unsigned u64s) in __memcpy_u64s() argument 446 while (u64s--) in __memcpy_u64s() 467 unsigned u64s) in memmove_u64s_down() argument 489 unsigned u64s) in __memmove_u64s_up_small() argument 494 while (u64s--) in __memmove_u64s_up_small() 499 unsigned u64s) in memmove_u64s_up_small() argument 522 while (u64s--) in __memmove_u64s_up() 528 unsigned u64s) in memmove_u64s_up() argument [all …]
|
| H A D | vstructs.h | 13 ( type_is((_s)->u64s, u64) ? le64_to_cpu((__force __le64) (_s)->u64s) \ 14 : type_is((_s)->u64s, u32) ? le32_to_cpu((__force __le32) (_s)->u64s) \ 15 : type_is((_s)->u64s, u16) ? le16_to_cpu((__force __le16) (_s)->u64s) \ 16 : ((__force u8) ((_s)->u64s))); \
|
| H A D | bkey_buf.h | 14 struct bch_fs *c, unsigned u64s) in bch2_bkey_buf_realloc() argument 17 u64s > ARRAY_SIZE(s->onstack)) { in bch2_bkey_buf_realloc() 27 bch2_bkey_buf_realloc(s, c, k.k->u64s); in bch2_bkey_buf_reassemble() 35 bch2_bkey_buf_realloc(s, c, src->k.u64s); in bch2_bkey_buf_copy()
|
| H A D | btree_trans_commit.c | 190 clobber_u64s = k->u64s; in bch2_btree_bset_insert_key() 209 clobber_u64s = k->u64s; in bch2_btree_bset_insert_key() 219 new_u64s = k->u64s; in bch2_btree_bset_insert_key() 413 ck->u64s = new_u64s; in btree_key_can_insert_cached_slowpath() 438 u64s += 1; in btree_key_can_insert_cached() 440 if (u64s <= ck->u64s) in btree_key_can_insert_cached() 452 ck->u64s = new_u64s; in btree_key_can_insert_cached() 590 unsigned u64s = 0; in bch2_trans_commit_write_locked() local 611 u64s = 0; in bch2_trans_commit_write_locked() 613 u64s += i->k->k.u64s; in bch2_trans_commit_write_locked() [all …]
|
| H A D | journal_io.h | 80 unsigned u64s = DIV_ROUND_UP(size, sizeof(u64)); in jset_entry_init() local 82 memset(entry, 0, u64s * sizeof(u64)); in jset_entry_init() 87 entry->u64s = cpu_to_le16(u64s - 1); in jset_entry_init()
|
| H A D | sb-clean.c | 38 le16_to_cpu(entry->u64s), le32_to_cpu(clean->field.u64s), in bch2_sb_clean_validate_late() 78 if (!entry->u64s) in btree_root_find() 132 k1->k.u64s != k2->k.u64s || in bch2_verify_superblock_clean() 253 !entry->u64s) in bch2_sb_clean_to_text() 289 unsigned u64s; in bch2_fs_mark_clean() local 303 u64s = sizeof(*sb_clean) / sizeof(u64) + c->journal.entry_u64s_reserved; in bch2_fs_mark_clean() 305 sb_clean = bch2_sb_field_resize(&c->disk_sb, clean, u64s); in bch2_fs_mark_clean()
|
| H A D | super-io.c | 126 unsigned u64s) in __bch2_sb_field_resize() argument 129 unsigned sb_u64s = le32_to_cpu(sb->sb->u64s) + u64s - old_u64s; in __bch2_sb_field_resize() 133 if (!f && !u64s) { in __bch2_sb_field_resize() 138 f->u64s = cpu_to_le32(u64s); in __bch2_sb_field_resize() 145 if (u64s) { in __bch2_sb_field_resize() 146 f->u64s = cpu_to_le32(u64s); in __bch2_sb_field_resize() 160 return u64s ? f : NULL; in __bch2_sb_field_resize() 247 unsigned u64s) in bch2_sb_field_resize_id() argument 282 unsigned u64s) in bch2_sb_field_get_minsize_id() argument 286 if (!f || le32_to_cpu(f->u64s) < u64s) in bch2_sb_field_get_minsize_id() [all …]
|
| H A D | bkey_types.h | 17 return (struct bkey_i *) ((u64 *) k->_data + k->k.u64s); in bkey_next() 20 #define bkey_val_u64s(_k) ((_k)->u64s - BKEY_U64s) 29 unsigned u64s = BKEY_U64s + val_u64s; in set_bkey_val_u64s() local 31 BUG_ON(u64s > U8_MAX); in set_bkey_val_u64s() 32 k->u64s = u64s; in set_bkey_val_u64s()
|
| H A D | btree_io.c | 314 u64s += le16_to_cpu(bset(b, t)->u64s); in btree_node_sort() 330 out->keys.u64s = cpu_to_le16(u64s); in btree_node_sort() 344 u64s = le16_to_cpu(out->keys.u64s); in btree_node_sort() 354 out->keys.u64s = cpu_to_le16(u64s); in btree_node_sort() 358 start_bset->u64s = out->keys.u64s; in btree_node_sort() 651 i->u64s = cpu_to_le16(le16_to_cpu(i->u64s) - shift); in bch2_btree_node_drop_keys_outside_node() 1236 u64s = le16_to_cpu(sorted->keys.u64s); in bch2_btree_node_read_done() 1238 sorted->keys.u64s = cpu_to_le16(u64s); in bch2_btree_node_read_done() 1262 i->u64s = cpu_to_le16(le16_to_cpu(i->u64s) - k->u64s); in bch2_btree_node_read_done() 2362 le16_add_cpu(&i->u64s, u64s); in __bch2_btree_node_write() [all …]
|
| H A D | btree_update.h | 116 bch2_trans_jset_entry_alloc(struct btree_trans *trans, unsigned u64s) in bch2_trans_jset_entry_alloc() argument 119 trans->journal_entries_u64s + u64s > trans->journal_entries_size) in bch2_trans_jset_entry_alloc() 120 return __bch2_trans_jset_entry_alloc(trans, u64s); in bch2_trans_jset_entry_alloc() 123 trans->journal_entries_u64s += u64s; in bch2_trans_jset_entry_alloc() 158 struct jset_entry *e = bch2_trans_jset_entry_alloc(trans, jset_u64s(k->k.u64s)); in bch2_trans_update_buffered() 163 journal_entry_init(e, BCH_JSET_ENTRY_write_buffer_keys, btree, 0, k->k.u64s); in bch2_trans_update_buffered() 242 mut->k.u64s = DIV_ROUND_UP(bytes, sizeof(u64)); in __bch2_bkey_make_mut_noupdate()
|
| H A D | journal_io.c | 293 le32_to_cpu(jset->u64s)); in journal_entry_err_msg() 341 if (journal_entry_err_on(!k->k.u64s, in journal_validate_key() 364 le16_add_cpu(&entry->u64s, -((u16) k->k.u64s)); in journal_validate_key() 376 le16_add_cpu(&entry->u64s, -((u16) k->k.u64s)); in journal_validate_key() 447 le16_to_cpu(entry->u64s) != k->k.u64s, in journal_entry_btree_root_validate() 457 entry->u64s = 0; in journal_entry_btree_root_validate() 997 le32_add_cpu(&jset->u64s, in jset_validate_early() 1875 unsigned sectors, bytes, u64s; in bch2_journal_write_prep() local 1890 unsigned u64s = le16_to_cpu(i->u64s); in bch2_journal_write_prep() local 1893 if (!u64s) in bch2_journal_write_prep() [all …]
|
| H A D | btree_update.c | 442 i->old_btree_u64s = !bkey_deleted(&i->old_k) ? i->old_k.u64s : 0; in bch2_trans_update_by_path() 567 unsigned new_top = trans->journal_entries_u64s + u64s; in __bch2_trans_jset_entry_alloc() 831 unsigned u64s = DIV_ROUND_UP(buf->pos, sizeof(u64)); in bch2_trans_log_msg() local 832 prt_chars(buf, '\0', u64s * sizeof(u64) - buf->pos); in bch2_trans_log_msg() 838 struct jset_entry *e = bch2_trans_jset_entry_alloc(trans, jset_u64s(u64s)); in bch2_trans_log_msg() 844 journal_entry_init(e, BCH_JSET_ENTRY_log, 0, 1, u64s); in bch2_trans_log_msg() 857 journal_entry_init(e, BCH_JSET_ENTRY_log_bkey, btree, level, k->k.u64s); in bch2_trans_log_bkey() 870 unsigned u64s = DIV_ROUND_UP(buf.pos, sizeof(u64)); in __bch2_fs_log_msg() local 871 prt_chars(&buf, '\0', u64s * sizeof(u64) - buf.pos); in __bch2_fs_log_msg() 883 journal_entry_init(&l->entry, BCH_JSET_ENTRY_log, 0, 1, u64s); in __bch2_fs_log_msg() [all …]
|
| H A D | bkey.c | 61 BUG_ON(packed->u64s < bkeyp_key_u64s(format, packed)); in bch2_bkey_pack_verify() 242 EBUG_ON(in->u64s - in_f->key_u64s + out_f->key_u64s > U8_MAX); in bch2_bkey_transform_key() 245 out->u64s = out_f->key_u64s + in->u64s - in_f->key_u64s; in bch2_bkey_transform_key() 262 (in->u64s - in_f->key_u64s)); in bch2_bkey_transform() 273 EBUG_ON(in->u64s < format->key_u64s); in __bch2_bkey_unpack_key() 275 EBUG_ON(in->u64s - format->key_u64s + BKEY_U64s > U8_MAX); in __bch2_bkey_unpack_key() 277 out.u64s = BKEY_U64s + in->u64s - format->key_u64s; in __bch2_bkey_unpack_key() 298 EBUG_ON(in->u64s < format->key_u64s); in __bkey_unpack_pos() 333 out->u64s = format->key_u64s + in->u64s - BKEY_U64s; in bch2_bkey_pack_key() 526 out->u64s = f->key_u64s; in bch2_bkey_pack_pos_lossy()
|
| H A D | acl.c | 199 unsigned nr_short = 0, nr_long = 0, acl_len, u64s; in bch2_acl_to_xattr() local 219 u64s = BKEY_U64s + xattr_val_u64s(0, acl_len); in bch2_acl_to_xattr() 221 if (u64s > U8_MAX) in bch2_acl_to_xattr() 224 xattr = bch2_trans_kmalloc(trans, u64s * sizeof(u64)); in bch2_acl_to_xattr() 229 xattr->k.u64s = u64s; in bch2_acl_to_xattr()
|
| H A D | bcachefs_format.h | 201 __u8 u64s; member 265 __u8 u64s; member 346 .u64s = BKEY_U64s, \ 353 .u64s = BKEY_U64s, \ 481 __le32 u64s; member 607 __le16 u64s; member 759 __le32 u64s; member 1284 __le32 u64s; /* size of d[] in u64s */ member 1452 __le16 u64s; /* count of d[] in u64s */ member 1484 __le16 u64s; member [all …]
|
| H A D | bset.c | 63 if (!i->u64s) in bch2_dump_bset() 71 if (!_k->u64s) { in bch2_dump_bset() 997 if (src->u64s != clobber_u64s) { in bch2_bset_insert() 999 u64 *dst_p = (u64 *) where->_data + src->u64s; in bch2_bset_insert() 1001 EBUG_ON((int) le16_to_cpu(bset(b, t)->u64s) < in bch2_bset_insert() 1002 (int) clobber_u64s - src->u64s); in bch2_bset_insert() 1005 le16_add_cpu(&bset(b, t)->u64s, src->u64s - clobber_u64s); in bch2_bset_insert() 1014 if (src->u64s != clobber_u64s) in bch2_bset_insert() 1030 EBUG_ON(le16_to_cpu(bset(b, t)->u64s) < clobber_u64s); in bch2_bset_delete() 1033 le16_add_cpu(&bset(b, t)->u64s, -clobber_u64s); in bch2_bset_delete() [all …]
|
| H A D | btree_update_interior.c | 919 insert, insert->k.u64s); in btree_update_updated_root() 1478 u64s = 0; in __btree_split_node() 1486 u64s < n1_u64s && in __btree_split_node() 1487 u64s + k->u64s >= n1_u64s && in __btree_split_node() 1490 n1_u64s += k->u64s; in __btree_split_node() 1492 i = u64s >= n1_u64s; in __btree_split_node() 1493 u64s += k->u64s; in __btree_split_node() 1521 u64s = 0; in __btree_split_node() 1526 i = u64s >= n1_u64s; in __btree_split_node() 1527 u64s += k->u64s; in __btree_split_node() [all …]
|
| H A D | str_hash.c | 53 unsigned u64s = BKEY_U64s + dirent_val_u64s(len, 0); in fsck_rename_dirent() local 55 if (u64s > U8_MAX) in fsck_rename_dirent() 58 new->k.u64s = u64s; in fsck_rename_dirent()
|
| H A D | btree_update_interior.h | 320 b->whiteout_u64s += k.u64s; in push_whiteout() 328 static inline bool bch2_btree_node_insert_fits(struct btree *b, unsigned u64s) in bch2_btree_node_insert_fits() argument 333 return u64s <= bch2_btree_keys_u64s_remaining(b); in bch2_btree_node_insert_fits()
|
| H A D | journal.c | 268 buf->data->u64s = cpu_to_le32(old.cur_entry_offset); in __journal_entry_close() 291 le32_to_cpu(buf->data->u64s), buf->u64s_reserved, in __journal_entry_close() 395 int u64s; in journal_entry_open() local 447 u64s = (int) (buf->sectors << 9) / sizeof(u64) - in journal_entry_open() 449 u64s = clamp_t(int, u64s, 0, JOURNAL_ENTRY_CLOSED_VAL - 1); in journal_entry_open() 451 if (u64s <= (ssize_t) j->early_journal_entries.nr) in journal_entry_open() 480 buf->data->u64s = 0; in journal_entry_open() 491 j->cur_entry_u64s = u64s; in journal_entry_open() 506 new.cur_entry_offset = le32_to_cpu(buf->data->u64s); in journal_entry_open() 766 int d = new_u64s - res->u64s; in bch2_journal_entry_res_resize() [all …]
|
| H A D | bkey.h | 40 memcpy_u64s_small(dst, src, src->u64s); in bkey_p_copy() 45 memcpy_u64s_small(dst, src, src->k.u64s); in bkey_copy() 321 return ((unsigned) k->u64s - bkeyp_key_u64s(f, k) <= U8_MAX - BKEY_U64s); in bkeyp_u64s_valid() 333 return k->u64s - bkeyp_key_u64s(format, k); in bkeyp_val_u64s() 345 k->u64s = bkeyp_key_u64s(format, k) + val_u64s; in set_bkeyp_val_u64s()
|
| H A D | journal_types.h | 89 u16 u64s; member 341 unsigned u64s; member
|
| H A D | sb-members.c | 79 unsigned u64s = DIV_ROUND_UP((sizeof(*mi) + sizeof(mi->_members[0]) * in sb_members_v2_resize_entries() local 82 mi = bch2_sb_field_resize(&c->disk_sb, members_v2, u64s); in sb_members_v2_resize_entries() 493 unsigned u64s; in bch2_sb_member_alloc() local 525 u64s = DIV_ROUND_UP(sizeof(struct bch_sb_field_members_v2) + in bch2_sb_member_alloc() 528 mi = bch2_sb_field_resize(&c->disk_sb, members_v2, u64s); in bch2_sb_member_alloc()
|
| H A D | btree_key_cache.c | 109 ck->u64s = 0; in bkey_cached_free() 131 ck->u64s = key_u64s; in __bkey_cached_alloc() 212 unsigned key_u64s = k.k->u64s + 1; in btree_key_cache_create() 242 if (unlikely(key_u64s > ck->u64s)) { in btree_key_cache_create() 258 ck->u64s = key_u64s; in btree_key_cache_create() 573 BUG_ON(insert->k.u64s > ck->u64s); in bch2_btree_insert_key_cached()
|