Commit e0547221 authored by mincheol's avatar mincheol
Browse files

ibitmap

parent 18a0f720
......@@ -78,7 +78,6 @@ static int extractmd_ioctl(struct inode *inode, struct file *f, struct extractmd
char path_block_bitmap[255] = {0};
char path_inode_bitmap[255] = {0};
char path_inode_table[255] = {0};
//char path_reserved_gdt[255] = {0};
char path_journal[255] = {0};
int i = 0;
......@@ -96,7 +95,7 @@ static int extractmd_ioctl(struct inode *inode, struct file *f, struct extractmd
ext4_group_t nr_group = sbi->s_groups_count;
struct block_device *bdev;
bdev = I_BDEV(fp_dev->f_mapping->host);
nr_gd = sbi->s_gdb_count * sbi->s_desc_per_block;
//nr_gd = sbi->s_gdb_count * sbi->s_desc_per_block;
nr_inode_table_block = sbi->s_itb_per_group;
nr_journal_blocks = be32_to_cpu(sbi->s_journal->j_superblock->s_maxlen);
......@@ -185,15 +184,11 @@ static int extractmd_ioctl(struct inode *inode, struct file *f, struct extractmd
{
int h;
char *buffer_inode_table = kmalloc(EXT4_BLOCK_SIZE(sb) * nr_inode_table_block, GFP_KERNEL);
struct ext4_group_desc *group = extractmd_get_group_desc(sb, i);
//struct buffer_head *bh_group_descriptor = __bread(bdev, extractmd_group_first_block_no(sb, i) + 1, EXT4_DESC_SIZE(sb) * nr_gd);
struct buffer_head *bh_block_bitmap = __bread(bdev, extractmd_block_bitmap(sb, group), EXT4_BLOCK_SIZE(sb));
struct buffer_head *bh_inode_bitmap = __bread(bdev, extractmd_inode_bitmap(sb, group), EXT4_BLOCK_SIZE(sb));
//extractmd_write_file_per_group(path_group_descriptor, bh_group_descriptor->b_data, EXT4_DESC_SIZE(sb) * nr_gd, i);
extractmd_write_file_per_group(path_block_bitmap, bh_block_bitmap->b_data, EXT4_BLOCK_SIZE(sb), i);
extractmd_write_file_per_group(path_inode_bitmap, bh_inode_bitmap->b_data, EXT4_BLOCK_SIZE(sb), i);
extractmd_write_file_per_group(path_inode_bitmap, bh_inode_bitmap->b_data, 1024, i);
for (h = 0; h < nr_inode_table_block; h++)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment