Lines Matching refs:buf

53 		journal_ptr[i]->buf = NULL;  in ext4fs_init_journal()
56 dirty_block_ptr[i]->buf = NULL; in ext4fs_init_journal()
64 journal_ptr[gindex]->buf = zalloc(fs->blksz); in ext4fs_init_journal()
65 if (!journal_ptr[gindex]->buf) in ext4fs_init_journal()
69 memcpy(journal_ptr[gindex]->buf, temp, fs->blksz); in ext4fs_init_journal()
73 journal_ptr[gindex]->buf = zalloc(fs->blksz); in ext4fs_init_journal()
74 if (!journal_ptr[gindex]->buf) in ext4fs_init_journal()
76 memcpy(journal_ptr[gindex]->buf, fs->sb, SUPERBLOCK_SIZE); in ext4fs_init_journal()
100 (uint64_t)fs->blksz), dirty_block_ptr[i]->buf, in ext4fs_dump_metadata()
111 free(dirty_block_ptr[i]->buf); in ext4fs_free_journal()
117 free(journal_ptr[i]->buf); in ext4fs_free_journal()
142 journal_ptr[gindex]->buf = zalloc(fs->blksz); in ext4fs_log_gdt()
143 if (!journal_ptr[gindex]->buf) in ext4fs_log_gdt()
145 memcpy(journal_ptr[gindex]->buf, gd_table, fs->blksz); in ext4fs_log_gdt()
175 journal_ptr[gindex]->buf = zalloc(fs->blksz); in ext4fs_log_journal()
176 if (!journal_ptr[gindex]->buf) in ext4fs_log_journal()
179 memcpy(journal_ptr[gindex]->buf, journal_buffer, fs->blksz); in ext4fs_log_journal()
197 if (dirty_block_ptr[gd_index]->buf) in ext4fs_put_metadata()
200 dirty_block_ptr[gd_index]->buf = zalloc(fs->blksz); in ext4fs_put_metadata()
202 if (!dirty_block_ptr[gd_index]->buf) in ext4fs_put_metadata()
204 memcpy(dirty_block_ptr[gd_index]->buf, metadata_buffer, fs->blksz); in ext4fs_put_metadata()
567 char *buf = NULL; in update_descriptor_block() local
584 buf = zalloc(fs->blksz); in update_descriptor_block()
585 if (!buf) { in update_descriptor_block()
589 temp = buf; in update_descriptor_block()
590 memcpy(buf, &jdb, sizeof(struct journal_header_t)); in update_descriptor_block()
607 put_ext4((uint64_t) ((uint64_t)blknr * (uint64_t)fs->blksz), buf, (uint32_t) fs->blksz); in update_descriptor_block()
610 free(buf); in update_descriptor_block()
617 char *buf = NULL; in update_commit_block() local
636 buf = zalloc(fs->blksz); in update_commit_block()
637 if (!buf) { in update_commit_block()
641 memcpy(buf, &jdb, sizeof(struct journal_header_t)); in update_commit_block()
642 put_ext4((uint64_t) ((uint64_t)blknr * (uint64_t)fs->blksz), buf, (uint32_t) fs->blksz); in update_commit_block()
645 free(buf); in update_commit_block()
667 journal_ptr[i]->buf, fs->blksz); in ext4fs_update_journal()