summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update release notes, etc. for final 1.42.12 releasev1.42.12Theodore Ts'o2014-08-294-6/+8
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* po: update vi.po (from translationproject.org)Trần Ngọc Quân2014-08-291-524/+570
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* po: update uk.po (from translationproject.org)Yuri Chornoivan2014-08-291-522/+568
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* po: update sv.po (from translationproject.org)Göran Uddeborg2014-08-291-523/+569
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* po: update pl.po (from translationproject.org)Jakub Bogusz2014-08-291-522/+568
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* po: update nl.po (from translationproject.org)Benno Schulenberg2014-08-291-525/+568
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* po: update fr.po (from translationproject.org)Samuel Thibault2014-08-291-525/+568
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* po: update cs.po (from translationproject.org)Petr Pisar2014-08-291-525/+568
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* mke2fs: complain if bigalloc and hugefiles_align_disk is incompatibleTheodore Ts'o2014-08-271-1/+10
| | | | | | | | | If the starting partition offset is incompatible with the bigalloc cluster size, complain and exit, instead of creating a file which would have a logical to physical block mapping which breaks the cluster alignment requirement. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* e2fsprogs.pot: update POT-Creation-DateTheodore Ts'o2014-08-261-1/+1
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* e2fsck: fix spelling error (strage vs storage)Theodore Ts'o2014-08-262-2/+2
| | | | | | Reported-by: Philipp Thomas <pth@suse.de> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* e2fsprogs: add supported file attributes to ext4.5 manpageEric Sandeen2014-08-251-1/+33
| | | | | | | | | | | | | | The chattr(1) manpage now refers users to filesystem-specific manpages for details on supported attributes, so add those to ext4.5. I've left out oddities like being able to set the compressed or no-tail-packing flags, or setting data journaling on ext2. That behavior seems like a bug, not a feature. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* Interim updates of release notes, etc. in preparation for 1.42.12 releaseTheodore Ts'o2014-08-258-537/+731
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* po: update sv.po (from translationproject.org)Göran Uddeborg2014-08-251-246/+113
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* po: update fr.po (from translationproject.org)Samuel Thibault2014-08-251-2/+2
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* po: update es.po (from translationproject.org)Antonio Ceballos2014-08-251-936/+813
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* po: update cs.po (from translationproject.org)Petr Pisar2014-08-251-4/+4
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* mke2fs: improve the error message when a non-existent file is specifiedTheodore Ts'o2014-08-243-0/+8
| | | | | | | | | | | | | | | | | If the user does not specify the file system size, and the file does not exist, give an error message like this: The file /tmp/foo.img does not exist and no size was specified. instead of this: Creating regular file /tmp/foo.img mke2fs: Device size reported to be zero. Invalid partition specified, or partition table wasn't reread after running fdisk, due to a modified partition being busy and in use. You may need to reboot to re-read your partition table. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* mke2fs.8.in: explain how the fs-size parameter is interpretedTheodore Ts'o2014-08-241-12/+41
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* resize2fs: clarify the size of blocks in resize2fs's messagesTheodore Ts'o2014-08-245-13/+14
| | | | | | Addresses-Debian-Bug: #758029 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* resize2fs.8.in: clarify when on-line resizing is supportedTheodore Ts'o2014-08-241-3/+4
| | | | | | Addresses-Debian-Bug: #726760 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* dumpe2fs: complain if extra arguments are given on the command lineTheodore Ts'o2014-08-241-1/+3
| | | | | | Addresses-Debian-Bug: #758074 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* debugfs: fix set_inode_field block[IND|DIND|TIND]Theodore Ts'o2014-08-191-1/+4
| | | | | | | | | | After we determine that we can't parse the array value as an integer, we need to restore the square brackets to the field name, so that we can find a match with block[IND], block[DIND], and block[TIND] in the inode field table. Reported-by: Jun He <jhe@cs.wisc.edu> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* filefrag: fix extent count calculation when using FIBMAPTheodore Ts'o2014-08-131-2/+3
| | | | | | | | | | | The extent count calculation works correctly with the FIBMAP ioctl in verbose (-v) mode, but without the verbose option, the calculation was broken because we weren't properly updating the fm_ext data structures in non-verbose mode. Addresses-Launchpad-Bug: #1356496 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* tests: convert use of md5sum to crcsumTheodore Ts'o2014-08-125-41/+41
| | | | | | | | | | The following tests were using md5sum: i_e2image, u_mke2fs, and u_tune2fs. Convert them to use crcsum for better portability (not all environments have md5sum; some might have sha1sum instead :-) For our purposes crcsum is quite sufficient. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* e2fsck: don't flush the FS unless it's actually dirtyDarrick J. Wong2014-08-125-3/+63
| | | | | | | | | | | | | | | | | | | | | | | | | ext2fs_flush2() unconditionally writes the block group descriptors to disk even if the underlying FS isn't marked dirty. This causes the following error message on a fsck -n run: e2fsck 1.43-WIP (09-Jul-2014) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information Error writing block 2 (Attempt to write block to filesystem resulted in short write). Ignore error? no Error writing block 2 (Attempt to write block to filesystem resulted in short write). Ignore error? no Error writing file system info: Attempt to write block to filesystem resulted in short write Since ext2fs_close2() only calls flush if the dirty flag is set, modify e2fsck to exhibit the same behavior so that we don't spit out write errors for a read only check. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* e2fsck: flush out the superblock and bitmaps before printing final messagesTheodore Ts'o2014-08-103-39/+58
| | | | | | | | | | | | | | | | | | | | | | | | | A user who sees the message ***** REBOOT LINUX ***** or ***** FILE SYSTEM WAS MODIFIED ***** might think that e2fsck was complete even though we haven't finished writing out the superblock or bitmap blocks, and then either forcibly reboot or power cycle the box, or yank the USB key out while the storage device is still being written (before e2fsck exits). So rearrange the exit path of e2fsck so that we flush out the dirty superblock/bg descriptors/bitmaps before we print the final message. Also clean up this code so that the flow of control is easier to understand, and add error checking to catch any errors (normally caused by I/O errors writing to the disk) for these final writebacks. Addresses-Debian-Bugs: #757543, #757544 Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: Dan Jacobson <jidanni@jidanni.org>
* tests: add the r_meta_bg_shrink testTheodore Ts'o2014-08-101-0/+34
| | | | | | | | | This test checks to make sure resize2fs can properly handle a file system which started life as a normal ext4 file system and then was grown to a size where meta_bg was enabled, and then shrunk back below the point where the meta_bg format is still needed. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* tests: add f_first_meta_bg_too_big testTheodore Ts'o2014-08-104-0/+28
| | | | | | | | | The test verifies that e2fsck can properly fix a file system where the value of s_first_meta_bg in the superblock is larger than the number of block group descriptors in the file system. E2fsck will fix this by clearing the meta_bg feature. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* tests: make sure MKE2FS_FIRST_META_BG is unset while running testsTheodore Ts'o2014-08-101-0/+1
| | | | | | | If the developer has set the MKE2FS_FIRST_META_BG environment variable, this can cause test failures. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* resize2fs: disable the meta_bg feature if necessaryTheodore Ts'o2014-08-101-4/+13
| | | | | | | | | | | | | When shrinking a file system, if the number block groups drops below the point where we started using the meta_bg layout, disable the meta_bg feature and set s_first_meta_bg to zero. This is necessary to avoid creating an invalid/corrupted file system after the shrink. Addresses-Debian-Bug: #756922 Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reported-by: Marcin Wolcendorf <antymat+debian@chelmska.waw.pl> Tested-by: Marcin Wolcendorf <antymat+debian@chelmska.waw.pl>
* e2fsck: fix file systems with an overly large s_first_meta_bgTheodore Ts'o2014-08-103-0/+20
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* libext2fs: avoid buffer overflow if s_first_meta_bg is too bigTheodore Ts'o2014-08-102-4/+8
| | | | | | | | | | | | If s_first_meta_bg is greater than the of number block group descriptor blocks, then reading or writing the block group descriptors will end up overruning the memory buffer allocated for the descriptors. Fix this by limiting first_meta_bg to no more than fs->desc_blocks. This doesn't correct the bad s_first_meta_bg value, but it avoids causing the e2fsprogs userspace programs from potentially crashing. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* libext2fs: have UNIX IO manager use pread64/pwrite64Theodore Ts'o2014-08-084-3/+31
| | | | | | | | | | | Commit baa3544609da3c ("libext2fs: have UNIX IO manager use pread/pwrite) causes a breakage on 32-bit systems where off_t is 32-bits for file systems larger than 4GB. Fix this by using pread64/pwrite64 if possible, and if pread64/pwrite64 is not present, using pread/pwrite only if the size of off_t is at least as big as ext2_loff_t. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* debugfs: teach rdump to take multiple source argumentsAaron Crane2014-08-042-21/+25
| | | | | | | [ modified to update man page by tytso ] Signed-off-by: Aaron Crane <arc@aaroncrane.co.uk> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* debugfs: refactor do_rdump()Aaron Crane2014-08-041-14/+17
| | | | | | | No behaviour changes. This will simplify the next commit. Signed-off-by: Aaron Crane <arc@aaroncrane.co.uk> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* debugfs: fix double-close bug in "rdump" and "dump -p"Aaron Crane2014-08-041-3/+0
| | | | | | | | | | | | | | | | | | | | | Previously, both of these usages called dump_file() with a true value as the "preserve" argument, which caused it to in turn call fix_perms() to make the permissions on the locally-dumped file match those found on the ext2 filesystem. fix_perms() then attempted to close(2) the file descriptor (if any) before returning (though it didn't attempt to report on any errors found while doing so). However, in both of these situations, the local file being dumped had been opened by the caller of dump_file(), which also closes it (and reports on any errors detected when closing). This meant that both "rdump" and "dump -p" would then emit a spurious EBADF message when trying to re-close the local file descriptor. Deleting the spurious close(2) call in fix_perms() fixes the problem in both commands. Signed-off-by: Aaron Crane <arc@aaroncrane.co.uk> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* debugfs: be more specific in error messagesAaron Crane2014-08-041-2/+2
| | | | | Signed-off-by: Aaron Crane <arc@aaroncrane.co.uk> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* libext2fs: place metadata blocks in the last flex_bg so they are contiguousTheodore Ts'o2014-08-042-172/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Place the allocation bitmaps and inode table blocks so they are adjacent, even in the last flexbg. Previously, after running "mke2fs -t ext4 DEV 286720", the layout of the last few block groups would look like this: Group 32: (Blocks 262145-270336) [INODE_UNINIT, ITABLE_ZEROED] Block bitmap at 262145 (+0), Inode bitmap at 262161 (+16) Inode table at 262177-262432 (+32) Group 33: (Blocks 270337-278528) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] Block bitmap at 262146 (bg #32 + 1), Inode bitmap at 262162 (bg #32 + 17) Inode table at 262433-262688 (bg #32 + 288) Group 34: (Blocks 278529-286719) [INODE_UNINIT, ITABLE_ZEROED] Block bitmap at 262147 (bg #32 + 2), Inode bitmap at 262163 (bg #32 + 18) Inode table at 262689-262944 (bg #32 + 544) Now, they look like this: Group 32: (Blocks 262145-270336) [INODE_UNINIT, ITABLE_ZEROED] Block bitmap at 262145 (+0), Inode bitmap at 262148 (+3) Inode table at 262151-262406 (+6) Group 33: (Blocks 270337-278528) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] Block bitmap at 262146 (bg #32 + 1), Inode bitmap at 262149 (bg #32 + 4) Inode table at 262407-262662 (bg #32 + 262) Group 34: (Blocks 278529-286719) [INODE_UNINIT, ITABLE_ZEROED] Block bitmap at 262147 (bg #32 + 2), Inode bitmap at 262150 (bg #32 + 5) Inode table at 262663-262918 (bg #32 + 518) This reduces the free space fragmentation in a freshly created file system. It also allows the following mke2fs command to succeed: mke2fs -t ext4 -b 4096 -O ^resize_inode -G $((2**20)) DEV 2130483 (Note that while this allows people to run mke2fs with insanely large flexbg sizes, this is not a recommended practice, as the kernel may refuse to resize such a file system while mounted, since it currently tries to allocate an in-memory data structure based on the size of the flexbg, and so a file system with a very large flexbg size will cause the memory allocation to fail. This will hopefully be fixed in a future kernel release, but if the goal is to force all of the metadata blocks to be at the beginning of the file system, it's better to use the packed_meta_blocks configuration parameter in mke2fs.conf.) Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* Revert "mke2fs: prevent creation of unmountable ext4 with large flex_bg count"Theodore Ts'o2014-08-041-24/+0
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit d988201ef9cb6f7b521e544061976ab4270a3f89. The problem with this commit is that causes common small file system configurations to fail. For example: mke2fs -O flex_bg -b 4096 -I 1024 -F /tmp/tt 79106 mke2fs 1.42.11 (09-Jul-2014) /tmp/tt: Invalid argument passed to ext2 library while setting up superblock This check in ext2fs_initialize() was added to prevent the metadata from being allocated beyond the end of the filesystem, but it is also causing a wide range of failures for small filesystems. We'll address this in a different way, by using a smarter algorithm for deciding the layout of metadata blocks for the last flex block group. Reported-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* debugfs: fix argument parsing in do_freefrag()Artemiy Volkov2014-08-021-0/+1
| | | | | | | | When do_freefrag() is called from debugfs, the value of optind is not reset. Rectify that by calling reset_getopt(). Signed-off-by: Artemiy Volkov <artemiyv@acm.org> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* misc: fix Makefile for profiled buildTheodore Ts'o2014-08-021-1/+2
| | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* libext2fs: when appending to a file, don't split an index block in equal halvesDarrick J. Wong2014-08-021-7/+72
| | | | | | | | | | | | | | | | When we're appending an extent to the end of a file and the index block is full, don't split the index block into two half-full index blocks because this leaves us with under utilized index blocks, at least in the fallocate case. Instead, copy the last extent from the full block into the new block. This isn't perfect utilization, but there's a lot of work involved in teaching extent.c to be able to goto a nonexistent node in a newly allocated (and empty) extent block. This patch does not fix the general problem of keeping the extent tree balanced. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* libext2fs: have UNIX IO manager use pread/pwriteDarrick J. Wong2014-08-024-1/+33
| | | | | | | | | If pread/pwrite are present, have the UNIX IO manager use them for aligned IOs (instead of the current seek -> read/write), thereby saving us a (minor) amount of system call overhead. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* filefrag: minor code fixes and cleanupsAndreas Dilger2014-08-011-11/+15
| | | | | | | | | | | | | | Print filefrag_fiemap() error message to stderr instead of stdout. Only call ioctl(EXT3_IOC_GETFLAGS) for ext{2,3,4} filesystems to decide if the ext2 indirect block allocation heuristic shold be used. Properly handle the the force_bmap (-B) option. Exit with a positive error number instead of a negative one. Signed-off-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* tests: fix f_badcluster output formattingAndreas Dilger2014-08-012-9/+12
| | | | | | | | | | The f_badcluster output format depends on how libreadline formats and outputs the commands read from stdin. Instead of trying to handle these differences, use an input command file, which does not depend on external components to be consistent. Signed-off-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* misc: quiet signed/unsigned charactr compiler warningsAndreas Dilger2014-08-012-13/+17
| | | | | | | | | Quiet warnings about signed vs. unsigned character mismatch. Use __u8 for storing UUIDs instead of char to match the superblock s_uuid field. Signed-off-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* tune2fs: fix uninitialized variable in remove_journal_deviceTheodore Ts'o2014-07-311-3/+3
| | | | | | | | | | This bug was introduced by commit 7dfefaf413bbd ("tune2fs: update journal super block when changing UUID for fs"). Fixes-Coverity-Bug: 1229243 Reported-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* tune2fs: update journal users while updating fs UUID (with external journal)Azat Khuzhin2014-07-284-8/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we have fs with external journal device, and updating it's UUID, we should update UUID in users list for that external journal device. Before: $ tune2fs -U clear /tmp/dev tune2fs 1.42.10 (18-May-2014) $ dumpe2fs /tmp/dev | fgrep UUID dumpe2fs 1.42.10 (18-May-2014) Filesystem UUID: <none> Journal UUID: da1f2ed0-60f6-aaaa-92fd-738701418523 $ dumpe2fs /tmp/journal | fgrep users -A10 dumpe2fs 1.42.10 (18-May-2014) Journal number of users: 2 Journal users: 0707762d-638e-4bc6-944e-ae8ee7a3359e 0ad849df-1041-4f0a-b1c1-2f949d6a1e37 After: $ sudo tune2fs -U clear /tmp/dev tune2fs 1.43-WIP (18-May-2014) $ dumpe2fs /tmp/dev | fgrep UUID dumpe2fs 1.42.10 (18-May-2014) Filesystem UUID: <none> Journal UUID: da1f2ed0-60f6-aaaa-92fd-738701418523 $ dumpe2fs /tmp/journal | fgrep users -A10 dumpe2fs 1.42.10 (18-May-2014) Journal number of users: 2 Journal users: 0707762d-638e-4bc6-944e-ae8ee7a3359e 00000000-0000-0000-0000-000000000000 Also add some consts to avoid *magic numbers*: - UUID_STR_SIZE - UUID_SIZE - JFS_USERS_MAX - JFS_USERS_SIZE Proposed-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: Azat Khuzhin <a3at.mail@gmail.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* tune2fs: update journal super block when changing UUID for fs.Azat Khuzhin2014-07-281-18/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using -U option you can change the UUID for fs, however it will not work for journal device, since it have a copy of this UUID inside jsb (i.e. journal super block). So copy UUID on change into that block. Here is the initial thread: http://comments.gmane.org/gmane.comp.file-systems.ext4/44532 You can reproduce this by executing following commands: $ fallocate -l100M /tmp/dev $ fallocate -l100M /tmp/journal $ sudo /sbin/losetup /dev/loop1 /tmp/dev $ sudo /sbin/losetup /dev/loop0 /tmp/journal $ mke2fs -O journal_dev /tmp/journal $ tune2fs -U da1f2ed0-60f6-aaaa-92fd-738701418523 /tmp/journal $ sudo mke2fs -t ext4 -J device=/dev/loop0 /dev/loop1 $ dumpe2fs -h /tmp/dev | fgrep UUID dumpe2fs 1.43-WIP (18-May-2014) Filesystem UUID: 8a776be9-12eb-411f-8e88-b873575ecfb6 Journal UUID: e3d02151-e776-4865-af25-aecb7291e8e5 $ sudo e2fsck /dev/vdc e2fsck 1.43-WIP (18-May-2014) External journal does not support this filesystem /dev/loop1: ********** WARNING: Filesystem still has errors ********** Reported-by: Chin Tzung Cheng <chintzung@gmail.com> Signed-off-by: Azat Khuzhin <a3at.mail@gmail.com> Reviewed-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: Theodore Ts'o <tytso@mit.edu>