Commit Graph

4016 Commits (bbcd91bb0de943b364670373957a5658c4487692)

Author SHA1 Message Date
Theodore Ts'o bbcd91bb0d Fix wordwrap.pl so it is more portable
Needed so that wordwrap.pl works with perl 5.14.2

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-09-21 12:50:04 -04:00
Theodore Ts'o b2f5ce5516 mke2fs: throttle allocating groups progress as well
Throttle updates for the "Allocating Groups" progress updates to once
a second as well.  We now do this throttling in libext2fs, so we don't
have to do this for each of mke2fs's progress updates, and because the
updates from ext2fs_allocate_tables() come from within libext2fs
anyway.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-09-21 12:50:04 -04:00
Theodore Ts'o 802f46783c mke2fs.8: use extents vs extent in the man page
We print "extents" for the feature, so we should document "extents" in
the mke2fs's man page, even though we accept both "extent" and
"extents".

Addresses-Sourceforge-Bug: #3559210

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-09-21 12:50:04 -04:00
Theodore Ts'o a92037f261 debian: adjust build dependencies
Remove dc from the list of dependencies, since it's not used during
the build anymore.

Addresses-Debian-Bug: #677497

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-09-21 12:49:48 -04:00
Andreas Dilger 12f48b0caa tests: kill debugfs on interrupted MMP test
If the f_mmp test is interrupted during its test run, then it can
leave debugfs busy-looping in the background.  Since f_mmp is a
relatively long-running test, and is likely to be running during
a parallel test run, this can happen fairly often.

Set a signal trap for the f_mmp test script being killed, so that
the background debugfs command will always be killed by the test.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-09-16 22:05:21 -04:00
Theodore Ts'o a3e87bcc32 mke2fs: disable progress reporting in mke2fs.conf for regression tests
Add a configuration knob so the regression tests can disable progress
reporting.  This fixes a potential lack of predictability since the
progress reports are now time based (once a second) which is
problematic for regression tests which are comparing the expected
output of mke2fs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-09-16 20:43:07 -04:00
Theodore Ts'o 03237de00a mke2fs: throttle progress updates to once a second
With lazy itable initialization, the progress updates for writing the
inode table happens so quickly that on a serial console, the time to
write the progress updates can be the bottleneck.  Fix this by only
updating the progress indicator once a second.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-09-14 00:11:07 -04:00
Theodore Ts'o 2d8c0c8a4f resize2fs: grow uninit_bg file systems more efficiently
If the uninit_bg feature is enabled and the kernel supports
lazy_itable_init, skip zeroing the inode table so that the resize
operation can go much more quickly.  Also set the itable_unused fields
so that the first e2fsck after the resize will run faster.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-09-13 23:09:54 -04:00
Theodore Ts'o 06ca8da745 resize2fs: enforce restrictions if the kernel doesn't do meta_bg resizing
Enhance the online resizing code to be more nuanced about resizing
restrictions.  If the kernel supports meta_bg resizing, then we can
skip all of the restrictions.  If the kernel does not support meta_bg
resizing, check more carefully to make sure there are enough reserved
gdt blocks, so that the user gets a clearer error message.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-09-13 23:09:49 -04:00
Theodore Ts'o a4b738c0bf resize2fs: allow meta_bg/64-bit file systems to be online resized
Resize2fs can't handle resizing flex_bg file systems that do not have
the resize inode, but when the kernel adds support for resizing using
the meta_bg layout, we should allow it be able to resize the file
system.

So move the flex_bg/resize_inode check to the just before we start
doing the off-line resize, instead of doing it earlier where it would
prohibit these file systems for both on-line and off-line resizes.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-09-13 23:05:32 -04:00
Theodore Ts'o 7f82034438 resize2fs: fix overhead calculation for meta_bg file systems
The file system overhead calculation in calculate_minimum_resize_size
was incorrect meta_bg file systems.  This caused the minimum size to
underflow for very large file systems, which threw resize2fs into a
loop generally lasted longer than the user's patience.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-09-13 23:05:32 -04:00
Theodore Ts'o ea38e50307 resize2fs: enforce the 16TB limit on 32-bit file systems correctly
The 16TB limit must be enforced regardless of whether the new size is
specified on the command line or implied by the size of the device,
but only if the file system does not support 64-bit block sizes, or
the kernel does not advertise support of meta_bg resizing.

Previously we were unconditionally enforcing it when it was implied by
the device size, but not if the new size was specified on the command
line.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-09-13 23:04:44 -04:00
Theodore Ts'o ab3f5c5aad Allow e2fsprogs to be built using the clang (LLVM) frontend
Since clang uses C99 semantics by default, the main changes required
to allow clang to build e2fsprogs was to add support the C99 inline
semantics, while still allowing us to be built when the legacy (but
still default for gcc) GNU C89 inline semantics are in force.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-09-09 21:35:39 -04:00
Akira Fujita 321649c9f4 mke2fs: recalculate the reserved blocks when the last BG is dropped
mke2fs -m option can set reserved blocks ratio up to 50%.  But if the
last block group is not big enough to support the necessary data
structures, it gets dropped, we have to recalculate the number of
reserved blocks so that the reserved blocks matches the requested
percentage.

It also avoids a problem where if the user specifies a reserved blocks
of 50%, and after the last partial block group was dropped, if the
number of reserved blocks is greater than 50%, e2fsck will complain.

Steps to reproduce:

1. Create a FS which has the overhead for the last BG
   and specify 50 % for reserved blocks ratio
 # mke2fs -m 50 -t ext4 DEV 1025M

 mke2fs 1.42.5 (29-Jul-2012)
 warning: 256 blocks unused.

 Filesystem label=
 OS type: Linux
 Block size=4096 (log=2)
 Fragment size=4096 (log=2)
 Stride=0 blocks, Stripe width=0 blocks
 656640 inodes, 2621440 blocks
 1310848 blocks (50.00%) reserved for the super user
 ~~~~~~~ <-- Reserved blocks exceed 50% of FS blocks count!

2. e2fsck outputs filesystem corruption
 # e2fsck DEV

 e2fsck 1.42.5 (29-Jul-2012)
 Corruption found in superblock.  (r_blocks_count = 1310848).

 The superblock could not be read or does not describe a correct ext2
 filesystem.  If the device is valid and it really contains an ext2
 filesystem (and not swap or ufs or something else), then the superblock
 is corrupt, and you might try running e2fsck with an alternate superblock:
     e2fsck -b 32768 <device>

Signed-off-by: Akira Fujita <a-fujita@rs.jp.ne.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-09-07 00:09:19 -04:00
Theodore Ts'o 91d11da143 configure: fix --enable-relative-symlink
The configure option --enable-relative-symlinks was incorrectly
specified in configure.in, as --enable-symlink-relative-symlinks.  Fix
the configure script so that --enable-relative-symlinks works, as well
as previous incorrect command line option.  We will keep the older,
incorrect --enable-symlink-relative-symlinks for at least two years
before removing it.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-09-07 00:09:19 -04:00
Mike Frysinger 993c455552 util: respect HAVE_MALLOC_H
Most places respect this define, but this one doesn't.

Reported-by: Dmitri Bogomolov <4glitch@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-08-19 17:57:17 -04:00
Bryce Harrington 84461ea9d0 e2fsprogs: fix spelling of 'filesystme' in debugfs help
Signed-off-by: Bryce Harrington <bryce@canonical.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-08-19 17:56:06 -04:00
Jim Keniston d45b67c5f2 e2fsck: fix potential segv when handling a read error in a superblock
When passed a negative count (indicating a byte count rather than
a block count) e2fsck_handle_read_error() treats the data as a full
block, causing unix_write_blk64() (which can handle negative counts
just fine) to try to write too much.  Given a faulty block device,
this resulted in a SEGV when unix_write_blk64() read past the bottom
of the stack copying the data to cache.  (check_backup_super_block ->
unix_read_blk64 -> raw_read_blk -> e2fsck_handle_read_error)

Reported-by: Alex Friedman <alexfr@il.ibm.com>
Signed-off-by: Jim Keniston <jkenisto@us.ibm.com>
Signed-off-by: Dan Streetman <ddstreet@us.ibm.com>
Reviewed-by: Mingming Cao <mcao@us.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-08-06 18:46:42 -04:00
Theodore Ts'o d5aa6a82b3 Put ELF_OTHER_LIBS in the right place for the linker
Commit a7c17431b9 attempted to fix a problem where the system
libraries might get used instead of local libraries for things like
-lcom_err.  It tried to accomplish this by moving $(ELF_OTHER_LIBS) to
before $(LDFLAGS).

Unfortunately, this was the wrong fix; $(ELF_OTHER_LIBS) *MUST* be
after the object files, or the linker might not pull in the necessary
library and not include it into the DT_NEEDED section of the shared
library.  The proper fix is to add a -L$(LIB) before $(LDFLAGS), and
then remove the -L option from all of the ELF_OTHER_LIBS definitions
in the library Makefiles.

Addresses-Sourceforge-Bug: #3554345

Cc: Olivier Blin <olivier.blin@softathome.com>
Reported-by:  Mike Frysinger <vapier@gentoo.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-08-06 12:30:49 -04:00
Theodore Ts'o 67b3721dc4 Update Release Notes, Changelogs, version.h, etc. for 1.42.5 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-07-29 20:38:48 -04:00
Theodore Ts'o 87e56a995c e2fsck: print the number of blocks and inodes in the verbose statistics
In addition to the free blocks and free inodes, also print the number
of blocks and inodes in the verbose statistics.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-07-29 19:02:29 -04:00
Theodore Ts'o da0fa8f498 e2fsck: allow for bigger disks when printing verbose statistics
Disks have gotten bigger, so 8 digits might not be enough.  Allow for
12 digits worth of blocks, which is more than enough for 3 petabytes.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-07-29 19:00:09 -04:00
Theodore Ts'o c0a849660d e2fsck: add e2fsck.conf options for extra reporting
Add report_time, report_verbose, and report_features options to
e2fsck.conf which enable additional, more verbose reporting by e2fsck.
This is useful for large cloud installations where there are a large
number file systems being managed, and where it may not be obvious
from the e2fsck log files exactly how a particular file system is
configured.

The report_time and report_verbose options, which are the same as the
-tt and -v command line options, respectively, are useful because they
are options specific to e2fsck, and the fsck program does not have a
way of passing certain options only to a specific /sbin/fsck.<fstype>
program.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-07-29 17:44:11 -04:00
Theodore Ts'o 3aa8f60aae libext2fs: fix uninit block calculation when inodes_per_block < first_ino
The following commands:

	dd if=/dev/zero of=/tmp/foo count=1 ibs=$(( 256 * 1024 * 1024 ))
	mke2fs -N 256 -t ext4 /tmp/foo

... will cause mke2fs to write until it fills the device.  The cause
for this is that the explicit request for 256 inodes causes the number
of inodes per block group to be 8.  The ext2fs_initialize() function
assumed that all of the reserved inodes would be in the first block
group, which is not true in this case.  This caused the number of
uninitialized inodes in the first block group to be negative, which
then resulted in mke2fs trying to zero out a very large number of
blocks.  Oops.

Addresses-Sourceforge-Bug: #3528892

Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-07-29 13:34:01 -04:00
Theodore Ts'o 32d4eb2b04 e2fsck: fix code which uniquifies names in directory entries
When checking to see whether or not a new name is unique, the code was
using the wrong length parameter, which could cause the anti-collision
loop for a long time trying to find what it thinks is a unique name.

Addresses-Sourceforge-Bug: #3540545

Reported-by: Vitaly Oratovsky <vmo@users.sourceforge.net>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-07-29 13:05:46 -04:00
Olivier Blin a7c17431b9 Link shared libraries with local libraries instead of system ones
ELF_OTHER_LIBS usually contains local search dirs (-L ../..), but it
was added in link command after system search dirs from LDFLAGS.

Libraries and executables were linked with the system libraries if
present, and possibly using static archives instead of shared
libraries.

It could also make final executable link to fail when shared libraries
are enabled: if libext2fs.so is linked with a static libcom_err.a from
system, build system would attempt to link without -lpthread.

This fixes the issue by moving ELF_OTHER_LIBS before LDFLAGS in the
link command.

Addresses-Sourceforge-Bug: #3542572

Reported-by: Olivier Blin <blino@users.sourceforge.net>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-07-29 12:45:47 -04:00
Riku Voipio d2051f1104 debian: set e2fsprogs as Multi-Arch: foreign
If package foo:i386 depends on e2fsprogs, without Multi-Arch: foreign
statetment, the i386 version of e2fsprogs will be installed. By
setting the foreign field, the already installed (in this example
amd64) e2fsprogs package is enough to satisfy the dependency.

The M-A: foreign field is ignored in pre-multiarch systems, so ifdeffing
it using macros should be unnessary.

Addresses-Debian-Bug: #678395

Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-07-29 00:22:16 -04:00
Theodore Ts'o 78a0d2ba6d e2fsck: check a file system mounted read-only if forced
Previously e2fsck would only allow a mounted file system to be checked
if it was the root file system and it was mounted read-only.  Now
allow any file system mounted read-only if the -f option is specified.

This makes it easier to test how e2fsck handles checking file systems
which are mounted without having to test on the root file system.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-07-29 00:16:44 -04:00
Theodore Ts'o a85f83503a Revert "e2fsck: Skip journal checks if the fs is mounted and doesn't need recovery"
This reverts commit 47c1b8e166.

The original reason for this commit was to speed up boots for hard
drives.  However, I've measured the time difference on a 1TB laptop
drive, and it's not significant: 70ms vs 10ms when running e2fsck on a
clean file system.

The problem with this optimization is that we don't notice if the
journal superblock has a non-zero s_errno field.  If we don't transfer
the error indicator from the journal superblock to the file system
superblock, then the kernel will transfer it when the file system is
remounted read-write, causing scary messages to appear in the syslog.
(And since there was a bug in the kernel code which didn't clear the
error indicator in the journal superblock, it would never get
cleared.)

Reported-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-07-29 00:01:29 -04:00
Eric Sandeen 032eafee30 e4defrag: handle device symlinks
Device nodes are commonly accessed via symlinks, i.e.

lrwxrwxrwx. 1 root root 7 Jul 19 13:01 /dev/mapper/testvg-testlv -> ../dm-0

Today, e4defrag on such a device will fail:

File is not regular file
 "/dev/mapper/testvg-testlv"

due to it being a link, and e4defrag on the link target does as well:

Filesystem is not mounted

due to the target not being found in /etc/mtab.

Fix this by checking whether the symlink target is a block device
and if so, using that device in main(), and also changing get_mount_point()
to search for a matching device number, not device name.

Addresses-Red-Hat-Bugzilla: #707209

Reported-by: Peter Hjalmarsson <xake@rymdraket.net>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-07-28 17:53:48 -04:00
Eric Sandeen 339e457939 filefrag: fix segfault on virtual fs
filefrag on a virtual fs like proc segfaults:

Floating point exception

because stat.f_blocks is 0, so the calculation of cylgroups is 0,
which leads to a divide by 0 when calculating expected extents.

Since it's only used for ext2 filesystems anyway, just move
the calculation of expected under "if (is_ext2)" to fix this.

Reported-by: Max Beikirch <maxnet@onlinehome.de>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-07-28 17:53:30 -04:00
Liu Bo b34056fea0 chattr: update chattr's man page chattr for No_COW
Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-07-28 17:53:30 -04:00
Liu Bo 036fda6d48 filefrag: fix report of number of extents
filefrag has several bugs:

1.
$ touch f1
$ filefrag f1
f1: 1 extent found  ----> bug!
$ filefrag -v f1
Filesystem type is: ef53
File size of f1 is 0 (0 blocks, blocksize 4096)
f1: 0 extents found

2.
$ truncate -s 1m f2
$ filefrag f2
f2: 1 extent found  ----> bug!
$ filefrag -v f2
Filesystem type is: ef53
File size of f2 is 1048576 (256 blocks, blocksize 4096)
f2: 0 extents found

3.
$ for i in `seq 11 -2 0`; do dd if=/dev/zero of=f4 bs=4k count=1 seek=$i conv=notrunc oflag=sync &>/dev/null; done
$ ll f4
-rw-r--r-- 1 root root 49152 Jun  9 15:09 f4
$ filefrag f4
f4: 7 extents found
$ filefrag -v f4
Filesystem type is: ef53
File size of f4 is 49152 (12 blocks, blocksize 4096)
 ext logical physical expected length flags
   0       1  1109993               1
   1       3  1109992  1109994      1
   2       5  1109991  1109993      1
   3       7  1109990  1109992      1
   4       9  1109989  1109991      1
   5      11  1108207  1109990      1 eof
f4: 7 extents found  -----------------------> but we only have 6 extents, bug!

All of these bugs come from the fact that we've made a mistake on
calculating total extents:

o   we set 1 as default for 'total extents', and this will report 1
    extent found even when we don't get any extent from fiemap.
o   if our first extent does not start from 0(logical addr), total
    extents will be one more than what it should be.

Addresses-Red-Hat-Bugzilla: #840848

Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-07-28 17:53:15 -04:00
Theodore Ts'o 53462aad71 logsave: fix fd leak which could cause logsave to hang
The logsave program is leaking a file descriptor when it forks and
execs the program which forks a process which hangs around.  In the
case of /etc/init.d/checkroot, this would be fsck.  This file
descriptor never gets closed, so it's still present when fsck runs
e2fsck, and then if e2fsck has its own logging enabled using (in
/etc/e2fsck.conf):

[options]
    log_dir = /mnt
    log_filename = e2fsck-%N.%h.INFO.%D-%T
    log_dir_wait = true

then e2fsck will fork off a process waiting for /mnt to get remounted
read/write.  This causes logsave to never get an EOF from its pipe, so
it hangs waiting for the read to fail --- which won't happen due to
the file descriptor leak which is still being held open by e2fsck's
forked child process.  And so /etc/init.d/checkroot hangs, and the
root file system never gets remounted read/write, and we deadlock.

Fix the problem by closing the pipe fd so the logsave program doesn't
end up leaking it to its descendent processes.

Addresses-Debian-Bug: #682592

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-07-23 18:45:23 -04:00
Aditya Kali 89dd15db9f tune2fs: fix quota feature removal
When the last quota inode is removed, the 'quota' feature
flag was not removed from superblock in some cases.
Ex:
 $ mke2fs -t ext4 -O quota <dev>  # creates both usr & grp
                                  # quota inodes
 $ tune2fs -Q ^usrquota <dev>  # removes usr quota inode
 $ tune2fs -Q ^grpquota <dev>  # removes grp quota inode,
                               # but the 'quota' feature flag
                               # was not removed from superblock
This patch removes the 'quota' feature flag from superblock
if none of the quota inodes are set.

Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-07-15 21:12:04 -04:00
Aditya Kali 75e862ecd0 e2fsck/quota: mark FS invalid if quotas are not fixed
If user chooses to not fix quota info, then the FS should be
marked as having errors. PR_NO_OK prevented this from happening.

Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-07-15 21:12:04 -04:00
Aditya Kali ad64902b70 libquota: fix quota_inode_truncate()
We failed to clear EXT2_FLAG_SUPER_ONLY after deleting the
quota inode and so, the updated block bitmap was not written
back. This caused fsck to complain after running
'tune2fs -O ^quota <dev>'. Clear this flag so that updated
block bitmap gets written. Also, avoid truncating the quota
inode if it is not hidden.

Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-07-15 21:12:04 -04:00
Aditya Kali 5027751530 tune2fs/quota: always create hidden quota files
Currently 'tune2fs -O quota <dev>' will try to use existing
quota files and write their inode numbers in the superblock.
Next e2fsck run then converts these into hidden quota inodes
(ino #3 & #4). But this approach has problems:
1) Before e2fsck run, the inodes are visible to the user and
   might get corrupted or removed or replaced by the user.
2) Since these are user visible, we have to include
   their block usage in the quota accounting. But once
   these inodes are hidden, e2fsck will have to decrement
   their usage from the quota accounting (which e2fsck
   currently doesn't do and instead reports error).
   (the following used to give e2fsck error previously:
    # assume <dev> has aquota.user & aquota.group files
    $ tune2fs -O quota <dev> # stores ino# of quota files in
                             # ext4 superblock
    $ e2fsck -f <dev>  # hides quota files, but now quota
                       # usage is incorrect.
     << quota errors >>
Instead of making e2fsck complicated, this patch creates the
hidden quota inodes at 'tune2fs -O quota' time iteself. The
usage is computed freshly and limits are copied from the
aquota.user and aquota.group files as earlier.

Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-07-15 21:12:04 -04:00
Theodore Ts'o 585545e1ee Fix spelling typo's in man pages for tune2fs and mke2fs
Addresses-Debian-Bug: #680114

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-07-14 19:58:06 -04:00
Andreas Dilger 280841e878 build: add generated files to .gitignore
Add a batch of files/wildcards to the list of ignored files, so
that "git status" does not show so many files that should be ignored.
The "*.dSYM" directories are generated during building on MacOS.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-07-14 19:43:39 -04:00
Andreas Dilger 2d2abcc646 e2fsck: rename "bool" variables
Since "bool" is a valid C type, declarations of the form "int bool"
will cause compiler errors if <stdbool.h> is included.  Rename these
variables to avoid this name clash.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-07-14 19:43:20 -04:00
Theodore Ts'o a1c4e15f6a Update debian changelog for 1.42.4-3 2012-06-13 16:07:20 -04:00
Liu Bo fd7042bf00 chattr: add the -C option to the usage message
Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-06-13 16:07:03 -04:00
Theodore Ts'o 6f0eef4d3d Update version.h using the proper abbreviation for June
The configure script uses the date string in version.h to calculate a
version date code.  This only used for tagging prerelease tarball, so
it's not a big deal, but fix this for correctness' sake.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-06-13 16:06:54 -04:00
Theodore Ts'o c1986ecb6f Fix blhc (Build Log Hardening Check) warnings
The Build Log Hardening Check is a debian tool which scans the output
of a package build making sure that the security hardening flags are
used when compiling and linking all of binaries in a package.

For the most part we were passing CFLAGS, CPPFLAGS, and LDFLAGS down
to the compiler and link commands, but there there were one or two
exceptions.  In addition, there where a few places in "make install"
where the V=1 option was not being honored, which triggered blhc
warnings since it couldn't analyze those commands.

The e2fsck.static was the only binary that was not getting built and
packaged with the hardening flags, but I've fixed all of the blhc
warnings so in the future it will be obvious if we regress.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-06-13 16:06:44 -04:00
Theodore Ts'o 8f00911a21 libquota: remove unneeded #include of <sys/quota.h>
The attempted inclusion of sys/quota.h is causing failures in when
building on the hurd and freebsd platforms for Debian.  It's not
necessary any more, so just remove the #include.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-06-12 18:27:26 -04:00
Theodore Ts'o d6a3e41172 Update Release Notes, Changelogs, version.h, etc. for 1.42.4 release
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-06-12 17:30:14 -04:00
Theodore Ts'o 0796e66085 lsattr, chattr: add support for btrfs's No_COW flag
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-06-12 17:30:10 -04:00
Andreas Dilger ff07d436fc tests: allow e2fsck tests to run on OS/X
The "mktemp" program requires a template on OS/X.  Allow the test
TMPFILE to be created in the local /tmp directory for both OS/X
and Linux.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-06-12 13:59:56 -04:00
Theodore Ts'o e130a16e83 tests: add two more tests of orphaned inode handling
Add two tests, f_orphan_indirect_inode, and f_orphan_extents_inode,
which tests the bug fixes in the two previous commits:

e2fsck: update global free blocks/inodes count when truncating orphan inodes
libext2fs: fix block iterator for extents when truncating inodes

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-06-12 01:38:57 -04:00