Lines Matching refs:clean
23 int bch2_sb_clean_validate_late(struct bch_fs *c, struct bch_sb_field_clean *clean, in bch2_sb_clean_validate_late() argument
29 for (entry = clean->start; in bch2_sb_clean_validate_late()
30 entry < (struct jset_entry *) vstruct_end(&clean->field); in bch2_sb_clean_validate_late()
32 if (vstruct_end(entry) > vstruct_end(&clean->field)) { in bch2_sb_clean_validate_late()
34 le16_to_cpu(entry->u64s), le32_to_cpu(clean->field.u64s), in bch2_sb_clean_validate_late()
35 (u64 *) vstruct_end(entry) - (u64 *) vstruct_end(&clean->field)); in bch2_sb_clean_validate_late()
52 struct bch_sb_field_clean *clean, in btree_root_find() argument
59 if (clean) { in btree_root_find()
60 start = clean->start; in btree_root_find()
61 end = vstruct_end(&clean->field); in btree_root_find()
87 struct bch_sb_field_clean *clean = *cleanp; in bch2_verify_superblock_clean() local
92 if (mustfix_fsck_err_on(j->seq != clean->journal_seq, c, in bch2_verify_superblock_clean()
95 le64_to_cpu(clean->journal_seq), in bch2_verify_superblock_clean()
97 kfree(clean); in bch2_verify_superblock_clean()
106 k1 = btree_root_find(c, clean, NULL, i, &l1); in bch2_verify_superblock_clean()
146 struct bch_sb_field_clean *clean, *sb_clean; in bch2_read_superblock_clean() local
150 sb_clean = bch2_sb_field_get(c->disk_sb.sb, clean); in bch2_read_superblock_clean()
156 c->sb.clean = false; in bch2_read_superblock_clean()
161 clean = kmemdup(sb_clean, vstruct_bytes(&sb_clean->field), in bch2_read_superblock_clean()
163 if (!clean) { in bch2_read_superblock_clean()
168 ret = bch2_sb_clean_validate_late(c, clean, READ); in bch2_read_superblock_clean()
170 kfree(clean); in bch2_read_superblock_clean()
177 return clean; in bch2_read_superblock_clean()
211 struct bch_sb_field_clean *clean = field_to_type(f, clean); in bch2_sb_clean_validate() local
213 if (vstruct_bytes(&clean->field) < sizeof(*clean)) { in bch2_sb_clean_validate()
215 vstruct_bytes(&clean->field), sizeof(*clean)); in bch2_sb_clean_validate()
219 for (struct jset_entry *entry = clean->start; in bch2_sb_clean_validate()
220 entry != vstruct_end(&clean->field); in bch2_sb_clean_validate()
222 if ((void *) vstruct_next(entry) > vstruct_end(&clean->field)) { in bch2_sb_clean_validate()
236 struct bch_sb_field_clean *clean = field_to_type(f, clean); in bch2_sb_clean_to_text() local
239 prt_printf(out, "flags: %x\n", le32_to_cpu(clean->flags)); in bch2_sb_clean_to_text()
240 prt_printf(out, "journal_seq: %llu\n", le64_to_cpu(clean->journal_seq)); in bch2_sb_clean_to_text()
242 for (entry = clean->start; in bch2_sb_clean_to_text()
243 entry != vstruct_end(&clean->field); in bch2_sb_clean_to_text()
245 if ((void *) vstruct_next(entry) > vstruct_end(&clean->field)) in bch2_sb_clean_to_text()
301 sb_clean = bch2_sb_field_resize(&c->disk_sb, clean, u64s); in bch2_fs_mark_clean()