Commit message (Collapse)AuthorAgeFilesLines
* Update Release Notes, Changelogs, version.h, for final 1.42.7 releasev1.42.7maintTheodore Ts'o2013-01-215-131/+220
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* mke2fs, tune2fs, resize2fs: add warning messages for bigalloc and quotaTheodore Ts'o2013-01-213-0/+30
| | | | | | | | | | | The bigalloc and quota features have some known issues, so issue warnings in case users try to use them. More information can be found here: https://ext4.wiki.kernel.org/index.php/Bigalloc https://ext4.wiki.kernel.org/index.php/Quota Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* contrib: fix namespace leakage in spd_readdirTheodore Ts'o2013-01-211-2/+2
| | | | | | | Declare the internal symbols alloc_dirstruct() and cache_dirstruct() as static so they don't leak out into the global namespace. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* contrib: add thread locking and readdir64_r support to spd_readdirTheodore Ts'o2013-01-211-18/+57
| | | | | | | | This is part of a series of improvements from a 2008 version of spd_readdir.c that somehow didn't make it into the version which we checked into e2fsprogs git tree. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* contrib: add safe_getenv() support to spd_readdirTheodore Ts'o2013-01-211-2/+32
| | | | | | | | This is part of a series of improvements from a 2008 version of spd_readdir.c that somehow didn't make it into the version which we checked into e2fsprogs git tree. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* resize2fs: move a cluster at a time with bigalloc file systemsTheodore Ts'o2013-01-201-5/+23
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* resize2fs: correctly account for clusters when calculating summary statsTheodore Ts'o2013-01-191-13/+24
| | | | | | | | Fixes resize2fs so it correctly calculates the number of free clusters in each block group for file systems with the bigalloc feature enabled. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* libext2fs: teach the ext2fs_*_block_bitmap_range2() about clustersTheodore Ts'o2013-01-191-0/+30
| | | | | | | | | | | | | | | | | | | The ext2fs_{mark,unmark,test}_block_bitmap2() functions understand about clusters, and will take block numbers and convert them to clusters before checking the bitmap. The ext2fs_*_block_bitmap_range2() functions did not do this, which made them inconsistent. Fortunately, nothing has depended on this incorrect behavior, and in fact most of the usage of these functions have only recently been added, and only for optimizations that were only enabled for non-bigalloc file systems. So this is a change in previously exported functions, but (a) it doesn't change the behavior at all for non-bigalloc file systems, and (b) the change is more likely to fix bugs for bigalloc file systems. For example, this change fixes a problem with resize2fs and bigalloc file systems. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Update Release Notes, Changelogs, version.h, etc. for 1.42.7 releaseTheodore Ts'o2013-01-165-539/+642
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* resize2fs: check in test-resize scriptTheodore Ts'o2013-01-161-0/+27
| | | | | | | | This should be made into a more formal, automated test case, but for now, save this as script since it's useful for validating resize2fs's handling of very large file systems. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Update config.{guess,sub} to the latest versionTheodore Ts'o2013-01-162-52/+73
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* po: update vi.po (from translationproject.org)Trần Ngọc Quân2013-01-162-740/+651
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* po: update sv.po (from translationproject.org)Göran Uddeborg2013-01-162-1485/+1374
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* po: update pl.po (from translationproject.org)Jakub Bogusz2013-01-162-628/+520
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* po: update nl.po (from translationproject.org)Benno Schulenberg2013-01-162-747/+568
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* po: update fr.po (from translationproject.org)Samuel Thibault2013-01-162-781/+580
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* po: update de.po (from translationproject.org)Philipp Thomas2013-01-162-678/+532
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* po: update cs.po (from translationproject.org)Petr Pisar2013-01-162-668/+537
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* Update misc/Makefile.in using "make depend"Theodore Ts'o2013-01-161-1/+5
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* e2image: add -a switch to include all dataPhillip Susi2013-01-162-8/+46
| | | | | | | | | Normally the raw and QCOW2 images only contain fs metadata. Add a new switch ( -a ) to include all data. This makes it possible to use e2image to clone a whole filesystem. Signed-off-by: Phillip Susi <psusi@ubuntu.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* tests: create test for debugfs creating special filesTheodore Ts'o2013-01-163-0/+180
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* debugfs: fix mknod command so that it updates the block group statisticsTheodore Ts'o2013-01-161-2/+1
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* debugfs: add symlink commandDarren Hart2013-01-164-0/+50
| | | | | | | | | | | | | | Add support for symbolic links using a new symlink command. Modeled after the do_mkdir() command. Testing demonstrates both fastlinks and slowlinks work correctly. Very long target paths fail as the command parsing appears to truncate the input to somewhere around 256 bytes. Signed-off-by: Darren Hart <dvhart@infradead.org> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: "Darrick J. Wong" <darrick.wong@oracle.com> Cc: Andreas Dilger <adilger@dilger.ca>
* libext2fs: add the ext2fs_symlink() functionDarren Hart2013-01-164-0/+171
| | | | | | | | | | | | | | | | | | | | | | | | Creating symlinks is a complex affair when accounting for slowlinks. Create a new function, ext2fs_symlink(), modeled after ext2fs_mkdir(). Like ext2fs_mkdir(), ext2fs_symlink() takes on the task of allocating a new inode and block (for slowlinks), setting up sane default values in the inode, copying the target path to either the inode (for fastlinks) or to the first block (for slowlinks), and accounting for the inode and block stats. Disallow link targets longer than blocksize as the Linux kernel prevents this. It does not attempt to expand the parent directory, instead returning EXT2_ET_DIR_NO_SPACE and leaving it to the caller to expand just as ext2fs_mkdir() does. Ideally, I think both of these functions should make a single attempt to expand the directory. [ Fixed a few bugs discovered when creating a test case for ext2fs_symlink() ] Signed-off-by: Darren Hart <dvhart@infradead.org> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: "Darrick J. Wong" <darrick.wong@oracle.com> Cc: Andreas Dilger <adilger@dilger.ca>
* libext2fs: add error codes from 1.43.x development branchTheodore Ts'o2013-01-161-0/+30
| | | | | | | To maintain the error codes numbering, we need to pull in the changes from the 1.43.x development branch for the libext2's error table. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* mke2fs: document bigalloc and cluster-sizeZheng Liu2013-01-151-0/+26
| | | | | | | | | | Bigalloc feature has been used for a long time, but the documentation in mke2fs is still missing. So add it. Addresses-Debian-Bug: #669730 Signed-off-by: Zheng Liu <wenqing.lz@taobao.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* libext2fs: avoid 32-bit overflow in ext2fs_initialize with a 512M cluster sizeTheodore Ts'o2013-01-151-3/+12
| | | | | | | | | | | If the user attemps to create a 512MB cluster, we need to adjust the defaults to avoid a 32-bit overflow of s_blocks_per_group. Also check to make sure that the caller of ext2fs_initialize() has not given a value of s_clusters_per_group that would result in an overflow of s_blocks_per_group. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
* mke2fs: teach mke2fs to understand -b 4k and -C 256MTheodore Ts'o2013-01-151-4/+4
| | | | | | | | | The -b and -C options now use parse_num_blocks2() instead of strtol, so that users can specify -C 256M instead of the much less convenient -C 268435456. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
* libe2p: teach parse_num_blocks2() to return bytes if log_block_size < 0Theodore Ts'o2013-01-151-4/+20
| | | | | | | | | Previously the behavior of parse_num_block2 was undefined if log_block_size was less than zero. It will now return a number in units of bytes. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
* mke2fs: the -g option will now specify the clusters per block groupTheodore Ts'o2013-01-151-0/+9
| | | | | | | | | If bigalloc is enabled, then -g will specify the clusters per block group. (If bigalloc is not enabled, then a cluster == a block, so the meaning of -g is not changed.) Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
* mke2fs: enforce that the cluster size must be greater that the block sizeTheodore Ts'o2013-01-151-1/+8
| | | | | | | | | | In addition, do not allow a cluster size of 1024, since that will be interpreted by ext2fs_initialize() as requesting the default cluster size. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Zheng Liu <wenqing.lz@taobao.com> Reported-by: Zheng Liu <wenqing.lz@taobao.com>
* mke2fs: require the bigalloc feature explicity if the cluster size is setZheng Liu2013-01-141-0/+5
| | | | | | | | | | | | When cluster-size is specified without the bigalloc feature, mke2fs will ignore this argument silently. But user might think bigalloc feature has been enabled unless they use the dumpe2fs command. So now we ask user to set bigalloc feature explicity when cluster-size is enabled. This can make sure that users understand what they are doing because bigalloc might impact the performance for some workloads. Signed-off-by: Zheng Liu <wenqing.lz@taobao.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* debugfs: fix gcc-wall complaintsTheodore Ts'o2013-01-145-32/+66
| | | | | | | | | | Fix the missing function prototypes from the recently added new debugfs commands, plus some signed vs unsigned comparison complaints. Also change the abbreviation of the block_dump command from "bp" to the more appropriate "bp". Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* resize2fs: add debugging code to test the old online resizing interfacesTheodore Ts'o2013-01-141-2/+43
| | | | | | | | | | | | | | | | | | | | | | The old online resize ioctl interfaces are still present in the kernel, and we want to make it easy to test both the kernel code for those older interfaces, and resize2fs's use of those interfaces in a relatively easy manner. To do this, resize2fs will now check the environment variable RESIZE2FS_KERNEL_VERSION. If the version given is less than 3.3, then do not try using the new resizing ioctl, but instead use the resizing ioctls that were used before Linux version 3.3. If the version given is less than 3.7, then emulate sanity checks which get done to protect against the fact that the new resizing ioctl prior to 3.7 did not handle meta_bg resizing. (This was previously tested via the presence of the RESIZE2FS_NO_META_BG_RESIZE environment variable. But the new environment variable, RESIZE2FS_KERNEL_VERISON, is more general.) Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
* debugfs: document zap_block & block_dumpEric Sandeen2013-01-122-2/+14
| | | | | | | | What little docs there were had a cut & paste error. We can do better. :) Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* config: silence printf format warningsEric Whitney2013-01-081-8/+8
| | | | | | | | | | The printfs in the asm_types.c code contained within parse-types.sh expect sizeof to return an int. Fix this for architectures where this isn't true (x86_64, etc.) so we don't see warning messages while running the configure script. Signed-off-by: Eric Whitney <enwlinux@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* libext2fs: ext2fs_open2() should not set ret_fs after a MMP failureTheodore Ts'o2013-01-081-3/+3
| | | | | | | | | The addition of MMP code was added in the wrong place, so ret_fs could get set (and EXT2_FLAG_NOFREE_ON_ERROR was cleared as well, which could confuse e2fsck which depends on this flag being cleared if ext2fs_open2() succeeded.) Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* e2fsck: avoid memory corruption on ext2fs_open2 failureNickolai Zeldovich2013-01-081-1/+1
| | | | | | | | | | In try_open_fs(), if ext2fs_open2() returns an error, do not try to access the struct ext2_filesys. The previous check 'if (ret_fs)' was always true, but even 'if (*ret_fs)' might be incorrect in some cases, so check 'retval==0' instead. Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* e2fsck: do not crash on long log file namesNickolai Zeldovich2013-01-081-6/+12
| | | | | | | | | | | | | Previously e2fsck would corrupt memory if the log file name was longer than 100 bytes (e.g., a long log_filename value in e2fsck.conf or a pattern that expands out to more than 100 bytes). This was due to incorrectly calling realloc() in append_string() on the struct string instead of the malloc'ed char* buffer, among other problems. This patch fixes the call to realloc() and also ensures that the buffer is grown by sufficiently many bytes (not just by 2x). Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* e2fsck: show size requested when memory allocation failsEric Sandeen2013-01-081-1/+2
| | | | | | | | | | | | "e2fsck: Can't allocate dx_block info array" is only so helpful - it'd be nice to know how much it tried to allocate. In particular, since I think malloc(0) can return NULL, it'd be nice to know if maybe we passed in an uninitialized (or 0-initialized) size. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* mke2fs: check extents feature when bigalloc feature is enabledZheng Liu2013-01-081-0/+9
| | | | | | | | | | When bigalloc feature is enabled in mkfs, extents feature also needs to be enabled. But now when bigalloc feature is enabled without extents feature, users will not get any warning messages until they try to mount this file system. Signed-off-by: Zheng Liu <wenqing.lz@taobao.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Fix 32-bit overflow problems: dgrp_t * s_blocks_per_groupTheodore Ts'o2013-01-055-18/+11
| | | | | | | | | | | | There are a number of places where we multiply a dgrp_t with s_blocks_per_group expecting that we will get a blk64_t. This requires a cast, or using the convenience function ext2fs_group_first_block2(). This audit was suggested by Eric Sandeen. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Eric Sandeen <sandeen@redhat.com>
* resize2fs: use [un]mark_block_range bitmap functions to reduce CPU usageTheodore Ts'o2013-01-032-47/+29
| | | | | | | | Use ext2fs_[un]mark_block_range2() functions to reduce the CPU overhead of resizing large file systems by 45%, primarily by reducing the time spent in fix_uninit_block_bitmaps(). Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* resize2fs: add resource tracking as a debug optionTheodore Ts'o2013-01-035-16/+213
| | | | | | | Add a new debug flag which prints how much time is consumed by the various parts of resize2fs's processing. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* resize2fs: fix 32-bit overflow when calculating the number of free blocksTheodore Ts'o2013-01-031-6/+6
| | | | | | | | This caused the free blocks count in the superblock to be incorrect after resizing a 64-bit file system if the number of free blocks overflowed a 32-bit value. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* resize2fs: fix 32-bit overflow issue which can corrupt 64-bit file systemsTheodore Ts'o2013-01-031-4/+2
| | | | | | | | | | | | | | | | | | Fix a 32-bit overflow bug caused by a missing blk64_t cast which can cause the block bitmap to get corrupted when doing an off-line resize of a 64-bit file system. This problem can be reproduced as follows: rm -f foo.img; touch foo.img truncate -s 8T foo.img mke2fs -F -t ext4 -O 64bit foo.img e2fsck -f foo.img truncate -s 21T foo.img resize2fs foo.img e2fsck -fy foo.img Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Clean up texinfo filesTheodore Ts'o2013-01-025-1565/+6740
| | | | | | | | | | | Fix up the com_err.texinfo file so it will produce a valid printed output, by cleaning up some errors in the texinfo file, and updating texinfo.tex to be consistent with the version in the doc subdirectory. Also add rules so we can generate pdf and ps files from com_err.texinfo and libext2fs.texinfo. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Update changelogs for 1.42.7 releaseTheodore Ts'o2013-01-015-9/+125
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* debugfs: fixup the hard-coded buffer length in dump_fileZheng Liu2013-01-011-3/+10
| | | | | | | | | Allocate the block buffer in dump_file() instead of assuming that the block size is no more than 8k. CC: George Spelvin <linux@horizon.com> Signed-off-by: Zheng Liu <wenqing.lz@taobao.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* debain: update e2fslibs.symbols with newly exported functionsTheodore Ts'o2013-01-011-0/+4
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>