Allow set_inode_field's bmap command in debugfs to allocate blocks,
which enables us to allocate blocks for indirect blocks and internal
extent tree blocks. True, we could do this manually, but seems like
unnecessary bookkeeping activity for humans.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
}
retval = ext2fs_bmap2(current_fs, set_ino,
- (struct ext2_inode *) &set_inode,
- NULL, BMAP_SET, array_idx, NULL, &blk);
+ (struct ext2_inode *) &set_inode,
+ NULL, BMAP_ALLOC | BMAP_SET, array_idx, NULL,
+ &blk);
if (retval) {
com_err("set_inode", retval, "while setting block map");
}