Commit Graph

1036 Commits (b2f5ce5516a0b6d261876884139043c8e6579f0a)

Author SHA1 Message Date
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 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
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 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 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
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 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 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
Jan Kara 2ae58b6d5c libquota: remove unnecessary definitions
Quite some definitions in quota library are not necessary. Remove them.
Also fold quota.h file into quotaio.h since it didn't contain that many
definitions.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-06-04 12:51:55 -04:00
Theodore Ts'o 9906409e13 dumpe2fs: print journal's s_errno field if it is non-zero
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-05-31 19:18:18 -04:00
Theodore Ts'o 4780e8707e Remove unnecessary escape before tab in man pages
Also fixed a number of other minor nits in the resize2fs and e2image
man pages.

Addresses-Debian-Bug: #674453, #674694

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-05-27 22:03:39 -04:00
Theodore Ts'o ce10c313e6 dumpe2fs: fix 64-bit block numbers on 32-bit systems
Fix bug which caused 64-bit block numbers to be incorrectly printed on
systems with 32-bit longs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-05-14 01:59:32 -04:00
Aditya Kali a99145e6ef tune2fs: fix man page indentation
The indentation in tune2fs man page was wrong towards the
end. Also, there was extra '[' in the SYNOPSIS section.

Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-04-24 14:26:13 -04:00
Theodore Ts'o b24efa2187 Don't assume that the presence of mntent.h means that setmntent() exists
Change autoconf to test for setmntent() and use that to decide whether
to use getmntent() and setmntent(), since some systems don't have
setmntent() but they do have the mntent.h header file.

Also, remove the includes of mntent.h from e2fsck and mke2fs and other
places where it is not needed.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-04-05 15:31:09 -07:00
Theodore Ts'o d47e2af763 fsck: don't include sys/signal.h for portability reasons
It isn't necessary to include sys/signal.h, and it's not available on
all systems.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-04-05 15:21:49 -07:00
Theodore Ts'o 304e11c2c1 mke2fs: don't fail creating the journal if /etc/mtab is missing
The ext2fs_add_journal_inode() function calls
ext2fs_check_mount_point(), which can fail if /etc/mtab is missing.
This causes mke2fs to fail in the middle of the file system format
process; mke2fs calls ext2fs_check_mount_point() already (and has
appropriate fallbacks that calls fails), so add a flag so that mke2fs
can request ext2fs_add_journal_inode() to skip trying to call
e2fsck_check_mount_point().

Addresses-Sourceforge-Bug: #3509398

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-04-05 12:30:02 -07:00
Theodore Ts'o e64e6761aa Fix gcc -Wall nitpicks
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-04-05 12:13:05 -07:00
Theodore Ts'o 608858ff79 mke2fs.conf: allow use of a custom mke2fs.conf file
Rename mke2fs.conf to mke2fs.conf.in, so that the makefile can choose
to use either mke2fs.conf.in or mke2fs.conf.custom.in (if it is
present).  If there is custom configuration file, it's likely that it
is very different from the upstream mke2fs.conf.in, so by having the
separate mke2fs.conf.custom.in file, it minimizes merge conflicts if
the upstream mke2fs.conf file changes.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-03-26 21:36:20 -07:00
David Prévot b75a4ce18c Fix typo and missing .TP in the tune2fs and mke2fs.conf man pages
Addresses-Debian-Bug: #665427

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-03-26 10:45:51 -07:00
Theodore Ts'o 37c8db7b20 mke2fs: add option to use direct I/O (mke2fs -D)
This can be useful when using mke2fs on loaded servers, since
otherwise mke2fs can dirty a huge amount of memory very quickly,
leading to other applications not being happy at all.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-03-22 16:00:49 -04:00
Theodore Ts'o 24dea55494 Use rbtree bitmaps for dumpe2fs, debugfs, and tune2fs
For large file systems, using the rbtree bitmap can save a lot of
memory.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-03-15 16:39:56 -04:00
Theodore Ts'o 87141781aa dumpe2fs: print the expected block group checksum if it is incorrect
This helps to diagnose problems caused by incorrect block group
checksums.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-03-15 12:13:25 -04:00
Phillip Susi 6c9ce8a9b0 e2image: skip uninitialized bitmaps and inode tables
When the block bitmap is uninitialized, skip copying it.
When the inode bitmap is uninitialized, skip copying it,
as well as the inode table.  When there are unused inodes
towards the end of the table, skip those blocks too.

Signed-off-by: Phillip Susi <psusi@ubuntu.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-02-27 00:56:49 -05:00
Theodore Ts'o 30ac1ce7df mke2fs: make sure bg 0's unused inode count field is zero'ed for mke2fs -S
There was a bug/typo in commit ba9e0afc5 which caused the first block
group (bg #0) to not have its unused inode count field to get set to
zero in the case of mke2fs -S.  This caused inodes in the first block
group to not be recoverable via mke2fs -S.  Oops.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-02-27 00:51:39 -05:00
Theodore Ts'o 4a4a44d7b1 badblocks: honor the -s option when in read-only -t mode
Addresses-Debian-Bug: #646629

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-02-17 15:28:21 -05:00
Theodore Ts'o 50a676e944 e2image: attempt to use ftruncate64 to set i_size for raw images
If ftruncate64() exists, try to use it to set i_size.  This isn't
guaranteed to work, per SuSv3, but if it doesn't work, it's guaranteed
to return an error.  So for file systems and/or operating systems that
don't support extending i_size via ftruncate64(), fall back to writing
the trailing null.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-02-17 15:28:21 -05:00
Theodore Ts'o 2b7a30cc52 e2image: fix logic bug which could cause a raw image not to be extended
If the size of the last "hole" in the raw file was an exact multiple
of a megabyte, then we wouldn't write a null at the end of the file in
order to extend the size of the raw image to correspond with the file
system size.  Thanks to Lukas Czerner for suggesting the fix, and
Phillip Susi for pointing out the problem.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-02-17 15:28:20 -05:00
Theodore Ts'o ba9e0afc5a mke2fs: allow file systems w/ uninit_bg to be recovered with mke2fs -S
The command mke2fs -S is used as a last ditch recovery command to
write new superblock and block group descriptors, but _not_ to destroy
the inode table in hopes of recovering from a badly corrupted file
system.  If the uninit_bg feature is enabled, we need to make sure to
clear the unused inodes count field in the block group descriptors or
else e2fsck -fy will leave the file system completely empty.

Thanks to Akira Fujita for reporting this problem.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-02-17 15:28:20 -05:00
Eric Sandeen 237b7b23fe mke2fs: recognize mke4fs program name
We shipped "mke4fs" alongside mke2fs in RHEL5, so that ext4-capable
utilities could be installed without disturbing the venerable e2fsprogs-1.39
shipped in RHEL5 from the beginning.  But it surprised some users that
"mke4fs" created ext2 filesystems by default rather than ext4.
While it was my intent to have the renamed binaries behave exactly
like the stock ones, it seems that there is some precedence for
handling "mkeNfs" in the code, so seems reasonable to add
mke4fs -> ext4 as well.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-02-15 16:18:50 -05:00
Yongqiang Yang 8dbcbe1c4a mke2fs: correct help text for option -G of mke2fs
The option '-G' is used to pass number of groups in a flex_bg, the
previous help text - 'meta-group-size' - could confuse users with
meta_bg.

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-01-23 11:46:43 -05:00
Mike Frysinger 65794cf159 mke2fs: fix -T/-t usage output
There is a slight desync between the mke2fs(8) man page and the mke2fs
help output when it comes to the -t/-T options.  Since the man page is
correct, update the mke2fs usage string to match.

Reported-by: Ben Kohler <bkohler@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-01-09 21:17:57 -05:00
Eric Sandeen 19ef479acf e2undo: cast dptr to blk64_t to retrieve block number
A 32-bit s390 build was failing on a 64-bit s390x host, when
make check failed e2undo tests, like this:

md5sum before mke2fs 922c8a591c882dbdd1a381d18547cfd5
using mke2fs to test e2undo
Overwriting existing filesystem; this can be undone using the command:
    e2undo /tmp/mke2fs-tmp.EM9XjmTA81.e2undo /tmp/tmp.EM9XjmTA81

md5sum after mke2fs cbf32fb6c3db45280ad013f42ac294f1
Replayed transaction of size 32768 at location 0
Replayed transaction of size 32768 at location 0
Replayed transaction of size 32768 at location 0
Replayed transaction of size 32768 at location 0
Replayed transaction of size 0 at location 0
md5sum after e2undo 31b4e14307c5b7ccce5b8d300c2ad5f1

Note the "at location 0" for the block number.

A proper cast in e2undo.c fixes this up.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-11-18 22:14:24 -05:00
Theodore Ts'o 3cebf9c102 debugfs: fix gcc -Wall complaints
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-11-18 22:14:23 -05:00
Theodore Ts'o 5e96c5721d debugfs: add the freefrag command
The freefrag command provides the functionality of e2freefrag on the
currently open file system in debugfs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-11-18 22:12:12 -05:00
Niu cdfaa75901 tune2fs: preserve old limits when turn on quota feature
When turn on quota by tune2fs, if the old quota file exist, the quota
usage should be recomputed but the old limits should be preserved.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-11-14 10:58:28 -05:00
Aditya Kali d678fef0d7 mke2fs: Add extended option to select quota type
mke2fs was creating both user and group quota inodes on enabling
the quota feature. This patch adds the extended option 'quotatype'
that can be used to exclusively specify the quota type that the
user wants to initialize.

 # Ex: Default behavior without extended option creates both
 # user and group quota inodes:
 $ mke2fs -t ext4 -O quota /dev/ram1

 # To enable only user quotas:
 $ mke2fs -t ext4 -O quota -E quotatype=usr /dev/ram1
 # To enable only group quotas:
 $ mke2fs -t ext4 -O quota -E quotatype=grp /dev/ram1

Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-11-14 10:55:54 -05:00
Aditya Kali d7c6f4e6d0 tune2fs: Compute quota usage when turning on the 'quota' feature
When turning on the quota feature, tune2fs would create empty quota inodes and
set their inode numbers in superblock. This required e2fsck to be ran before
using the quota feature. This patch adds adds call to compute_quota() and make
sure that we write correct quota information in the quota files at tune2fs time
itself. This gets rid of the necessity for running e2fsck after setting the
quota feature. Also, tune2fs now does not use existing old quota files
(aquota.user and aquota.group) even if they exist.

Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-11-14 10:55:54 -05:00
Aditya Kali a86d55da8b libquota: cleanup libquota code
This patch cleans up the quota code as suggested in previous reviews. This
includes
* remove BUG_ON()s and 'exit()' calls from library code
* remove calls to malloc/free and instead use ext2fs_get/free_mem functions.
* lib/quota/common.c file in not needed anymore and is removed.
* rename exported functions to start with quota_
  (ex: init_quota_context --> quota_init_context)
* better error handling in quota library

Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-11-14 10:55:54 -05:00
Theodore Ts'o 7becb2065f Make quota support disabled by support
Quota support can be enabled using --enable-quota.  There are still
some buglets that we need to fix up before it can be considered 100%
supported, so let's disable it for the 1.42 release.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-11-14 10:46:30 -05:00
Robin Dong 554bc091b7 e2freefrag: fix "Illegal block number" errors with bigalloc file systems
After:
# mke2fs -O ^has_journal,^resize_inode,^uninit_bg,extent,meta_bg,flex_bg,bigalloc /dev/sda
# e2freefrag /dev/sda

It will report error message like:

 Illegal block number passed to ext2fs_test_block_bitmap #1732133 for block bitmap for /dev/sda
 Illegal block number passed to ext2fs_test_block_bitmap #1732134 for block bitmap for /dev/sda
 Illegal block number passed to ext2fs_test_block_bitmap #1732135 for block bitmap for /dev/sda

One bit in bitmap of bigalloc-ext4 means a cluster not a block,
therefore ext2fs_fast_test_block_bitmap2 should check cluster.

Signed-off-by: Robin Dong <sanbai@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-11-11 21:15:55 -05:00
Theodore Ts'o 0c80c44bd0 libext2fs: ext2fs_[set_]file_acl_block needs to check for 64-bit feature flag
The ext2fs_file_acl_block() and ext2fs_set_file_acl_block() needs to
only check i_file_acl_high if the 64-bit flag is set.  This is needed
because otherwise we will run into problems on Hurd systems which
actually use that field for h_i_mode_high.

This involves an ABI change since we need to pass ext2_filsys to these
functions.  Fortunately these functions were first included in the
1.42-WIP series, so it's OK for us to change them now.  (This is why
we have 1.42-WIP releases.  :-)

Addresses-Sourceforge-Bug: #3379227

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-16 20:46:49 -04:00
Theodore Ts'o 605cf6edaf filefrag: fix infinite loop in filefrag
Commit a00be17e47 was missing a patch hunk needed to prevent
filefrag from looping forever when it is run without the -v option.

Addresses-Debian-Bug: #644792

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-09 18:18:01 -04:00