History log of /external/e2fsprogs/resize/online.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e0ed7404719a9ddd2ba427a80db5365c8bad18c0 20-Mar-2014 JP Abgrall <jpa@google.com> Switch back to 1.42.9 now that there is a fix

Revert "Revert changes that moved from 1.41.14 to 1.42.9"

This reverts commit 65f0aab98b20b5994a726ab90d355248bcddfffd.
/external/e2fsprogs/resize/online.c
65f0aab98b20b5994a726ab90d355248bcddfffd 06-Mar-2014 JP Abgrall <jpa@google.com> Revert changes that moved from 1.41.14 to 1.42.9

Revert "e2fsck: Don't use e2fsck_global_ctx unless HAVE_SIGNAL_H"
commit e80e74c41d85ff93f3d212ba6512340f48054a93.

Revert "Merge remote-tracking branch 'linaro/linaro-1.42.9' into aosp_master"
This reverts commit e97b2b6fc82f840e84dfc631b87f21be44ff2421, reversing
changes made to 7e2fb9d09c245eba70ee008b78007315e9c0f1df.

Revert "Prepare for upstream 1.42.9"
This reverts commit 7e2fb9d09c245eba70ee008b78007315e9c0f1df.

Bug: 13340735
Change-Id: If48b153a95ef5f69f7cdccb00e23524abff3c5a8
Signed-off-by: JP Abgrall <jpa@google.com>
/external/e2fsprogs/resize/online.c
18a1444b4f1e6a0948fd38fa0de382d86cfe04de 31-Dec-2013 Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> Add files that would normally be generated by the e2fsprogs build system

Android doesn't run ./configure and friends, so it has to rely on
pre-populated versions of the autogenerated files.

This is somewhat bogus (e.g. hardcoded little-endian reference in
lib/ext2fs/ext2_types.h) and should at some point be fixed, but it's
what Android has always done, not a regression from the 1.41.14 branch.

Also, don't #include config.h which we don't generate (we pass what it
usually contains as -D parameters from Android.mk) anywhere.

Add a new Android.mk file for the quota library.

Change-Id: I162c6327fee5bd06261d9cdcc34bda10f04a6f21
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
/external/e2fsprogs/resize/online.c
e39082e2e81641eb8021eb6ddc969731537c79a8 12-Dec-2013 Darrick J. Wong <darrick.wong@oracle.com> misc: don't leak file descriptors (on error paths)

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/resize/online.c
5a760d4906c620ef84886378db5eff28bdbd2e96 12-Jan-2013 Theodore Ts'o <tytso@mit.edu> resize2fs: add debugging code to test the old online resizing interfaces

The old online resize ioctl interfaces are still present in the
kernel, and we want to make it easy to test both the kernel code for
those older interfaces, and resize2fs's use of those interfaces in a
relatively easy manner.

To do this, resize2fs will now check the environment variable
RESIZE2FS_KERNEL_VERSION. If the version given is less than 3.3, then
do not try using the new resizing ioctl, but instead use the resizing
ioctls that were used before Linux version 3.3.

If the version given is less than 3.7, then emulate sanity checks
which get done to protect against the fact that the new resizing ioctl
prior to 3.7 did not handle meta_bg resizing. (This was previously
tested via the presence of the RESIZE2FS_NO_META_BG_RESIZE environment
variable. But the new environment variable, RESIZE2FS_KERNEL_VERISON,
is more general.)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
/external/e2fsprogs/resize/online.c
06ca8da745767d139f79fe1a5842be064313bf71 13-Sep-2012 Theodore Ts'o <tytso@mit.edu> 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>
/external/e2fsprogs/resize/online.c
3f6fbf95c0f1c1dc2fc70692ee3e6c49f170df80 20-Nov-2011 Theodore Ts'o <tytso@mit.edu> resize2fs: treat EINVAL to mean the new resize ioctl does not exist

Linux's compat_sys_ioctl() function, which is run when executing a
ioctl using a 32-bit binary on a 64-bit kernel, returns EINVAL when an
inode does not exist. Sigh. See /usr/src/linux/fs/compat_ioctl.c.
This is probably a kernel bug, but work around it for now.

Addresses-Debian-Bug: #644989

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/resize/online.c
cacad7d641ef821ca7983d9dc0304baa9beaf3de 17-Oct-2011 Lukas Czerner <lczerner@redhat.com> resize2fs: Do not fail if EXT4_IOC_RESIZE_FS ioctl doesn't exist

Commit 9f6ba888f027ba added support for new online resize ioctl
EXT4_IOC_RESIZE_FS. It is also trying to avoid failure when this
ioctl() is not supported by the kernel however it is checking wrong
error code (EINVAL).

When the ioctl does not exist, errno is set to ENOTTY, so we should
check for that, rather than EINVAL which means that ioctl arguments
are not valid. So change the code to check for ENOTTY and allow
resize2fs to try to use the old approach. Also add some comments.

Addresses-Red-Hat-Bugzilla: #746284
Addresses-Debian-Bug: #644989

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/resize/online.c
3fcd8fe8acb269598390b35bbf6e4247d10bc64e 09-Oct-2011 Theodore Ts'o <tytso@mit.edu> Fix more spelling errors found by translators and add pluralization

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/resize/online.c
200569608fc6e33f6546c17999f14fb5dbb0b9b5 04-Oct-2011 Theodore Ts'o <tytso@mit.edu> resize2fs: fix on-line resizing

On-line resizing has been broken in the 1.42 series for two reasons:
(a) the call to the new EXT4_IOC_RESIZE_FS ioctl checked for ENOTTY to
indicate that the ioctl does not exist, when in fact EINVAL is what is
returned if the ioctl doesn't exist. (b) resize2fs was passing in a
pointer to a 64-bit value, when the ioctl expected a 32-bit value.
This was OK on little-endian systems, but it wouldn't work at all on
big-endian systems.

Fix both problems.

Addresses-Debian-Bug: #451388

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/resize/online.c
d1154eb460efe588eaed3d439c1caaca149fa362 18-Sep-2011 Theodore Ts'o <tytso@mit.edu> Shorten compile commands run by the build system

The DEFS line in MCONFIG had gotten so long that it exceeded 4k, and
this was starting to cause some tools heartburn. It also made "make
V=1" almost useless, since trying to following the individual commands
run by make was lost in the noise of all of the defines.

So fix this by putting the configure-generated defines in lib/config.h
and the directory pathnames to lib/dirpaths.h.

In addition, clean up some vestigal defines in configure.in and in the
Makefiles to further shorten the cc command lines.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/resize/online.c
98f4547198b369bef7e41eb7ce4a16855726c393 16-Sep-2011 Eric Sandeen <sandeen@redhat.com> e2fsprogs: add ext2fs_group_blocks_count helper

Code to count the number of blocks in the last partial
group is cut and pasted around the e2fsprogs codebase
a few times.

Making this a helper function should improve matters.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/resize/online.c
9f6ba888f027ba4daf57ac61a11a6dce98e42347 14-Sep-2011 Yongqiang Yang <xiaoqiangnk@gmail.com> resize2fs: add support for new in-kernel online resize ioctl

This is needed to support online resizing for > 32-bit file systems

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/resize/online.c
0358c9f9a43ce0ef33f7891ca9f9d67abd3b4853 13-Dec-2010 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
e2fsck/pass4.c
misc/dumpe2fs.c
resize/online.c
1df56561b6f3ed4cffc657538cfde48ebe986626 27-Nov-2010 Theodore Ts'o <tytso@mit.edu> resize2fs: Clarify error explaining on-line shrinking is not supported at all

Addresses-Debian-Bug: #599786

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/resize/online.c
8728d50657e90e0ca39981106ad617d600b9acad 14-Jun-2010 Valerie Aurora Henson <vaurora@redhat.com> resize2fs: Fix up to be 64-bit block number safe

Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/resize/online.c
d7cca6b06f366f998ed43346f9b6fca9e163692f 26-Oct-2009 Valerie Aurora Henson <vaurora@redhat.com> Convert to use block group accessor functions

Convert direct accesses to use the following block group accessor
functions: ext2fs_block_bitmap_loc(), ext2fs_inode_bitmap_loc(),
ext2fs_inode_table_loc(), ext2fs_bg_itable_unused(),
ext2fs_block_bitmap_loc_set(), ext2fs_inode_bitmap_loc_set(),
ext2fs_inode_table_loc_set(), ext2fs_bg_free_inodes_count(),
ext2fs_ext2fs_bg_used_dirs_count(), ext2fs_bg_free_inodes_count_set(),
ext2fs_bg_free_blocks_count_set(), ext2fs_bg_used_dirs_count_set()

Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com>
Signed-off-by: Nick Dokos <nicholas.dokos@hp.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/resize/online.c
4efbac6fed75c29d3d5f1b676b932754653a2ac5 08-Sep-2009 Valerie Aurora Henson <vaurora@redhat.com> Convert uses of super->s_*_blocks_count to ext2fs_*_blocks_count()

Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com>
Signed-off-by: Nick Dokos <nicholas.dokos@hp.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/resize/online.c
c09043f1abb99c73d681e630ee0a4b142e4abf6b 19-Apr-2009 Theodore Ts'o <tytso@mit.edu> resize2fs: Fix data corruption bug when shrinking the inode table for ext4

If we need to shrink the inode table, we need to make sure the inodes
contained in the part of the inode table we are vacating don't get
reused as part of the filesystem shrink operation. This wasn't a
problem with ext3 filesystems, since the inode table was located in
the block group that was going away, so that location was not eligible
for reallocation.

However with ext4 filesystems with flex_bg enabled, it's possible for
a portion of the inode table in the last flex_bg group to be
deallocated, but in a part of the filesystem which could be used as
data blocks. So we must mark those blocks as reserved to prevent
their reuse, and adjust the minimum filesystem size calculation to
assure that we don't shrink a filesystem too small for the resize
operation to succeed.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/resize/online.c
f844b32a09b29e2b122f7e7cb0302c996dbf8276 28-Aug-2008 Theodore Ts'o <tytso@mit.edu> resize2fs: Allow (non-optimal) on-line resizing for flex_bg filesystems

The current method of adding one block group at a time to a mounted
filesystem means it is impossible to accomodate the flex_bg allocation
method of placing the metadata together in a single block group. For
now we "fix" this issue by using the traditional layout for new block
groups, where each block group is self-contained and contains its own
bitmap blocks and inode tables. This means we don't get the layout
advantages of flex_bg in the new block groups, but at least it allows
on-line resizing to function.

Long term, we will need to create a new ioctl which does much more of
the resizing work in the kernel.

We also fix a bug in the ext3/ext4 ioctl fallback code so we stop
trying the ext3 ioctl for every single block group when resizing an
ext4 filesystem.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/resize/online.c
efc6f628e15de95bcd13e4f0ee223cb42115d520 28-Aug-2008 Theodore Ts'o <tytso@mit.edu> Remove trailing whitespace for the entire source tree

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/resize/online.c
df9c01b1449ccbaa9283486f0f6a50085043036b 17-Jul-2008 Theodore Ts'o <tytso@mit.edu> Fix missing space typo's in partinfo and resize2fs

These were caused by multi-line strings missing a space at the line
break. Thanks to translator Phillipp Thomas for noticing these typo's.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/resize/online.c
71ff129e9f5c942ce4d2eb20e269100d15c1a6ae 18-Jun-2008 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint'

Conflicts:

README
resize/online.c
version.h
9ff8ece57d46a9419fc60057547810824881bb45 18-Jun-2008 Theodore Ts'o <tytso@mit.edu> mke2fs, tune2fs, resize2fs: Use floating point to calculate percentages

When calculating the number reserved blocks, use floating point for
better accuracy, since for big filesystems it really makes a
difference. In addition, mke2fs and tune2fs accepts a floating point
number from the user, so they should provide that level of accuracy.

Addresses-Debian-Bug: #452639

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/resize/online.c
5c4f8d674845095050f94ea95f3c73072cbe34b5 07-Jun-2008 Theodore Ts'o <tytso@mit.edu> resize2fs: Add support to use the ext4 online resize ioctl's

First try the ext3 ioctl, but if we get an error, try using the ext4
ioctl.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/resize/online.c
3e41608aacc26fc8f4bd753600976afe4c125c58 14-Aug-2007 Samuel Thibault <samuel.thibault@ens-lyon.org> Fix Debian rules files to support building non-Linux archs

Addresses-Debian-Bug: #437720

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/resize/online.c
de8f3a76218255e443ba57dec5d74850180fa75d 25-May-2007 Andreas Dilger <adilger@clusterfs.com> Fix gcc -Wall warnings, especially on 64-bit systems

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/resize/online.c
d255b22ef02f7976e68b1ad8201e303a8dfd73b3 02-Oct-2006 Theodore Ts'o <tytso@mit.edu> Fix resize2fs error msgs if the fs or kernel doesn't support on-line resize

Check to make sure the filesystem has a resize inode if it is needed to
grow the filesystem. Print the correct error message if the kernel
returns an ENOTTY error to the group extend ioctl

Addresses Debian Bug: #380548

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/resize/online.c
d1b4b85c3a201705c5d3d2916c7a9ca00a04e44c 12-Sep-2006 Eric Sandeen <esandeen@redhat.com> Fix more rounding overflows for filesystems that have 2**32-1 blocks

Signed-off-by: Eric Sandeen <esandeen@redhat.com>
/external/e2fsprogs/resize/online.c
d0ff90d5202428583c78a60c3042e7b60d88bc45 12-Sep-2006 Eric Sandeen <esandeen@redhat.com> Fix signed vs unsigned printf format strings for block and inode numbers

There were still some %d's lurking when we print blocks & inodes; also
many of the counters in the e2fsck_struct were signed, and probably
need to be unsigned to avoid overflows.

Signed-off-by: Eric Sandeen <esandeen@redhat.com>
/external/e2fsprogs/resize/online.c
a8862d9e90d0d94761ba28dbbf9674308fd7d7c0 30-Aug-2006 Theodore Ts'o <tytso@mit.edu> Fix potential 2**32-1 overflow by using e2p_percent()

Add a new functiom, e2p_percent(), which correct calculates the percentage
of a number based on a given percentage, without worrying about overflow
issues. This is used where we calculate the number of reserved blocks using
a percentage of the total number of blocks in a filesystem.

Based on patches from Eric Sandeen, but generalized to use this new function.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Eric Sandeen <esandeen@redhat.com>
/external/e2fsprogs/resize/online.c
bf69235ad0073c80386b70caba0e1b58e5f85697 18-Mar-2006 Theodore Ts'o <tytso@mit.edu> Add support for on-line resizing to resize2fs

If the filesystem is mounted, attempt to use the on-line resizing
ioctls to resize the filesystem.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/resize/online.c