summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update Release Notes, Changelogs, version.h, etc. for 1.41.14 releasev1.41.14Theodore Ts'o2010-12-226-11/+58
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* mke2fs: don't complain if the fs type "default" is not defined in mke2fs.confTheodore Ts'o2010-12-222-5/+5
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* resize2fs: do not clear resize inode for 0 resvd blocksEric Sandeen2010-12-221-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I ran into odd behavior where mkfs.ext4 of a 16T filesystem would create a resize inode with 0 reserved blocks, and mark the resize_inode feature. A subsequent slight downward resize of the filesystem would remove the resize inode, making any further offline resizing impossible. This is especially odd in light of the fact that a large downward resize (say, to 8T) will actually add blocks to the resize inode - so a small resize removes it, a large resize expands it ... commit 8ade268cf2fde8629b51bfd1c044a83db88234cd had added this: If the filesystem is grown to the point where the resize_inode is no longer needed, clean it up properly so e2fsck doesn't have to. but, it seems e2fsck does not care about this situation, either. So, simply leave the resize_inode intact in this case, and everything seems to be happy. Note, this is for the 1.41.xx branch. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* libext2fs: Don't use the extended rec_len encoding for standard file systemsTheodore Ts'o2010-12-223-7/+12
| | | | | | | | If the file system has a blocksize less than 64k, then don't use the extended rec_len encoding, to be consistent with what the kernel will do. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* libext2fs: Fix compile bug on big-endian architecturesTheodore Ts'o2010-12-161-1/+1
| | | | | | Addresses-Sourceforge-Bug: #3138115 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* libext2fs: fix ref_offset callback with sparse files in ext2fs_block_iterate2()Theodore Ts'o2010-12-161-1/+2
| | | | | | | Addresses-Sourceforge-Bug: 3081087 Reported-by: vmo@users.sourceforge.net Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* resize2fs: handle exactly-16T filesystems in resize2fsEric Sandeen2010-12-161-3/+11
| | | | | | | | | | | | | | | Before we go whole-hog on 64-bit e2fsprogs, I wonder if this is worth considering as a last-minute addition to the 1.41 stream. Currently, mke2fs will shave a block off an exactly-16T device to fit*, but resize2fs does not do the same, leading to some asymmetry. This patch fixes that up, and allows 16T devices to be handled more gracefully in offline resize. (in fact resize2fs will not even open a 16T device, today). *commit 37d17a65ecb4615546b417038190a41bafca7c51 Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* e2fsprogs: fix type-punning warningsEric Sandeen2010-12-163-7/+12
| | | | | | | | | | | | | | | | | | Flags used during RHEL/Fedora builds lead to a couple type-punning warnings: recovery.c: In function 'do_one_pass': recovery.c:539: warning: dereferencing type-punned pointer will break strict-aliasing rules ./csum.c: In function 'print_csum': ./csum.c:170: warning: dereferencing type-punned pointer will break strict-aliasing rules The two changes below fix this up. Note that the csum test binary output changes slightly, but this does not break any tests. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* Update Release Notes, Changelogs, version.h, etc. for 1.41.13 releasev1.41.13Theodore Ts'o2010-12-136-198/+260
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* e2fsck: add an option which causes it to only do a journal replayBernd Schubert2010-12-063-0/+16
| | | | | | | | | | | | | | As recently discussed on linux-ext4@vger.kernel.org add an option to e2fsck to allow to replay the journal only. That will allow scripts, such as pacemakers 'Filesystem' RA to first replay the journal and if that sets an error state from the journal replay, further check for that error (dumpe2fh -h | grep "Filesystem state:") and if that shows and error to refuse to mount. It also allows automatic e2fsck scripts to first replay the journal and on a second run after the real pass1 to passX checks to test for the return code. Signed-off-by: Bernd Schubert <bschubert@ddn.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* e2fsck: Do blkid interpretation on the external journal specifierTheodore Ts'o2010-12-061-1/+8
| | | | | | | | | | | If the user specifies "e2fsck -j UUID=XXX", e2fsck should do blkid interpretation, since e2fsck does it with the base file system name. So from the sake of consistency and user convenience, we should do it here too. Addresses-Debian-Bug: #559315 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* e2fsck: Add the ability to force a problem to not be fixedTheodore Ts'o2010-12-063-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The boolean options "force_no" in the problems stanza of e2fsck.conf allows a particular problem code be treated as if the user will answer "no" to the question of whether a particular problem should be fixed --- even if e2fsck is run with the -y option. As an example use case, suppose a distribution had widely deployed a version of the kernel where under some circumstances, the EOFBLOCKS_FL flag would be left set even though it should not be left set, and a customer had a workload which exercised the fencepost error all the time, resulting in many large number of inodes that had EOFBLOCKS_FL set erroneously. Enough, in fact, the e2fsck runs were taking too long. (There was such a bug in the kernel, which was fixed by commit 58590b06d in 2.6.36). Leaving EOFBLOCKS_FL set when it should not be isn't a huge deal, and is certainly than having high availability timeout alerts going off left and right. So in this case, the best fix might be to put the following in /etc/e2fsck.conf: [problems] 0x010060 = { # PR_1_EOFBLOCKS_FL_SET force_no = true no_ok = true no_nomsg = true } Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* dumpe2fs: fix output for flex_bg bitmap offsetsAndreas Dilger2010-12-051-10/+24
| | | | | | | | | | | | | | | | | | | | | | | | When running dumpe2fs on a filesystem formatted with flex_bg, it prints out the relative offsets for the bitmaps and inode table badly on 64-bit systems, because the offset is computed as a large positive number instead of being a negative numer (which will not be printed at all): Group 1: (Blocks 0x8000-0xffff) [INODE_UNINIT, ITABLE_ZEROED] Block bitmap at 0x0102 (+4294934786), Inode bitmap at 0x0202 (+4294935042) Inode table at 0x037e-0x03fa (+4294935422) This commit prints out the relative offsets for flex_bg groups as the offset within the reported group. This makes it more clear where the metadata is located, rather than simply printing some large negative number. Group 1: (Blocks 0x8000-0xffff) [INODE_UNINIT, ITABLE_ZEROED] Block bitmap at 0x0102 (bg #0 +258), Inode bitmap at 0x0202 (bg #0 +514) Inode table at 0x037e-0x03fa (bg #0 +894) Signed-off-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* mke2fs: Fix (minor) memory leaksTheodore Ts'o2010-12-011-0/+4
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* mke2fs: Fail if the requested file system type is not defined in mke2fs.confTheodore Ts'o2010-12-011-11/+49
| | | | | | | | | | | | | | | If the user passes a file system type which is not defined in mke2fs.conf (i.e., mke2fs -t xfs ...) change mke2fs so that it prints a warning and aborts the run. (There is an exception for ext2, since that file system does not need a special definition in the fs_types section of the /etc/mke2fs.conf file.) In addition, print a warning if there are usage types (specified using the -T option) which are not defined in /etc/mke2fs.conf. Addresses-Debian-Bug: #594609 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* resize2fs: Clarify error explaining on-line shrinking is not supported at allTheodore Ts'o2010-11-261-2/+1
| | | | | | Addresses-Debian-Bug: #599786 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* resize2fs.8.in: Document that resize2fs -p only works on offline resizesTheodore Ts'o2010-11-261-2/+2
| | | | | | Addresses-Launchpad-Bug: #505719 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* MCONFIG: Fix dependency definitions for the static and profiled blkid libraryTheodore Ts'o2010-11-261-2/+2
| | | | | | | | | | | The dependency definitions for DEPSTATIC_LIBBLKID and DEPPROFILED_LIBBLKID incorrectly referenced the non-dependency macros (i.e., STATIC_LIBUUID instead of DEPSTATIC_LIBUUID). This resulted in -luuid showing up as a Makefile dependency, which is of course wrong. Addresses-Debian-Bug: #604629 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* e2fsck: Fix inode nlink accounting that could cause PROGRAMMING BUG errorsTheodore Ts'o2010-11-261-5/+7
| | | | | | | | | | | | | | | | | | | | | | This fixes two possible causes for the error message: WARNING: PROGRAMMING BUG IN E2FSCK! OR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM. inode_link_info[X] is Y, inode.i_links_count is Z. They should be the same! One cause which can trigger this message is when an inode has an illegal link count > 65500 --- for example, 65535. This was the case in the Debian Bug report #555456. Another cause which could trigger this message is if an ext4 directory previously had more than 65000 subdirectories (thus causing i_link_count to be set to 1), but then some of the subdirectories were deleted, such that i_link_count should now be the actual number of subdirectories. Addresses-Debian-Bug: #555456 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* e2fsck.conf.5: Clarify man pageTheodore Ts'o2010-11-261-1/+1
| | | | | | | | | Clarify the e2fsck.conf(5) man page to make it clear that it applies for ext4 file systems. Addresses-Debian-Bug: #591083 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Update Release Notes, Changelogs, version.h, etc. for 1.41.13 releaseTheodore Ts'o2010-11-227-282/+447
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* Disable lazy inode table initialization when running regression testsTheodore Ts'o2010-11-221-0/+1
| | | | | | | This avoids test failures when running on new kernels that allow lazy itable initialization. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* mke2fs: Add discard option into mke2fs.confLukas Czerner2010-11-222-2/+8
| | | | | | | | | | Allow to specify discard in mke2fs.conf. Also change the way how to specify default value for lazy_itable_init. It is better to have all this defaulting done in the same place so do it in definition (as we do with discard). Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* mke2fs: Deprecate -K option, introduce discard/nodiscardLukas Czerner2010-11-222-8/+22
| | | | | | | | | | | | | | | | | | | | | | It would be nice to have consistent "discard" options in every system tool (mount, fsck, mkfs) taking advantage of discards. Also "discard" and "nodiscard" is more descriptive instead of just "-K" and can be easily defaulted and it is something we can not do with "-K". With this commit you need to specify extended option like this: ./mke2fs -T <fstype> -E nodiscard <device> in order make a filesystem without discarding the device first. And ./mke2fs -T <fstype> -E discard <device> respectively. -K option is with this commit deprecated and should not be used anymore. Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* mke2fs: Force the default blocksize to be at least the logical sector sizeTheodore Ts'o2010-11-221-2/+2
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* mke2fs: Set logical/physical sector size from environment for debuggingTheodore Ts'o2010-11-221-3/+6
| | | | | | | | | | | | | | | | | | If MKE2FS_DEVICE_SECTSIZE is set, then this will override the logical sector size, which is the smallest sector size that can be written atomically by the device. (Previously MKE2FS_DEVICE_SECTSIZE set the physical sector size, which was incorrect given its historical usage.) The environment variable MKE2FS_DEVICE_PHYS_SECTSIZE will set the physical sector size, which is the actual sector size used by the device in reality. The logical sector size is always less than or equal to the physical sector size; and writes smaller than the physical sector size but greather than or equal to the logical sector size will cause a read-modify-write cycle within the device firmware (or in some abstract layer lower than the Linux block I/O subsystem, at any rate). Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* mke2fs: Fill in min_io and opt_io with physical sector sizeTheodore Ts'o2010-11-221-3/+10
| | | | | | | | | | | | If the device does not have an explicitly specified minimum io_size or optimal io_size, and the physical sector size is greater than the block size, then use the physical sector size as a better-than-nothing hint. This should help for SSD's that have a physical sector size of 8k or 16k (which are reportedly will be coming soon). Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* mke2fs: Do not require -F for block size < physical sizeTheodore Ts'o2010-11-221-6/+5
| | | | | | | | | | There will be SSD's out soon that have 8k or 16k phyiscal block sizes. So don't enforce a requirement that the block size be less than the physical block size unless the force option is given, and don't give a warning if the user can't do anything about it (i.e., if the physical block size is > than the page size). Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* mke2fs: Enable lazy_itable_init if the kernel supports this featureTheodore Ts'o2010-10-011-1/+6
| | | | | | | | Add check for /sys/fs/ext4/features/lazy_itable_init. If this file exists, it should be OK to skip initializing the inode table since the kernel will do it at mount time. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* tune2fs.8: Document that the device can be specified via LABEL= or UUID=Theodore Ts'o2010-09-251-0/+6
| | | | | | Addresses-Debian-Bug: #580236 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* e2fsck: Open the external journal in exclusive modeTheodore Ts'o2010-09-251-1/+2
| | | | | | | | | | This prevents accidentally replaying and resetting the journal while it is mounted, due to an accidental attempt to run e2fsck on an LVM snapshot of a file system with an external journal. Addresses-Debian-Bug: #587531 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* resize2fs.8: Make it clear that power-of-2 units are meant by kilobytesTheodore Ts'o2010-09-251-0/+8
| | | | | | | | It's sad that this needs to be made clear.... Addresses-Debian-Bug: #594004 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* libext2fs: Change EXT2_FLAG_DIRECT_IO to avoid conflict with devel branchTheodore Ts'o2010-09-241-1/+1
| | | | | | | The development branch of e2fsprogs already has a code point assigned in conflict with EXT2_FLAG_DIRECT_IO. Fix this. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* debugfs: Make the extents listing in the stat command more conciseTheodore Ts'o2010-09-241-8/+5
| | | | | | | | Use "[u]" instead of "[uninit]" and limit the amount of detail printed for the extent tree blocks, so it is more similar to the format used for direct/indirect mapped inodes. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* debugfs: Add the -D option to request Direct I/OTheodore Ts'o2010-09-242-8/+21
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* ext2fs: Optimize for Direct I/OTheodore Ts'o2010-09-243-8/+14
| | | | | | | | | Allocate various memory structures to be properly aligned to avoid needing to use a bounce buffer when doing direct I/O read/writes. This should also help on FreeBSD systems which require aligned buffers unconditionally. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* ext2fs: Add Direct I/O support to the ext2fs libraryTheodore Ts'o2010-09-245-83/+144
| | | | | | | | | | | | This adds the basic support for Direct I/O to unix_io.c, and adds a new flag EXT_FLAG_DIRECT_IO which can be passed to ext2fs_open() or ext2fs_open2() to request Direct I/O support. Note that device mapper devices in Linux don't support Direct I/O, and in some circumstances using Direct I/O can actually make performance *worse*! Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* libext2fs: Fix memory leak in the Unix I/O layer when changing block sizeTheodore Ts'o2010-09-231-0/+2
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* ext2fs: add ext2fs_get_memalign() functionTheodore Ts'o2010-09-232-1/+19
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* mke2fs: make "invalid blocks count" error more clearEric Sandeen2010-09-201-2/+3
| | | | | | | | | | | | | | | | | Mistakes on the commandline can lead to odd error messages: # mke2fs -t ext4 -E stride=128 stripe-width=512 /dev/sda1 mke2fs: invalid blocks count - /dev/sda1 Making it a bit more explicit is more obvious: mke2fs: invalid blocks count '/dev/sda1' on device 'stripe-width=512' (hint, the mistake was no comma separation for -E) Reported-by: Adam Huffman <bloch@verdurin.com> Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* mke2fs: use lazy inode init on some discard-able devicesEric Sandeen2010-09-201-12/+43
| | | | | | | | | | If a device supports discard -and- returns 0s for discarded blocks, then we can skip the inode table initialization -and- the inode table zeroing at mkfs time, and skip the lazy init as well since they are already zeroed out. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* e2fsck: Improve error message when device name misspelledJan Kara2010-09-191-0/+2
| | | | | | | | | | When a device name is misspelled, we output the full text about specifying alternate superblock. This is slightly misleading because when the device cannot be open because of ENOENT, this certainly won't help. So just print that device does not exist and exit. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* debugfs: Display the extent tree blocks in the stat command outputTheodore Ts'o2010-09-191-3/+3
| | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* tune2fs, debugfs, libext2fs: Add support for ext4 default mount optionsTheodore Ts'o2010-09-187-2/+76
| | | | | | | Add support for 2.6.35's new default mount options which can be specified in the superblock. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* badblocks: Deal with UTF-8 characters in progress messageTheodore Ts'o2010-08-013-97/+156
| | | | | | | | Addresses-Gentoo-Bug: #309909 Addresses-Debian-Bug: #583782 Addresses-Debian-Bug: #587834 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* mke2fs: fix mke2fs "invalid inode ratio" error messageTim Small2010-07-301-1/+1
| | | | | | | Make error message consistent with the validity test. Signed-off-by: Tim Small <tim@seoss.co.uk> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* mke2fs.8.in: clarify the sign of a block-size constraint.Eric Sandeen2010-07-301-1/+1
| | | | | | | | | | | | | | | | | This bit of the mke2fs manpage is slightly confusing: -b block-size Specify the size of blocks in bytes. <snip> If block-size is negative, then mke2fs will use heuristics to determine the appropriate block size, with the constraint that the block size will be at least block-size bytes. because it sounds like the block size will be at least a negative number. Clarify just what the negative sign means. Reported-by: Chris Frost <chris@frostnet.net> Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
* debian: Fix outdated description: /sbin/fsck has moved to util-linuxTheodore Ts'o2010-07-191-1/+1
| | | | | | Addresses-Debian-Bug: #588726 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* resize2fs.8: Update man page to indicate ext4 supports on-line resizeTheodore Ts'o2010-07-191-1/+1
| | | | | | Addresses-Debian-Bug: #589345 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* resize2fs: relax requirements for -P output a bitEric Sandeen2010-07-171-2/+1
| | | | | | | | | | | | | | | | Requiring an immediate pre-fsck before printing a minimum resize size seems a bit draconian; if the fs isn't clean or marked with error, then certainly, but for an informational minimum size, I don't think we need to require a fsck since last mount. I had simply copied the checks from the actual resize path, previously. Installers use this option (-P) to gather minimum resize info, and requiring an actual fsck before use just seems to go too far. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>