+ /*
+ * If the number of descriptor blocks is going to increase,
+ * the on-line resizing inode must be present.
+ */
+ new_desc_blocks = ext2fs_div_ceil(
+ ext2fs_div_ceil(*new_size -
+ fs->super->s_first_data_block,
+ EXT2_BLOCKS_PER_GROUP(fs->super)),
+ EXT2_DESC_PER_BLOCK(fs->super));
+ printf("old desc_blocks = %lu, new_desc_blocks = %lu\n",
+ fs->desc_blocks, new_desc_blocks);
+ if (!(fs->super->s_feature_compat &
+ EXT2_FEATURE_COMPAT_RESIZE_INODE) &&
+ new_desc_blocks != fs->desc_blocks) {
+ com_err(program_name, 0,
+ _("Filesystem does not support online resizing"));
+ exit(1);
+ }
+