summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-11-11tests: fix mmp tests on hard 4k devicesEric Sandeen8-46/+46
Several of the mmp tests were failing on an s390 guest because direct IO cannot be done on sub-sector sizes, and they were doing 1k IOs to files on a 4k logical/physical device. A few tests could just be changed to 4k, but others needed fixed up output as well. With this I have all tests passing on s390 again. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-11-11libext2fs: fix write size in ext2fs_mmp_writeEric Sandeen1-1/+1
Without this change, we will write data past the end of the mmp buf. Valgrind catches this: ==6373== Syscall param write(buf) points to unaddressable byte(s) ==6373== at 0x362260E470: __write_nocancel (in /lib64/libpthread-2.12.2.so) ==6373== by 0x41CF83: raw_write_blk (unix_io.c:255) ==6373== by 0x41D2BC: unix_write_blk64 (unix_io.c:757) ==6373== by 0x41A05D: ext2fs_mmp_write (mmp.c:130) ==6373== by 0x40B0C9: do_set_mmp_value (set_fields.c:806) ==6373== by 0x421B61: really_execute_command (execute_cmd.c:108) ==6373== by 0x421C54: ss_execute_line (execute_cmd.c:234) ==6373== by 0x403743: main (debugfs.c:2339) ==6373== Address 0x63f000 is not stack'd, malloc'd or (recently) free'd and in my testing it led to silent failures while writing the mmp block in debugfs: write(3, "xV4\22PMM\342\325V\274N\0\0\0\0host.name."..., 4096) = -1 EFAULT (Bad address) Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-11-11debugfs: tidy up mmp handlingEric Sandeen2-1/+15
Several small fixes: * Gracefully fail mmp commands if fs is not open * Show magic number in dump_mmp command * Fix header in output for set_mmp_value -l Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-11-11debugfs.8: add documentation of the mmp commandsEric Sandeen1-0/+13
Document the dump_mmp and set_mmp_value commands in the debugfs manpage. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-11-10libext2fs: use HAVE_FSTAT64 instead of HAVE_STAT64 for ext2fs_stat()Theodore Ts'o1-3/+3
Commit 6b56f3d92d introduced the use of HAVE_STAT64 without arranging that it be defined in configure.in. Previously ext4.h used HAVE_OPEN64, but apparently there are (broken) platforms that have open64() but not stat64(). Go figure. We do need to consistently use a single test for ext2fs_stat(), ext2fs_fstat(), and struct ext2fs_struct_stat, or we could end up passing a struct stat64 to a fstat() system call, or some such. I've elected to use HAVE_FSTAT64 because: (a) it's already defined in the configure script, and (b) if we ever come across a really broken platform that defines fstat64() but not stat64(), we can always emulate stat64() using open64() followed by a fstat64(). This commit fixed a bug whose symptoms were that mke2fs would not work if given a file > 2GB on 32-bit platforms. Addresses-Debian-Bug: #647245 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-11-10libext2: advance group in ext2fs_open2 during swappingEric Sandeen1-2/+2
Without this change, we go back to getting group descriptor "0" each time we go around the "for i" loop. It must properly advance through the filesystem. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-11-06po: rebuild the .gmo files in the debian/rules fileTheodore Ts'o2-1/+2
This commit reverts commit aff534958b0 and transfers the responsibility of rebuilding the .gmo files to the debian/rules file, as updating the gmo files can cause problems for other distribution's building systems. (We do this because we don't update the .gmo files when doing a mid-release snapshot, since binary files can't be represented in diff files. So we only update the .po files, and let the package build process take care of the .gmo files.) Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-11-05libext2fs: don't leak tdb_null out of the shared library namespaceTheodore Ts'o3-5/+2
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-16Update for e2fsprogs 1.42-WIP-1016 releaseTheodore Ts'o3-2/+21
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-16po: update sv.po (from translationproject.org)Göran Uddeborg2-387/+510
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-10-16po: update pl.po (from translationproject.org)Jakub Bogusz2-1075/+2340
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-10-16po: update nl.po (from translationproject.org)Benno Schulenberg2-1101/+2376
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-10-16po: update fr.po (from translationproject.org)Samuel Thibault2-243/+320
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-10-16po: update de.po (from translationproject.org)Philipp Thomas2-1153/+2430
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-10-16po: update cs.po (from translationproject.org)Petr Pisar2-208/+346
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-10-16libext2fs: allow ext2fs_get_memalign() to compile w/o posix_memalign()Theodore Ts'o2-16/+35
Addresses-Sourceforge-Bug: #3219173 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-16libext2fs: ext2fs_[set_]file_acl_block needs to check for 64-bit feature flagTheodore Ts'o17-84/+102
The ext2fs_file_acl_block() and ext2fs_set_file_acl_block() needs to only check i_file_acl_high if the 64-bit flag is set. This is needed because otherwise we will run into problems on Hurd systems which actually use that field for h_i_mode_high. This involves an ABI change since we need to pass ext2_filsys to these functions. Fortunately these functions were first included in the 1.42-WIP series, so it's OK for us to change them now. (This is why we have 1.42-WIP releases. :-) Addresses-Sourceforge-Bug: #3379227 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-16resize2fs: don't fail when shrinking an empty file systemTheodore Ts'o1-1/+1
This commit fixes a failure when running the commands: dd if=/dev/zero of=fs bs=1k count=100k; mke2fs fs; resize2fs -Mp fs We should not try truncating the file system if there is only a single block group in the file system. Addresses-Sourceforge-Bug: #3404051 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-16resize2fs: Do not fail if EXT4_IOC_RESIZE_FS ioctl doesn't existLukas Czerner1-1/+6
Commit 9f6ba888f027ba added support for new online resize ioctl EXT4_IOC_RESIZE_FS. It is also trying to avoid failure when this ioctl() is not supported by the kernel however it is checking wrong error code (EINVAL). When the ioctl does not exist, errno is set to ENOTTY, so we should check for that, rather than EINVAL which means that ioctl arguments are not valid. So change the code to check for ENOTTY and allow resize2fs to try to use the old approach. Also add some comments. Addresses-Red-Hat-Bugzilla: #746284 Addresses-Debian-Bug: #644989 Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-09Update for e2fsprogs 1.42-WIP-1009 releaseTheodore Ts'o4-13/+31
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-09debian: Add explicit source format to specify 3.0 (quilt)Theodore Ts'o1-0/+1
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-09po: update sv.po (from translationproject.org)Göran Uddeborg2-1069/+2320
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-10-09po: update fr.po (from translationproject.org)Samuel Thibault2-1093/+2215
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-10-09po: update cs.po (from translationproject.org)Petr Pisar2-1100/+2236
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-10-09filefrag: fix infinite loop in filefragTheodore Ts'o1-7/+0
Commit a00be17e4768 was missing a patch hunk needed to prevent filefrag from looping forever when it is run without the -v option. Addresses-Debian-Bug: #644792 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-09Fix more spelling errors found by translators and add pluralizationTheodore Ts'o10-196/+330
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-09po: add @-expansion for @q to the at-expand.pl scriptTheodore Ts'o1-0/+1
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-09e2fsck: fix problem message for PR_1_QUOTA_BAD_MODETheodore Ts'o1-1/+1
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-08dumpe2fs.8.in: add man page warning about mounted file systemsTheodore Ts'o1-4/+3
This should be obvious, but apparently not to all users... Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-08e2fsck: recover revoke blocks on 64bit filesystems correctlyDarrick J. Wong2-2/+12
Since the advent of 64bit filesystems, revoke blocks store 64-bit block numbers instead of 32-bit block numbers. Therefore we need to be able to handle that case. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-08Fix spelling errors pointed out by translatorsTheodore Ts'o3-3/+3
Also remove the _("<foo>") marker from a string that was all numbers and hence didn't need punctuation. Thanks to Philipp Thomas and Goeran Uddeborg for reporting these buglets. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-08debian: fix gcc-multilib dependency for mipsel as well as mipsTheodore Ts'o1-1/+1
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-07debian: update the changelog for the e2fsprogs 1.42~WIP-2011-10-05-2 releaseTheodore Ts'o1-0/+12
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-07debian: add a mips-specific dependency on gcc-multilibTheodore Ts'o1-1/+1
The debian mips package has to do some wierd things to include a 64-bit library in the 32-bit binary package. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-06libext2fs: make ext2fs_open_file() always use 3 arguments instead of varargsTheodore Ts'o6-13/+8
Some architectures have narrow mode_t's which can cause some portability warnings with varargs. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05debian: Add a dependency on the 1.42~WIP-2011-1005-1 version of libcom_errTheodore Ts'o1-1/+1
Addresses-Debian-Bug: #644425 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05uuidgen: don't use set_com_err_gettext()Theodore Ts'o1-1/+0
The uuidgen program doesn't use libcom_err. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05e2fsck: make e2fsck sigcatcher use SIGCHLD rather than SIGCLDTheodore Ts'o1-1/+1
SIGCHLD is more portable than SIGCLD, which is a Linux specific thing Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05libquota: remove flag argument to commit_dquot()Theodore Ts'o3-11/+4
The flag parameter wasn't being used, and using it meant that we had to define the COMMIT_* flags, which relied on the QIF_* flags being present. Removing this allows for increased portability. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05debian: update libcomerr2.symbolsTheodore Ts'o1-0/+1
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05libcom_err: declare com_err_gettext to be staticTheodore Ts'o1-1/+1
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05Update for e2fsprogs 1.42-WIP-1005 releaseTheodore Ts'o4-11/+29
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05Update e2fsprogs.pot file for translatorsTheodore Ts'o1-158/+991
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05po: update de.po (from translationproject.org)Philipp Thomas2-2/+2
Addresses-Debian-Bug: #520985 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-10-05mke2fs: Fix up usage & error text for cluster size specificationEric Sandeen1-2/+2
Commit c6ed60cd removed "f" (fragment size) from the getopt string, and re-used its spot in the getopt switch, but didn't update the usage message or the error message during parsing. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05Pass the gettext() function to libcom_errTheodore Ts'o14-0/+14
For those e2fsprogs programs which use libcom_err and are internationalized, pass the gettext() function to libcom_err during program initialization. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05libcom_err: add set_com_err_gettext()Theodore Ts'o2-2/+25
This function allows programs to pass in a pointer to the gettext function so that error table strings will can be internationalized. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05po: add prof_err.c, ext2_err.c and uuidd.c to POTFILES.inTheodore Ts'o2-1/+5
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05compile_et: generate *_err.c files that have strings marked for xgettextTheodore Ts'o7-209/+223
This allows error code strings to be internationalized. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-04libquota: remove NLS supportTheodore Ts'o1-26/+4
In general libraries should never (a) call exit() or (b) print output directly to the stdout (they might be used by GUI programs. From (b) follows (c), should never call internationalization functions directly. Also, since po/POTFILES.in wasn't edited, these strings weren't getting included in e2fsprogs.pot for translation, so the _() indirection didn't actually buy us anything. We eventually need to nuke all of the log_fatal() and log_err() from libquota, so best thing to do for now is remove NLS support completely; no point whipsawing the translators with strings to translate that will be disappearing soon anyway! Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>