From 101c84f2e049bffcdb6c5ba1784842cdd50dbf05 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Tue, 24 Mar 1998 16:27:11 +0000 Subject: ChangeLog, main.c, resize2fs.c: main.c (main): Check to make sure we can really resize this filesystem. If there are compatible feature sets that we don't support, we need to abort. resize2fs.c: Change to use the new prototype required by block_iterate2 (which uses blkcnt_t for the blockcount). version.h, RELEASE-NOTES: Interim commit of changes to date. --- RELEASE-NOTES | 10 ++++++++++ resize/ChangeLog | 9 +++++++++ resize/main.c | 16 ++++++++++++++-- resize/resize2fs.c | 6 +++--- version.h | 2 +- 5 files changed, 37 insertions(+), 6 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 1a5f2759..4cfa621f 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -9,6 +9,16 @@ explicitly do a configure test to see if (a) llseek is in libc, and complaints about libc developers don't understand the concept of compatibility with previous versions of libc.) +Added support for the EXT2_FEATURE_INCOMPAT_DIRNAME_SIZE feature, +which means that e2fsprogs will ignore the high 8 bits of the +directory entry's name_len field, so that it can be used for other +purposes. + +Added support for the EXT2_FEATURE_RO_COMPAT_LARGE_FILE feature. +E2fsprogs will now support filesystems with 64-bit sized files. + +Added support for the EXT2_FEATURE_COMPAT_DIR_PREALLOC feature. + Added new program "e2label", contributed by Andries Brouwer. E2label provides an easy-to-use interface to modify the filesystem label. diff --git a/resize/ChangeLog b/resize/ChangeLog index d91240a2..fe936038 100644 --- a/resize/ChangeLog +++ b/resize/ChangeLog @@ -1,3 +1,12 @@ +1998-03-24 Theodore Ts'o + + * main.c (main): Check to make sure we can really resize this + filesystem. If there are compatible feature sets that we + don't support, we need to abort. + + * resize2fs.c: Change to use the new prototype required by + block_iterate2 (which uses blkcnt_t for the blockcount). + 1998-03-20 Theodore Ts'o * resize2fs.c (inode_scan_and_fix): If we are expanding the diff --git a/resize/main.c b/resize/main.c index 87aa8dc2..756e3cb9 100644 --- a/resize/main.c +++ b/resize/main.c @@ -113,7 +113,8 @@ void main (int argc, char ** argv) blk_t max_size = 0; io_manager io_ptr; char *tmp; - + struct ext2fs_sb *s; + initialize_ext2_error_table(); fprintf (stderr, "resize2fs %s (%s)\n", @@ -194,7 +195,18 @@ void main (int argc, char ** argv) printf ("Couldn't find valid filesystem superblock.\n"); exit (1); } - + /* + * Check for compatibility with the feature sets. We need to + * be more stringent than ext2fs_open(). + */ + s = (struct ext2fs_sb *) fs->super; + if ((s->s_feature_compat & ~EXT2_LIB_FEATURE_COMPAT_SUPP) || + (s->s_feature_incompat & ~EXT2_LIB_FEATURE_RO_COMPAT_SUPP)) { + com_err(program_name, EXT2_ET_UNSUPP_FEATURE, + "(%s)", device_name); + exit(1); + } + /* * Get the size of the containing partition, and use this for * defaults and for making sure the new filesystme doesn't diff --git a/resize/resize2fs.c b/resize/resize2fs.c index 1b6d082d..4d859696 100644 --- a/resize/resize2fs.c +++ b/resize/resize2fs.c @@ -856,7 +856,7 @@ struct process_block_struct { }; static int process_block(ext2_filsys fs, blk_t *block_nr, - int blockcnt, blk_t ref_block, + blkcnt_t blockcnt, blk_t ref_block, int ref_offset, void *priv_data) { struct process_block_struct *pb; @@ -874,7 +874,7 @@ static int process_block(ext2_filsys fs, blk_t *block_nr, pb->changed = 1; #ifdef RESIZE2FS_DEBUG if (pb->rfs->flags & RESIZE_DEBUG_BMOVE) - printf("ino=%ld, blockcnt=%d, %u->%u\n", + printf("ino=%ld, blockcnt=%ld, %u->%u\n", pb->ino, blockcnt, block, new_block); #endif block = new_block; @@ -882,7 +882,7 @@ static int process_block(ext2_filsys fs, blk_t *block_nr, } if (pb->is_dir) { retval = ext2fs_add_dir_block(fs->dblist, pb->ino, - block, blockcnt); + block, (int) blockcnt); if (retval) { pb->error = retval; ret |= BLOCK_ABORT; diff --git a/version.h b/version.h index 1e0d0262..8c97d061 100644 --- a/version.h +++ b/version.h @@ -7,5 +7,5 @@ */ #define E2FSPROGS_VERSION "1.12-WIP" -#define E2FSPROGS_DATE "26-Feb-98" +#define E2FSPROGS_DATE "23-Mar-98" -- cgit v1.2.3