summaryrefslogtreecommitdiff
path: root/resize
AgeCommit message (Collapse)AuthorFilesLines
2007-12-15Fix Debian rules files to support building non-Linux archsSamuel Thibault1-0/+6
Addresses-Debian-Bug: #437720 Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-10-14libext2fs: Add EXT2_DESC_SIZE and EXT2_DESC_PER_BLOCK macrosValerie Clement1-4/+3
Add macros to support variable-length group descriptors for ext4. Signed-off-by: Valerie Clement <valerie.clement@bull.net> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-07-08Remove Changelog files since they're not used after the git migrationTheodore Ts'o1-702/+0
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-06-24Update Release Notes, Changelogs, version.h, etc. for 1.40 releaseTheodore Ts'o1-0/+4
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-06-18Don't write changes to the backup superblocks by defaultTheodore Ts'o2-0/+7
This patch changes ext2fs_open() to set EXT2_FLAG_MASTER_SB_ONLY by default. This avoids some problems in e2fsck (reported by Jim Garlick) where a corrupt journal can end up writing the bad superblock to the backups. In general, only e2fsck (after the filesystem is clean), tune2fs, and resize2fs should change the backup superblocks by default. Most callers of ext2fs_open() should not be touching anything where the backups should be touched. So let's change the defaults to avoid potential problems. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-05-25Fix gcc -Wall warnings, especially on 64-bit systemsAndreas Dilger6-9/+30
Signed-off-by: Andreas Dilger <adilger@clusterfs.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-05-18Store the RAID stride value in the superblock and take advantage of itTheodore Ts'o2-1/+13
Store the RAID stride value when a filesystem is created with a requested RAID stride, and then use it automatically in resize2fs. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-03-18[COVERITY] Fix missing return code check for ext2fs_write_inodeBrian Behlendorf2-1/+8
Found 2 of the three places where a return code for ext2fs_write_inode() was not being checked. The second fix in e2fsck/emptydir.c is basically just to shut coverity up even though it really is unnecessary. Coverity ID: 1: Checked Return Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-12-26Use the newer add/remove_error_table com_err interfacesTheodore Ts'o2-1/+7
Change all of the e2fsprogs programs to use the newer add_error_table() and remove_error_table() interfaces instead of the much older initialize_*_error_table() function. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-10-02Fix resize2fs error msgs if the fs or kernel doesn't support on-line resizeTheodore Ts'o2-2/+29
Check to make sure the filesystem has a resize inode if it is needed to grow the filesystem. Print the correct error message if the kernel returns an ENOTTY error to the group extend ioctl Addresses Debian Bug: #380548 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-09-12Fix more rounding overflows for filesystems that have 2**32-1 blocksEric Sandeen3-3/+8
Signed-off-by: Eric Sandeen <esandeen@redhat.com>
2006-09-12Add checks to make sure inode counts don't overflow a 32-bit valueEric Sandeen2-0/+11
Signed-off-by: Eric Sandeen <esandeen@redhat.com>
2006-09-12Fix signed vs unsigned printf format strings for block and inode numbersEric Sandeen2-2/+6
There were still some %d's lurking when we print blocks & inodes; also many of the counters in the e2fsck_struct were signed, and probably need to be unsigned to avoid overflows. Signed-off-by: Eric Sandeen <esandeen@redhat.com>
2006-09-12Remove unused variablesEric Sandeen2-3/+5
Signed-off-by: Eric Sandeen <esandeen@redhat.com>
2006-08-30Fix potential 2**32-1 overflow by using e2p_percent()Theodore Ts'o3-3/+8
Add a new functiom, e2p_percent(), which correct calculates the percentage of a number based on a given percentage, without worrying about overflow issues. This is used where we calculate the number of reserved blocks using a percentage of the total number of blocks in a filesystem. Based on patches from Eric Sandeen, but generalized to use this new function. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Eric Sandeen <esandeen@redhat.com>
2006-08-30Detect overflows in loop countersEric Sandeen2-1/+7
For loops such as: for (i=1; i <= fs->super->s_blocks_count; i++) { <do_stuff> } if i is an int and s_blocks_count is (2^32-1), the condition is never false. Change these loops to: for (i=1; i <= fs->super->s_blocks_count && i > 0; i++) { <do_stuff> } to stop the loop when we overflow i Signed-off-by: Eric Sandeen <esandeen@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-08-30Fix potential 2**32-1 overflow problems by ext2fs_div_ceil()Theodore Ts'o2-7/+11
Add a new function, ext2fs_div_ceil(), which correctly calculates a division of two unsigned integer where the result is always rounded up the next largest integer. This is used everywhere where we might have previously caused an overflow when the number of blocks or inodes is too close to 2**32-1. Based on patches from Eric Sandeen, but generalized to use this new function Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Eric Sandeen <esandeen@redhat.com>
2006-05-22Fix spelling mistakes in e2fsck, mke2fs.conf, and resize2fs man pagesTheodore Ts'o2-1/+6
Addresses Debian Bugs: #368392, #368393, #368394 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-05-21Clarify resize2fs man page and add reference to LVMTheodore Ts'o2-4/+15
Addresses Debian Bug: #368179 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-05-14Add RAID stride support to resize2fsTheodore Ts'o3-5/+83
Resize2fs will now automatically determine the RAID stride parameter that had been used to create the filesystem, and use that for newly created block groups. The RAID stride parameter may also be manually specified on the command line using the new -S option to resize2fs. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-18Fix format statements to make e2fsprogs programs 32-bit cleanTakashi Sato3-6/+9
Change the format string(%d, %ld) for a block number and inode number to %u or %lu. Signed-off-by: Takashi Sato <sho@tnes.nec.co.jp> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-18Change resize2fs open modes for mounted and unmounted filesystemsTheodore Ts'o2-1/+13
If the filesystem is mounted, open it in read-only mode since the userspace program should not try to modify it directly. If the filesystem is not mounted, open it in exclusive mode to avoid potential problems (such as someone trying to mount the filesystem while it is being resized). Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-03-17Add support for on-line resizing to resize2fsTheodore Ts'o7-96/+342
If the filesystem is mounted, attempt to use the on-line resizing ioctls to resize the filesystem. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-29Clean up gcc -Wall complaints in resize2fsTheodore Ts'o2-3/+4
Remove unused variables in mark_table_blocks() Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-12-29Make resize2fs expand or truncate a file containing a filesystem.Theodore Ts'o2-20/+65
(Addresses Debian Bug: #271607) Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-08-08Fix fencepost error in resize2fs caught by valgrindTheodore Ts'o2-1/+15
There was a off-by-one fencepost error in the logic used to check if we avoid copying zero-filled blocks when moving an inode table down by a block or two. Thanks to valgrind for catching it. As far as I know this fencepost error wasn't causing any actual problems, but it was definitely a bug. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2005-06-30Update for e2fsprogs 1.38 release.Theodore Ts'o1-0/+4
2005-05-09Fix some minor typo's and grammar's strings, and remove debugging strings Theodore Ts'o3-15/+23
from needing to be translated. Patch is from Benno Schulenberg.
2005-05-06Update "make depend" information. Fixes SMP parallel build problem.Theodore Ts'o1-13/+14
(Addresses Sourceforge Bug: #1157933)
2005-03-21Update for the e2fsprogs 1.37 release.Theodore Ts'o1-0/+4
2005-02-05Update for release of e2fsprogs 1.36.Theodore Ts'o1-0/+4
2005-01-26resize2fs.c: Fix bug where we don't release the blocks belongingTheodore Ts'o2-45/+29
to the old inode table blocks when we move the inode table. (Addresses Debian Bug: #290894)
2005-01-05Add new function in e2p for parsing the number of blocks on the command lineTheodore Ts'o3-42/+25
for mke2fs and resize2fs, and use this function so that filesystem size inputs to e2fsprogs command line programs are parsed consistently.
2004-12-24Fix resize2fs so that it properly handles filesystems with the resize_inodeTheodore Ts'o2-10/+99
feature enabled.
2004-12-15Add install-strip and install-shlibs-strip targetsTheodore Ts'o2-4/+15
Use Linux-kernel-style makefile output for "make install" Update intl/Makefile.in to version from gettext 0.14.1
2004-12-14Use MKINSTALLDIRS macro so that the Makefiles can find the scriptTheodore Ts'o2-1/+5
correctly. Update Makefile dependencies. Update "make depend" production so that it filters out comments inserted by newer gcc compilers. Remove sync from e2fsck's "make all" target.
2004-11-30Add support for passing options to the io layer using the URL syntax. For Theodore Ts'o2-3/+11
example, /tmp/test.img?offset=1024. Multiple options can separated using the & character, although at the moment the only option implemented is the offset option in the unix_io layer.
2004-11-30Use Linux-kernel-style makefile output to make it easier to Theodore Ts'o2-5/+15
see errors/warnings.
2004-09-17resize2fs.c (check_and_change_inodes): Fix debugging printf toTheodore Ts'o2-1/+8
mask off the high 256 bits of dirent->name_len (which is where the file type information is stored). (Addresses Debian Bug #271605)
2004-05-05Remove .cvsignore files; they were out of date, and causes lintianTheodore Ts'o1-4/+0
to flame about their presence in the source tarball.
2004-04-03Refine the build process to avoid re-running subst all the time on Theodore Ts'o2-4/+11
some generated files, by having subst update the modtime on these files even when the generated file hasn't changed. We do this with generated files that do not have any downstream dependencies.
2004-02-28Update version number for e2fsprogs 1.35 release.Theodore Ts'o1-0/+4
2003-12-28Fix more compiler warnings.Matthias Andree1-0/+1
2003-12-07Fix gcc -Wall nitpicksTheodore Ts'o3-19/+35
2003-08-24Adjust description line so that apropos "ext2" or "ext3" will Theodore Ts'o2-1/+7
find all of the e2fsprogs man pages. (Addresses Debian Bug #206845)
2003-08-01ext2fs_getmem(), ext2fs_free_mem(), and ext2fs_resize_mem() Theodore Ts'o4-24/+27
all now take a 'void *' instead of a 'void **' in order to avoid pointer aliasing problems with GCC 3.x.
2003-07-26Update for 1.34 release.Theodore Ts'o1-0/+4
2003-07-08In mke2fs and resize2fs, round the default size of the filesystem to Theodore Ts'o2-1/+25
be an even multiple of the pagesize to work around a potential Linux kernel bug. Use the testio manager in mke2fs if CONFIG_TESTIO_DEBUG is set.
2003-06-24Fix bug in resize2fs which caused it to fail on filesystems with aTheodore Ts'o2-0/+26
non-empty bad block list. Resize2fs now discards any blocks on the badblock list which are no longer part of the filesystem as the result of a filesystem shrink. (Note: this means that shrinking and then enlarging a filesystem is no longer a reversible operation; information about bad blocks in the part of the filesystem which is to be chopped off will be lost.)
2003-06-08resize2fs.8.in: Make explicit that you need to run resize2fsTheodore Ts'o2-2/+13
after using fdisk to adjust the partition size when expanding the filesystem. (Addresses Debian Bug #195616)