aboutsummaryrefslogtreecommitdiff
path: root/resize
AgeCommit message (Collapse)Author
2019-01-29E2fsprogs: fix ODR issueAndreas Gampe
Do not use whole_static_libs and shared_libs at the same time. Fix up clients. Bug: 123590866 Test: mmma external/e2fsprogs Change-Id: I36d184dd878de2beacbb17c306e47076b44d68bb
2018-10-11Update e2fsprogs to 1.44.4 from upstream.David Anderson
Merge commit 'cf5587d' into do-merge Change-Id: Ib774c86fd09f7eb482b7d613cb872c5abe1423f0
2018-09-18ODR violation in resize2fs during host buildJiyong Park
Bug: 112062612 Test: $ m SANITIZE_HOST=address $OUT_DIR/host/linux-x86/bin/resize2fs $OUT_DIR/host/linux-x86/bin/llvm-symbolizer $ $OUT_DIR/host/linux-x86/bin/resize2fs Change-Id: I72a8c183eb887137e3a414043b3d54771aa4eedc
2018-08-18Remove obsolete files from the repositoryTheodore Ts'o
They are removed when we generate the tarball, and they serve no useful purpose, so let's remove them. This will be help us to create the tarball using git archive more easily. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-08-11build: use MKDIR_P instead of MKINSTALLDIRSRoss Burton
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-07-22resize2fs: Remove the real kilobytes rant from man pageLukas Czerner
Remove the rant about the "real" kilobytes from the man page and just make it more clear that the suffixed units are representing power-of-two units as we do in mke2fs man page. Also add terabytes to the list. Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-06-26tests: explicitly force resize2fs's use of lazy (or not)Theodore Ts'o
Resize2fs will not enable lazy_itable if the kernel apparently does not support that feature. This will cause spurious test failures when the tests are running on such a system (or where sysfs is not mounted). So for the purposes of the regression test we need to force the use of lazy_itable so that the results conform to expected golden output. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-06-25Update Makefile.in files using "make depend"Theodore Ts'o
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-06-24resize: remove calculation of unused variableTheodore Ts'o
Fix-Coverty-Bug: 1398367 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-06-23Fix gcc and clang warningsTheodore Ts'o
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-06-19resize2fs: add missing EOL to error messageJan Kara
Reviewed-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-02-27resize2fs: remove bigalloc warning for online resizingTheodore Ts'o
The kernel supports online resizing of bigalloc file systems. There's no real point to have a scary messaging when doing an online resize of bigalloc file systems, since all of the heavy lifting is done by the kernel. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-02-26AOSP: use e2fsprogs-defaults for ccflagsTheodore Ts'o
From AOSP commit: 2002d7f1fc: Use -Werror in external/e2fsprogs ... which got reverted and reapplied in a confusing way. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-02-26AOSP: Add missing libdl dependenciesPavlin Radoslavov
Bug: 62815515 Test: lunch full-eng; make checkbuild Change-Id: I1751669c4ed046c22587938e04eb76abe8553a8d From AOSP commit: a24084ceb74c84b0943c86deb5cb99a63d3c46d7
2018-01-02Merge branch 'maint' into nextTheodore Ts'o
2017-12-21Add missing information to various man pages and usage textsTyson Nottingham
badblocks.c: Add -B and -X to usage text. chattr.1.in: Add P to list of settable attributes. e2image.8.in, e2image.c: Remove superfluous mention of -r option. e2undo.8.in, e2undo.c: Add description for -z to man page and add -o and -z to synopsis and usage text. e4crypt.8.in: Add -p pad option to relevant command descriptions. lsattr.1.in: Fix typo. mke2fs.8.in: Add -C to synopsis. Add MKE2FS_DEVICE_PHYS_SECTSIZE description and update MKE2FS_DEVICE_SECTSIZE description. mke2fs.conf.5.in: Add devices stanza summary. Remove base_features and default_features descriptions from defaults section, as they are already described in fs_types section. Move enable_periodic_fsck and force_undo to fs_types section, as they can be set per filesystem type. Add missing lazy_journal_init and hugefiles_dir descriptions. tune2fs.8.in: Remove unsupported -p option and deprecated -s option. Add 64bit, ea_inode, large_dir, and metadata_csum_seed descriptions. tune2fs.c: Remove unsupported -p option from usage text. Add mmp_update_interval to extended option usage text. resize/main.c: Add -S option to usage text. Signed-off-by: Tyson Nottingham <tgnottingham@gmail.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2017-12-04Merge branch 'maint' into nextTheodore Ts'o
2017-11-02resize2fs: fix free blocks count sanity check for 64-bit file systemsTheodore Ts'o
The sanity check that the free blocks count is not insane could fail with a false positive on 64-bit file systems. Fix it. Reported-by: Ian Astle <iastle@ott-fortimail.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2017-10-15Merge branch 'maint' into nextTheodore Ts'o
2017-10-15Fix typos in code comments and developer docsSebastian Rasmussen
Signed-off-by: Sebastian Rasmussen <sebras@gmail.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Andreas Dilger <adilger@dilger.ca>
2017-10-15Fix typos in error messages and documentationSebastian Rasmussen
Signed-off-by: Sebastian Rasmussen <sebras@gmail.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Andreas Dilger <adilger@dilger.ca>
2017-08-13Merge branch 'maint' into nextTheodore Ts'o
2017-08-13Add options to gzip and tar to create reproducible artificatsTheodore Ts'o
Also remove some long-unused rules from resize2fs's Makefile. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2017-07-27Merge branch 'maint' into nextTheodore Ts'o
2017-07-23resize2fs: add support for resizing filesystems with ea_inode featureTahsin Erdogan
Resizing filesystems with ea_inode feature was disallowed so far because the code for updating the ea entries was missing. This patch adds that support. Signed-off-by: Tahsin Erdogan <tahsin@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2017-07-23resize2fs: sanity check the free blocks and inode countsTheodore Ts'o
If the free block or free inodes count are larger than the number of blocks or inodes in the system, request that the file system be checked. Otherwise it's possible for calcuate_minimum_resize_size() to hang in an infinite loop. This problem was found using American Fuzzy Lop. Reported-by: Adam Buchbinder <abuchbinder@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2017-07-04resize2fs: moving xattr inodes is not supportedTahsin Erdogan
In some cases, resize2fs needs to move inodes because their inode number is greater than the maximum allowed. Moving extended attribute inodes would require updating all the references to them. This is currently not supported. Signed-off-by: Tahsin Erdogan <tahsin@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2017-05-23AOSP: Disable macro redefined warnings.Christopher Ferris
The new kernel headers do: #define __bitwise __bitwise__ However, the code redefines __bitwise without undef'ing it first. This is a temporary fix, b/35721782 filed to fix this. Change-Id: I2c6a64146966f1737835f012d24ccc844570d02b Test: Builds without warningers/errors. From AOSP commit: commit 91581e8f15b8a29aedea3e7c11162301c7e66ec3 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2017-05-23AOSP: Convert e2fsprogs targets to soong.Alex Deymo
This patch also removes all the "-host" and "_static" suffix from all the libraries adding "unique_host_soname: true". This prevents confusions with the host installed libraries. A new "libext2_misc" library is introduced to export some files from the misc/ directory to other binaries in this project. Bug: 34220783 Test: mmma external/e2fsprogs Change-Id: Ia1b689991346b11f8cb38f7c6ee356e666e01d6d From AOSP commit: 7a9e1a96766d31a41b88f0a539fcc3d532b5c530 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2017-04-26tests: skip running long test with "make check" and add "make fullcheck"Theodore Ts'o
Don't run tests which take longer than 20 seconds to run (especially f_large_dir, whose run time is well over ten minutes) for "make check". The new "make fullcheck" will run all of the regression tests for e2fsprogs. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-10-25resize2fs: fix resizing large file systems when block size != page sizeTheodore Ts'o
Reported by: Jerry Lee <jerrylee@qnap.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-08-10resize2fs: fix crash when there is an ea block and no blocks to migrateTheodore Ts'o
This fixes a bug introduced in 1.43 by commit fb47b94fffc: "resize2fs: rewrite extent/dir/ea block checksums when migrating". If there is an extended attribute block and there are no blocks that need to migrate, we will crash. The bug was caused by a botched De Morgan's transformation. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-06-07tune2fs,resize2fs: special case HURD only when testing s_creator_osTheodore Ts'o
The s_creator_os field was a mistake, given how Hurd has been ab(using) certain file system fields. We should skip support for certain advanced features (64-bit support, metadata checksums) for file systems created on the Hurd OS only, instead of only supporting them for file systems created on Linux. This fixes various regression test failures for FreeBSD. (The regression tests are probably mostly hopeless for Hurd anyway, but given the HURD abuse's of various file system fields, the HURD is going to have to be given second-class treatment in any case, given what they decided to do with ext2 support, which locks them out of the more advanced file system features, anyway.) Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-06-03Add clarifications to the e4defrag and resize2fs man pagesTheodore Ts'o
Addresses-Debian-Bug: #761144 Addresses-Debian-Bug: #770750 Signed-off-by: Theodore Ts'o <tytso@mit.edu> by 1 commit.
2016-05-29e2fsck,resize2fs: fix gcc -Wall nitsTheodore Ts'o
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-22Add --enable-hardening which builds e2fsprogs with security hardeningTheodore Ts'o
Enable the following security features: stack protection, fortify, read-only relocation tables, immediate dynamic symbol binding, and text segment ASLR by enabling position independent executable (PIE). Special handling is provided for shared library and statically linked executables. For all the gory details please see: https://lists.debian.org/debian-devel/2016/05/msg00302.html Distributions who want to do their own special thing can set CFLAGS, CFLAGS_SHLIB, CLFAGS_STLIB, LDFLAGS, LDFLAGS_SHLIB and LDFLAGS_STATIC as appropriate. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-05-10resize2fs, libext2fs: fix bugs in sparse_super2 supportTheodore Ts'o
Fix resize2fs so that the location of the backup superblocks when the sparse_super2 feature is enabled is properly set when growing the file system from a single block group to larger file system sizes. Also fix a bug where the block group summary statistics in some cases when exapnding a sparse_super2 file system. Finally, accurately calculate the file system metadata overhead of the last block group in sparse_super2 file systems. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-15Android.mk: Replace _host suffix with more standard -host suffixAlex Deymo
Most libraries use the "-host" suffix when building for the host. This patch renames all the libraries to use -host instead of _host. Addresses-Google-Bug: #24619596 TEST=make dist Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-06resize2fs: clear uninit BG if allocating from new groupEric Sandeen
If resize2fs_get_alloc_block() allocates from a BLOCK_UNINIT group, we need to make sure that the UNINIT flag is cleared on both file system structures which are maintained by resize2fs. This causes the modified bitmaps to not get written out, which leads to post-resize2fs e2fsck errors; used blocks in UNINIT groups, not marked in the block bitmap. This was seen on r_ext4_small_bg. This patch uses clear_block_uninit() to clear the flag, and my problem goes away. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2016-03-06Merge branch 'maint' into nextTheodore Ts'o
2016-03-06misc: replace comparison macros with inline functionsAndreas Dilger
Replace the EXT2FS_RB_EMPTY_ROOT(), EXT2FS_RB_EMPTY_NODE(), EXT2FS_RB_CLEAR_NODE(), IS_BLOCK_BM(), IS_INODE_BM(), and IS_INODE_TB() macros with static inline functions to avoid suprious compiler warnings with clang: pass1.c:618:28: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((*((__u32 *)(entry)) == 0UL)) { ~~~~~~~~~~~~~~~~~~~~^~~~~~ pass1.c:618:28: note: remove extraneous parentheses around the comparison to silence this warning if ((*((__u32 *)(entry)) == 0UL)) { ^~ pass1.c:618:28: note: use '=' to turn this equality comparison into an assignment if ((*((__u32 *)(entry)) == 0UL)) { ^~ = The static inline functions should compile identically, and allow some extra compile-time checking for the arguments over macros. Signed-off-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-10-24resize2fs: clean up feature test macros with predicate functionsDarrick J. Wong
Create separate predicate functions to test/set/clear feature flags, thereby replacing the wordy old macros. Furthermore, clean out the places where we open-coded feature tests. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-07-13Eliminate unused parameter warnings from Android buildTheodore Ts'o
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-07-12Eliminate doubly defined _LARGEFILE_SOURCE warningTheodore Ts'o
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-05-16misc: fix undo file setupDarrick J. Wong
Fix Coverity bugs 1297094-1297101 by fixing all the mutations in the *_setup_tdb() functions, fixing buffer overflows, and checking return values. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-05-05resize2fs: optionally create undo fileDarrick J. Wong
Provide the user with an option to create an undo file so that they can roll back a failed resize operation. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-03-30Clean up and fix Android build filesTheodore Ts'o
Add missing new lib/ext2fs source files that were added for encryption support. Also move configuration #define's from individual Android.mk to the android_config.h file, since we've moved away from specifying configuration #define's on the command-line upstream. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-03-01Add files to build on AndroidTheodore Ts'o
The Android.mk files were taken from the Android AOSP sources, and updated for the 1.43 next branch. The intention is that this will allow the repository which is currently located in external/e2fsprogs with one which is based off of the upstream e2fsprogs. Right now external/e2fsprogs was not created using "git clone", so it means that git merges don't work. After the external/e2fsprogs Android repository is replaced, with one based off the upstream repository, Android will be able to synchronize with the upstream repository by pulling and merging from upstream, and then running the script "./util/gen-android-files" to update any generated files. (This is necessary because in the Android build system, the Android.mk files are rather stylized and don't make it easy to run arbitrary shell scripts during the build phase.) Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2015-01-27resize2fs: fix regression test to not depend on ext4.ko being loadedDarrick J. Wong
The behavior of the r_fixup_lastbg_big test varies depending on whether or not ext4.ko is loaded and supports lazy_itable_init. This makes checking the bg flags after resize2fs hard to predict, so put in a way to force resize2fs to zero the inode tables, and compare the output based on lazy_itable_init == 0. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2015-01-19Merge branch 'maint' into nextTheodore Ts'o