* of bitmap ), set rest of the block bitmap to 1
*/
ext4_fs_mark_bitmap_end(group_blocks, block_size * 8, block_bitmap.data);
- block_bitmap.dirty = true;
+ ext4_bcache_set_dirty(block_bitmap.buf);
ext4_balloc_set_bitmap_csum(sb, bg_ref->block_group, block_bitmap.data);
bg_ref->dirty = true;
if (i < end_bit)
memset(b.data + (i >> 3), 0xff, (end_bit - i) >> 3);
- b.dirty = true;
+ ext4_bcache_set_dirty(b.buf);
ext4_ialloc_set_bitmap_csum(sb, bg, b.data);
bg_ref->dirty = true;
return rc;
memset(b.data, 0, block_size);
- b.dirty = true;
+ ext4_bcache_set_dirty(b.buf);
ext4_block_set(bg_ref->fs->bdev, &b);
if (rc != EOK)
ref->block_group->checksum = to_le16(cs);
/* Mark block dirty for writing changes to physical device */
- ref->block.dirty = true;
+ ext4_bcache_set_dirty(ref->block.buf);
}
/* Put back block, that contains block group descriptor */
* and inode generation */
checksum = ext4_crc32c(checksum, &ino_index, sizeof(ino_index));
checksum = ext4_crc32c(checksum, &ino_gen, sizeof(ino_gen));
- /* Finally calculate crc32 checksum against
+ /* Finally calculate crc32 checksum against
* the entire inode */
checksum = ext4_crc32c(checksum, inode_ref->inode, inode_size);
ext4_inode_set_csum(sb, inode_ref->inode, orig_checksum);
if (ref->dirty) {
/* Mark block dirty for writing changes to physical device */
ext4_fs_set_inode_checksum(ref);
- ref->block.dirty = true;
+ ext4_bcache_set_dirty(ref->block.buf);
}
/* Put back block, that contains i-node */
/* Set zero if physical data block address found */
if (level == 1) {
((uint32_t *)block.data)[offset_in_block] = to_le32(0);
- block.dirty = true;
+ ext4_bcache_set_dirty(block.buf);
}
rc = ext4_block_set(fs->bdev, &block);
/* Initialize new block */
memset(new_block.data, 0, block_size);
- new_block.dirty = true;
+ ext4_bcache_set_dirty(new_block.buf);
/* Put back the allocated block */
rc = ext4_block_set(fs->bdev, &new_block);
/* Initialize allocated block */
memset(new_block.data, 0, block_size);
- new_block.dirty = true;
+ ext4_bcache_set_dirty(new_block.buf);
rc = ext4_block_set(fs->bdev, &new_block);
if (rc != EOK) {
/* Write block address to the parent */
uint32_t * p = (uint32_t * )block.data;
p[off_in_blk] = to_le32((uint32_t)new_blk);
- block.dirty = true;
+ ext4_bcache_set_dirty(block.buf);
current_block = new_blk;
}
if (l == 1) {
uint32_t * p = (uint32_t * )block.data;
p[off_in_blk] = to_le32((uint32_t)fblock);
- block.dirty = true;
+ ext4_bcache_set_dirty(block.buf);
}
rc = ext4_block_set(fs->bdev, &block);