- 28 Dec, 2012 4 commits
-
-
Filipe Brandenburger authored
This patch specifies libraries using a more specific glob that will pick only the lib*.so.<version> file and will not match the lib*.so symlink and the lib*.a archive/static library. Signed-off-by:
Filipe Brandenburger <filbranden@google.com> Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu>
-
Filipe Brandenburger authored
The rules makefile was already using `find' in order to cope with multi-arch directories under /usr/lib. This patch changes it to look for those files from the root of the install tree. This allows for installing to libdirs of /usr/lib64 or /lib or /lib64. There are no other files with the same names in the package so it's not a problem to find from the root of the tree. Signed-off-by:
Filipe Brandenburger <filbranden@google.com> Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu>
-
Filipe Brandenburger authored
Setting EXTRA_CONF_FLAGS in rules.custom will pass the extra arguments to calls of ./configure when building e2fsprogs. This can be used, for instance, to pass a --libdir argument or similar to the configure script. Signed-off-by:
Filipe Brandenburger <filbranden@google.com> Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu>
-
Filipe Brandenburger authored
Setting BUILD_E2FSCK_STATIC=no in rules.custom will prevent the debian/rules makefile from building a statically-linked e2fsck and from creating a deb package for it. Signed-off-by:
Filipe Brandenburger <filbranden@google.com> Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu>
-
- 24 Dec, 2012 6 commits
-
-
Theodore Ts'o authored
Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu>
-
Darren Hart authored
Signed-off-by:
Darren Hart <dvhart@infradead.org> Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu> Cc: Andreas Dilger <adilger@dilger.ca>
-
Theodore Ts'o authored
AC_PROG_EGREP requires autoconf 2.54, so bump up the AC_PREREQ accordingly. Reported-by: g.esp@free.fr Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu>
-
Theodore Ts'o authored
Force the use of the static libraries when linking the test program so that "make check" works when the shared libraries have not been installed, and so that we test against the version of the libraries in the source tree. Reported-by: g.esp@free.fr Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu>
-
Theodore Ts'o authored
Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu>
-
Theodore Ts'o authored
This commit adds the functionality which had previously only been in the tst_extents command to debugfs. The debugfs command extent_open will open extent tree of a particular inode, and enables a series of commands which will allow the user to interact with the extent tree directly. Once the extent tree is closed via extent_open(), these additional commands will be disabled again. This commit exports two new functions from lib/ext2fs/extent.c which had previously been statically defined: ext2fs_extent_node_split() and ext2fs_extent_goto2(). Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu>
-
- 21 Dec, 2012 1 commit
-
-
Theodore Ts'o authored
Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu>
-
- 20 Dec, 2012 3 commits
-
-
Theodore Ts'o authored
Commit 789bd401 ("e2fsck: fix incorrect interior node logical start values") surfaced a bug where if e2fsck finds and removed an invalid node in the extent tree, i.e.: Inode 12 has an invalid extent node (blk 22, lblk 0) Clear? yes It was possible for starting logical blocks found in the interior nodes of the extent tree. Commit 789bd401 added the ability for e2fsck to discover this problem, which resulted in the test f_extent_bad_node to fail when the second pass of e2fsck reported the following complaint: Interior extent node level 0 of inode 12: Logical start 0 does not match logical start 3 at next level. Fix? yes This patch fixes this by adding a call to ext2fs_extent_fix_parents() after deleting the bogus node in the extent tree. Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu>
-
Theodore Ts'o authored
Previously, ext2fs_extent_fix_parents() would only avoid modifying the cursor location associated with the extent handle the cursor was pointed at a leaf node in the extent tree. This is because it saved the starting logical block number of the current extent, but not the "level" of the extent (where level 0 is the leaf node, level 1 is the interior node which points at blocks containing leaf nodes, etc.) Fix ext2fs_extent_fix_parents() so it is guaranteed to not change the current extent in the handle even if the current extent is not at the bottom of the tree. Also add a fix_extent command to the tst_extents program to make it easier to test this function. Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu>
-
Eric Sandeen authored
An index node's logical start (ei_block) should match the logical start of the first node (index or leaf) below it. If we find a node whose start does not match its parent, fix all of its parents accordingly. If it finds such a problem, we'll see: Pass 1: Checking inodes, blocks, and sizes Interior extent node level 0 of inode 274258: Logical start 3666 does not match logical start 4093 at next level. Fix<y>? Signed-off-by:
Eric Sandeen <sandeen@redhat.com> Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu>
-
- 17 Dec, 2012 2 commits
-
-
Mikael Pettersson authored
The current m68k code was buggy for multiple reasons; first the bfset, et. al commands interpret the bit number as a signed number, not an unsigned number. Secondly, there were missing memory clobbers. Since there is no real benefit in using explicit asm's at this point (gcc is smart enough to optimize the generic C code to use the set/clear/test bit m68k instruction) fix this bug by removing the m68k specific asm versions of these functions. Tested on m68k-linux with e2fsprogs-1.42.6 and gcc-4.6.3 as before. All tests pass and the debug output looks sane. I compared the e2fsck binaries from the previous build with this one. They had identical .text sizes, and almost the same number of bit field instructions (obviously compiler-generated), so this change should have no serious performance implications. Signed-off-by:
Mikael Pettersson <mikpe@it.uu.se> Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu> Cc: Andreas Schwab <schwab@linux-m68k.org>
-
Theodore Ts'o authored
Fix a potential memory leak reported by Li Xi. In addition, there were possible error cases where the file descriptor would not be properly closed, so fix those as well while we're at it. Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu> Reported-by:
Li Xi <pkuelelixi@gmail.com>
-
- 16 Dec, 2012 3 commits
-
-
Gregoire Pichon authored
Make sure the s_mmp_update_interval super block field is set from the file system parameters block which is passed into the ext2fs_initialize() function. Addresses-Lustre-Bug: LU-1888 Signed-off-by:
Gregoire Pichon <gregoire.pichon@bull.net> Signed-off-by:
Theodore Ts'o <tytso@mit.edu>
-
Theodore Ts'o authored
Commit 53e3120c introduced a regression which would case e2fsck to overrun an array boundary for bigalloc file systems, and most likely crash. Fix this by correctly using blocks instead of clusters when incrementing the loop counter in the fast path optimization case. Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu>
-
Theodore Ts'o authored
Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu>
-
- 06 Dec, 2012 1 commit
-
-
Theodore Ts'o authored
Also fix the -o option so it works correctly (instead of core dumping). Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu>
-
- 30 Nov, 2012 1 commit
-
-
Theodore Ts'o authored
One of these fixes was triggering failures when running: ./test_scripts --valgrind r_move_itable r_inline_xattr r_resize_inode It should be a false positive, but it fixing this makes it easier to see real problems. Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu>
-
- 29 Nov, 2012 7 commits
-
-
Theodore Ts'o authored
Commit 44a2cca3 introduced a compile-time failure if --enable-quota is not passed to the configure script. Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu>
-
Eric Sandeen authored
If we haven't turned --enable-quota on at config time, I don't think tune2fs should know about the feature either. Today we can actually tune2fs -O quota even if not configured on, and then the rest of the tools will refuse to touch it: # tune2fs -O quota /dev/sda1 # tune2fs -O ^quota /dev/whatever complains tune2fs 1.42.3 (14-May-2012) tune2fs: Filesystem has unsupported read-only feature(s) while trying to open /dev/sda1 # fsck /dev/sda1 fsck from util-linux 2.21.2 e2fsck 1.42.3 (14-May-2012) /dev/sda1 has unsupported feature(s): quota e2fsck: Get a newer version of e2fsck! Ok, so turn it off? # tune2fs -O ^quota /dev/whatever complains tune2fs 1.42.3 (14-May-2012) tune2fs: Filesystem has unsupported read-only feature(s) while trying to open /dev/sda1 Nope. Debugfs? Nope. # debugfs -w /dev/sda1 debugfs 1.42.3 (14-May-2012) /dev/sda1: Filesystem has unsupported read-only feature(s) while opening filesystem Signed-off-by:
Eric Sandeen <sandeen@redhat.com> Reported-by:
Bert DeKnuydt <Bert.Deknuydt@esat.kuleuven.be> Addresses-Red-Hat-Bugzilla: #880596 Signed-off-by:
Theodore Ts'o <tytso@mit.edu>
-
Eric Sandeen authored
It's --enable-quota, not --enable-libquota. Signed-off-by:
Eric Sandeen <sandeen@redhat.com> Signed-off-by:
Theodore Ts'o <tytso@mit.edu>
-
Theodore Ts'o authored
Add a fast path optimization in e2fsck's pass 5 for the common case where the block bitmap is correct. The optimization works by extracting each block group's block allocation bitmap into a memory buffer, and comparing it with the expected allocation bitmap using memcmp(). If it matches, then we can just update the free block counts and be on our way, and skip checking each bit individually. Addresses-Google-Bug: #7534813 Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu> Reviewed-by:
Lukas Czerner <lczerner@redhat.com>
-
Theodore Ts'o authored
This optimizies the CPU utilization of the rb_get_bmap_range() function when most of the bitmap is allocated. Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu> Reviewed-by:
Lukas Czerner <lczerner@redhat.com>
-
Theodore Ts'o authored
This simplifies the rb_get_bmap_range() function and speeds it up for the case where most of the bitmap is zero. Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu> Reviewed-by:
Lukas Czerner <lczerner@redhat.com>
-
Theodore Ts'o authored
This function efficiently counts the number of bits in a block of memory. Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu> Reviewed-by:
Lukas Czerner <lczerner@redhat.com>
-
- 27 Nov, 2012 2 commits
-
-
Theodore Ts'o authored
Optimize e2fsck pass 1 by marking entire extents as being in use at a time, instead of block by block. This optimization only works for non-bigalloc file systems for now (it's tricky to handle bigalloc file systems since this code is also responsible for dealing with blocks that are not correctly aligned within a cluster). When the optimization works, the CPU savings can be significant: ove a full CPU minute for a mostly full 4T disk. Addresses-Google-Bug: #7534813 Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu> Reviewed-by:
Lukas Czerner <lczerner@redhat.com>
-
Theodore Ts'o authored
This speeds up reading bitmaps from disk for very large (and full) disks by significant amounts (i.e., up to two CPU minutes for a 4T file system). Addresses-Google-Bug: #7534813 Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu> Reviewed-by:
Lukas Czerner <lczerner@redhat.com>
-
- 26 Nov, 2012 2 commits
-
-
Andreas Dilger authored
Restructure the ext2fs_get_device_size() and blkid_get_dev_size() code to localize the variables used for different device probing methods. This at least reduces the #ifdef mess to only one part of the code for each method, and avoids "unused variable" compiler warnings added when variables are declared without being #ifdef'd. Signed-off-by:
Andreas Dilger <adilger@dilger.ca> Signed-off-by:
Theodore Ts'o <tytso@mit.edu>
-
Andreas Dilger authored
Change the license of the mmp.c file to LGPL to match the license of other files in the libext2fs library. Signed-off-by:
Andreas Dilger <adilger@whamcloud.com> Signed-off-by:
Theodore Ts'o <tytso@mit.edu>
-
- 14 Oct, 2012 1 commit
-
-
Theodore Ts'o authored
The "Reading directory block XXX..." message was not being sent through the pager, which would result in confusing output. Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu>
-
- 11 Oct, 2012 5 commits
-
-
Theodore Ts'o authored
In e2fsck_pass4(), we were consulting inode_dir_map using ext2fs_test_inode_bitmap2() for every single inode in the file system. However, there were many cases where we never needed the result of the test --- most notably if the inode is not in use. I was a bit surprised that GCC 4.7 with CFLAGS set to "-g -O2" wasn't able to optimize this out for us, but here is the pass 4 timing for an empty 3T file system before this patch: Pass 4: Memory used: 672k/772k (422k/251k), time: 3.67/ 3.66/ 0.00 and afterwards, we see a 43% improvement: Pass 4: Memory used: 672k/772k (422k/251k), time: 2.09/ 2.08/ 0.00 Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu>
-
Theodore Ts'o authored
Also fix a bug caused by a stray continuation backslash which caused the e2fsck/Makefile to fail when profiling is enabled. Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu> Reviewed-by:
Eric Sandeen <sandeen@redhat.com>
-
Theodore Ts'o authored
Profiling shows that rb_test_bit() is now calling ext2fs_rb_next() a lot, and this function is now the hot spot when running e2freefrag. If we cache the results of ext2fs_rb_next(), we can eliminate those extra calls, which further speeds up both e2freefrag and e2fsck by reducing the amount of CPU time spent in userspace. Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu>
-
Theodore Ts'o authored
The code was previously allocating a single 4 or 8 byte pointer for the rcursor and wcursor fields in the ext2fs_rb_private structure; this added two extra memory allocations (which could fail), and extra indirections, for no good reason. Removing the extra indirection also makes the code more readable, so it's all upside and no downside. Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu> Reviewed-by:
Eric Sandeen <sandeen@redhat.com>
-
Theodore Ts'o authored
Optimize testing for a bit in an rbtree-based bitmap for the case where the calling application is scanning through the bitmap sequentially. Previously, we did this for a set of bits which were inside an allocated extent, but we did not optimize the case where there was a large number of bits after an allocated extents which were not in use. 1111111111111110000000000000000000 ^ optimized ^not optimized In my tests of a roughly half-filled file system, the run time of e2freefrag was halved, and the cpu time spent in userspace was during e2fsck's pass 5 was reduced by a factor of 30%. Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu> Reviewed-by:
Lukas Czerner <lczerner@redhat.com>
-
- 05 Oct, 2012 1 commit
-
-
Theodore Ts'o authored
Enable the use of 64-bit bitmaps, so e2freefrag will work on file systems with the 64-bit feature enabled. In addition, enable the rbtree-based bitmaps, which significantly saves the amount of memory required (from 97 megs to 1.7 megs for an empty 3T file system) at the cost of additional CPU overhead (but we will claw back some of the additional CPU overhead in the next commit). Addresses-Google-Bug: 7269948 Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu>
-
- 23 Sep, 2012 1 commit
-
-
Theodore Ts'o authored
Signed-off-by:
"Theodore Ts'o" <tytso@mit.edu>
-