summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge 'baserock/richardmaw/yakshave/util-linux-blkid' into baserock/morphbaserock/morphRichard Maw2014-06-12457-27660/+61674
|\ | | | | | | | | Reviewed-by: Lars Wirzenius Reviewed-by: Sam Thursfield
| * Reinstate morphologybaserock/richardmaw/yakshave/util-linux-blkidRichard Maw2014-06-061-0/+21
| | | | | | | | | | | | | | | | e2fsprogs gets built after util-linux, which means when both provide a tool, the version in e2fsprogs gets used. Unfortunately, we'd prefer the version in util-linux, since it gets more actively maintained.
| * Update to v1.42.10Richard Maw2014-06-05456-27660/+61653
| |\ |/ /
| * Update release notes, etc. for final 1.42.10 releasev1.42.10Theodore Ts'o2014-05-186-14/+219
| | | | | | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * debian: override source-is-missing false positiveTheodore Ts'o2014-05-181-0/+1
| | | | | | | | | | | | | | | | | | See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=748421 Once a new version of Lintian is uploaded with this fixed, we can drop this override. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * debian: fix debian/rules compatibility with gmake 4.0Theodore Ts'o2014-05-181-6/+7
| | | | | | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * Update translation files for 1.42.10 releaseTheodore Ts'o2014-05-1827-13098/+18292
| | | | | | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * Fix obvious typo in German translationTheodore Ts'o2014-05-181-2/+2
| | | | | | | | | | | | Addresses-Debian-Bug: #737800 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * po: update vi.po (from translationproject.org)Trần Ngọc Quân2014-05-181-803/+1010
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * po: update sv.po (from translationproject.org)Göran Uddeborg2014-05-181-705/+909
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * po: update pl.po (from translationproject.org)Jakub Bogusz2014-05-181-715/+906
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * po: update nl.po (from translationproject.org)Benno Schulenberg2014-05-181-718/+934
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * po: update fr.po (from translationproject.org)Samuel Thibault2014-05-181-706/+910
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * po: update es.po (from translationproject.org)Benno Schulenberg2014-05-181-1332/+1491
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * po: update cs.po (from translationproject.org)Petr Pisar2014-05-181-703/+910
| | | | | | | | Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * mke2fs: set gdt csum when creating packed fsDarrick J. Wong2014-05-131-0/+1
| | | | | | | | | | | | | | | | | | | | When we're creating a fs with metadata blocks packed at the beginning (packed_meta_blocks=1 in mke2fs.conf), set the group descriptor checksum or else we create DOA filesystems with checksum errors. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Lukas Czerner <lczerner@redhat.com>
| * resize2fs: fix sanity check in reserve_sparse_super2_last_group()Darrick J. Wong2014-05-131-1/+1
| | | | | | | | | | | | | | | | | | In reserve_sparse_super2_last_group, the old_desc check should only be performed if ext2fs_super_and_bgd_loc2() gave us a location -- a return value of 0 means that there is no old-style GDT block. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * quota: remove mke2fs's and tune2fs's warning messages regarding quotaTheodore Ts'o2014-05-134-22/+0
| | | | | | | | | | | | | | | | | | | | | | We no longer need to reference https://ext4.wiki.kernel.org/index.php/Quota since we've fixed the nasty bugs associated with e2fsck and the quota feature. The wiki page will be updated once we've done a release that includes these fixes indicated the verison which these problems have been fixed. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Aditya Kali <adityakali@google.com>
| * tests: add basic e2fsck regression test for fixing the quota inodeTheodore Ts'o2014-05-137-0/+53
| | | | | | | | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Aditya Kali <adityakali@google.com>
| * debugfs: add commands to query the quota informationTheodore Ts'o2014-05-136-50/+320
| | | | | | | | | | | | | | | | This allows us to verify quota information in an ext4 file systems with the quota feature. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Aditya Kali <adityakali@google.com>
| * quota: support storing the quota file handles in the quota contextTheodore Ts'o2014-05-133-21/+66
| | | | | | | | | | | | | | | | This makes memory management easier because when the quota context is released, all of the quota file handles get released automatically. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Aditya Kali <adityakali@google.com>
| * quota: integrate mkquota.h into quotaio.hTheodore Ts'o2014-05-1312-242/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are interfaces that are used by mke2fs.c and tune2fs.c which are in quotaio.h, and some future changes will be much simpler if we can combine the two header files together. Also the guard #ifdef for mkquota.h was incorrect, which caused problems when both header files needed to be included. Also remove quota.pc and installation rules for libquota, since this library is never going to be something that we can export externally anyway. Eventually we'll want to clean up the interfaces and move the external publishable interfaces to the libext2fs library, and then rename what's left from libquota.a to libsupport.a for internal use only. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Aditya Kali <adityakali@google.com>
| * quota: fix memory leak in quota_compare_and_update()Theodore Ts'o2014-05-132-3/+15
| | | | | | | | | | | | | | | | | | | | | | The quota_handle wasn't getting closed in quota_compare_and_update(). Fix this, and also make sure that quota_file_close() doesn't unnecessarily modify the quota inode if it's not necessary. Otherwise e2fsck will claim that the file system is modified when it didn't need to be. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Aditya Kali <adityakali@google.com>
| * quota: fix e2fsck to notice missing quota entriesTheodore Ts'o2014-05-132-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously if there was a missing quota entry --- i.e., if there were files owned by group "eng", but there was no quota record for group "eng", e2fsck would not notice the missing entry. This means that the usage informtion would not be properly repaired. This is unfortunate. Fix this by marking each quota record in quota_dict that has a corresponding record on disk, and then check to see if there are any records in quota_dict that have not been marked as having been seen. In that case, we know we need to update the relevant quota inode. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Aditya Kali <adityakali@google.com>
| * quota: fix e2fsck so we update the quota file correctlyTheodore Ts'o2014-05-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In scan_dquota_callback() we were copying dqb_off from the on-disk dquot structure to the dqot structure that we have constructed in memory. This is a bad idea, because if we detect that the quota inode is corrupted and needs to be replaced, when we later write out the inode, the fact that we have a non-zero dqb_off value means that quota routines will not bother updating the quota tree index, since presumably the quota tree index already has an entry for this dqot. The problem is that e2fsck, the only user of these functions, has zapped the quota inode so it can be written from scratch. So this means the index for the quota records are not written out, so the kernel can not find any of the records in the quota inodes. Oops. The fix is simple; there is no reason to copy the dqb_off field into the quota_dict copy of struct dquot. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Aditya Kali <adityakali@google.com>
| * quota: add debugging code to print the dquot structureTheodore Ts'o2014-05-132-0/+20
| | | | | | | | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Aditya Kali <adityakali@google.com>
| * libquota: fix dict_uint_cmp()Niu Yawei2014-05-091-1/+6
| | | | | | | | | | | | | | | | | | dict_uint_cmp() returns an usigned int value in int type, which could mess the dict key comparison when the difference of two keys is greater than INT_MAX. Signed-off-by: Niu Yawei <yawei.niu@intel.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * Add a make variable for the pkgconfig install dirDavid Michael2014-05-078-28/+29
| | | | | | | | | | | | | | | | Adding the pkgconfigdir variable allows specifying an installation location for pkg-config files independent of libdir. Signed-off-by: David Michael <fedora.dm0@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * Fix cross compilation problem in parse-types.shChen Qi2014-05-073-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | The checking of types in parse-types.sh doesn't make much sense in a cross-compilation environment, because the generated binary is executed on build machine. So even if asm_types.h has got correct statements for types, it's possible that the generated binary will report an error, because these types are for the target machine. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
| * mke2fs: check for a partition table and warn if presentTheodore Ts'o2014-05-074-8/+59
| | | | | | | | | | | | | | | | This supercedes the "whole disk" check, since it does a better job and there are times when it is quite legitimate to want to use the whole disk. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * mke2fs: print extra information about existing ext2/3/4 file systemsTheodore Ts'o2014-05-071-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The basic idea is to provide a bit more context in this situation: % ./misc/mke2fs -t ext4 /dev/sdc3 mke2fs 1.42.9 (4-Feb-2014) /dev/sdc3 contains a ext4 file system Proceed anyway? (y,n) ... by adding this bit of context: % ./misc/mke2fs -t ext4 /dev/sdc3 mke2fs 1.42.9 (4-Feb-2014) /dev/sdc3 contains a ext4 file system last mounted on /SOX-backups on Mon May 5 08:59:53 2014 Proceed anyway? (y,n) Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * mke2fs: print a message when creating a regular fileTheodore Ts'o2014-05-053-6/+12
| | | | | | | | | | | | | | | | | | | | We've added the ability to automatically recreate a file if it doesn't exist prior to creating the file system, since this is often used (for example) when managing file system images for use in virtual machines. We should at least notify the user that this is going on to avoid surprises in the case of misspelled device/file names. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * resize2fs: fix inode table move for the backwards move caseTheodore Ts'o2014-05-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | In the case where the new location of the inode table is before the old inode table, the optimization which tries to optimize zero block moves breaks. Fix it. This fixes a bug that was tickled by the reproduction described in the previous commit. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * libext2fs: fix alloc_allocate_group_table() if the flexbg_offset wrapsTheodore Ts'o2014-05-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the previous block group's inode table ends at the very end of file system, wrap around to the beginning of the flex_bg. This fixes a bug was tickled by: mke2fs.conf: frontload = { features = extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,^resize_inode,sparse_super2 hash_alg = half_md4 num_backup_sb = 0 packed_meta_blocks = 1 inode_ratio = 4194304 flex_bg_size = 262144 } mke2fs -T frontload /tmp/foo.img 2T resize2fs -M /tmp/foo.img resize2fs -M /tmp/foo.img Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * resize2fs: refine minimum required blocks for flex_bg file systemsTheodore Ts'o2014-05-042-39/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous commit exposed bugs in the calculation for flex_bg file systems. The problem is that since (by default) we keep the metadata blocks for the flex_bg in the first block group of the flex_bg, and because we don't want to overwrite metadata blocks used by the original file system with data blocks make life easier in case the resize is aborted for some reason, we need to treat all of the metadata blocks in the existing flex_bg has in use for the purposes of calculate_minimum_resize_size(). Even though this means we need to reserve more data blocks to avoid running out of space, the net result of these two commits is a net savings in how much we can shrink a file system. Using the following test sequence: mke2fs -F -t ext4 /tmp/foo.img 2T resize2fs -M /tmp/foo.img resize2fs -M /tmp/foo.img resize2fs -M /tmp/foo.img Here is the comparison in the resulting file systems between the old and new resize2fs (units are in 4k blocks): resize #1 resize #2 resize #3 old resize2fs 1117186 45679 43536 new resize2fs 48784 37413 37392 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * resize2fs: fix overly-pessimistic calculation of minimum size requiredTheodore Ts'o2014-05-041-10/+26
| | | | | | | | | | | | | | | | | | | | For extent-mapped file systems, we need to reserve some extra space in case we need to grow the extent tree. Calculate the safety margin more intelligently, so we don't overestimate the amount of space required. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reported-by: Dmitry Monakhov <dmonakhov@openvz.org>
| * e2fsck: if any problems are fixed in pass 0, check the whole file systemTheodore Ts'o2014-05-043-1/+8
| | | | | | | | | | | | | | If there are any PREEN_OK problems fixed in check_super_block(), don't skip checking the full file system. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * e2fsprogs/filefrag: print shared extent flagMark Fasheh2014-05-042-0/+4
| | | | | | | | | | | | | | | | Filefrag doesn't catch and print the shared extent flag. Add this for users of filefrag on file systems with shared extents (such as btrfs). Signed-off-by: Mark Fasheh <mfasheh@suse.de> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * mke2fs: only print the low-level file system stats in verbose modeTheodore Ts'o2014-05-0414-155/+24
| | | | | | | | | | | | Also print the file system UUID if it is non-NULL. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * mke2fs: check for pre-existing file systemTheodore Ts'o2014-05-043-3/+36
| | | | | | | | | | | | | | | | Warn the system administrator if there is an existing file system on the block device, and give the administrator an opportunity to abort the mkfs operation. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * mke2fs: add an option in mke2fs.conf to proceed after a delayTheodore Ts'o2014-05-045-10/+52
| | | | | | | | | | | | | | | | | | | | If mke2fs needs to ask the user for permission, and the user doesn't type anything the specified delay in the /etc/mke2fs.conf file, proceed as if the user had said yes. The default is to do what we currently do, which is to wait until the user answers the question one way or the other. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * mke2fs: create a regular file if necessaryTheodore Ts'o2014-04-263-5/+19
| | | | | | | | | | | | | | This is useful when creating a filesystem for use with a VM, for example. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * mke2fs: don't complain if the regular file is too smallTheodore Ts'o2014-04-261-3/+3
| | | | | | | | | | | | | | | | | | | | Don't ask the user if it's OK that a regular file is smaller than the requested size. This test only makes sense if we are creating the file system on a block device. This allow users to not need to manually answer the "proceed?" question when creating a file system backed by a simple file. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * mke2fs, tune2fs: call proceed_question() from check_plausibility()'s callerTheodore Ts'o2014-04-264-12/+18
| | | | | | | | | | | | | | | | Move the call to proceed_question() from check_plausibility() to its caller. This allows more fine grained control by mke2fs about when it might want to call check_plausibility(). Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * mke2fs: don't ask the proceed question using a regular fileTheodore Ts'o2014-04-264-10/+21
| | | | | | | | | | | | | | | | | | | | | | | | Very often people are creating file systems using regular files, so we shouldn't ask the user to confirm using the proceed question. Otherwise it encourages users to use the -F flag, which is a bad thing. We do need to continue to check if the external journal device is a block device. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * e2fsck: skip low dtime check if the number of inodes > s_mkfs_timeTheodore Ts'o2014-04-221-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We already skip the low dtime check if the number of inods is greater than the last mount or last written time. However, if a very large file system is resized sufficiently large that the number of inodes is greater than when the file system was original created, we can end up running afoul of the low dtime check. This results in a large number of false positives which e2fsck can fix up without causing any problems, but it can induce a large amount of anxiety for the system administrator. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reported-by: Patrik Horník <patrik@hornik.sk>
| * tests: fix resize test tmpfs max-file-size checkingAndreas Dilger2014-04-146-12/+31
| | | | | | | | | | | | | | | | | | | | | | Old distros may not have the "truncate" tool, so use "dd" instead. If tmpfs cannot handle a 2GB temp file (e.g. old RHEL5 and SLES 11 kernels) then skip the test instead of failing it. If this fails, try to report better error messages instead of failing silently. Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * fix miscellaneous build warningsAndreas Dilger2014-04-149-13/+14
| | | | | | | | | | | | | | | | | | Fix various unused variable and use-uninitialized warnings. Add generated files into .gitignore. Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * e4defrag: fix error reporting when ext2fs_open failsTheodore Ts'o2014-04-101-4/+4
| | | | | | | | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
| * e4defrag: open fs with EXT2_FLAG_64BITS flagJon Ernst2014-04-101-2/+2
| | | | | | | | | | | | | | This allows e4defrag to work with 64-bit and bigalloc file systems. Signed-off-by: Jon Ernst <jonernst07@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>