History log of /external/e2fsprogs/lib/ext2fs/closefs.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/lib/ext2fs/closefs.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/lib/ext2fs/closefs.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/lib/ext2fs/closefs.c
11d1116a7c0b833af317249d12025413fecbcd70 23-Dec-2013 Andreas Dilger <adilger@dilger.ca> e2fsck: verify s_desc_size is power-of-two value

Add a LOG2_CHECK mode for check_super_value() so that it is easy
to verify values that are supposed to be power-of-two values
(s_desc_size and s_inode_size so far). In ext2fs_check_desc()
also check for a power-of-two s_desc_size.

Print out s_desc_size in debugfs "stats" and dumpe2fs output, if
it is non-zero.

It turns out that the s_desc_size validation in check_super_block()
is not currently used by e2fsck, because the group descriptors are
verified earlier by ext2fs_check_desc(), and even without an
explicit check of s_desc_size the group descriptors fail to align
correctly on disk. It makes sense to keep the check_super_block()
regardless, in case the code changes at some point in the future.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.c
4dbfd79d1458ce1259b951377e341aeb6197f8c1 07-Oct-2013 Darrick J. Wong <darrick.wong@oracle.com> e2fsprogs: fix blk_t <- blk64_t assignment mismatches

Fix all the places where we should be using a blk64_t instead of a
blk_t. These fixes are more severe because 64bit values could be
truncated silently.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.c
4718395120454ad7c193c76258ef5359f2ab3f2f 16-Jun-2013 Theodore Ts'o <tytso@mit.edu> libext2fs: optimize ext2fs_bg_has_super()

Reduce the CPU time needed when checking whether a block group has a
sparse superblock.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.c
0f5eba7501f467f757792ee449d16c9259b994fd 24-Sep-2011 Andreas Dilger <adilger@whamcloud.com> ext2fs: add multi-mount protection (INCOMPAT_MMP)

Multi-mount protection is feature that allows mke2fs, e2fsck, and
others to detect if the filesystem is mounted on a remote node (on
SAN disks) and avoid corrupting the filesystem. For e2fsprogs this
means that it checks the MMP block to see if the filesystem is in use,
and marks the filesystem busy while e2fsck is running on the system.

This is useful on SAN disks that are shared between high-availability
servers, or accessible by multiple nodes that aren't in HA pairs. MMP
isn't intended to serve as a primary HA exclusion mechanism, but as a
failsafe to protect against user, software, or hardware errors.

There is no requirement that e2fsck updates the MMP block at regular
intervals, but e2fsck does this occasionally to provide useful
information to the sysadmin in case of a detected conflict.

For the kernel (since Linux 3.0) MMP adds a "heartbeat" mechanism to
periodically write to disk (every few seconds by default) to notify
other nodes that the filesystem is still in use and unsafe to modify.

Originally-by: Kalpak Shah <kalpak@clusterfs.com>

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.c
9d9a53e651fa877eb4f9df0bfd97fbcc5f514293 24-Sep-2011 Richard W.M. Jones <rjones@redhat.com> libext2fs: add flag to ext2fs_flush() and ext2fs_close() to avoid fsync

This adds new APIs: ext2fs_flush2 and ext2fs_close2 which take an
extra 'int flags' parameter.

This allows us to pass in an EXT2_FLAG_FLUSH_NO_SYNC flag which avoids
fsync'ing the filesystem when closing it. For the case we have in
mind where we are just constructing a throwaway ext2 filesystem in a
file in order to boot a VM, this saves over 5 seconds during the boot
process and avoids many unnecessary disk writes.

Existing code using ext2fs_flush and ext2fs_close remains unaffected
by this change.

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.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/lib/ext2fs/closefs.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/lib/ext2fs/closefs.c
25567a7b0fa98b390fd1ff0d4702b29c23a75bbb 05-Jul-2011 Theodore Ts'o <tytso@mit.edu> e2fsck, libext2fs: support for bigalloc file systems with a blocksize of 1024

Filesystems with a blocksize of 1024 have the superblock starting at
block #1. However, the first data block in the superblock is 0 to
simplify the cluster calculations. So we must compensate for this in
a number of places, mostly in the ext2fs library, but also in e2fsck.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.c
9d92a201deec7bbb1911e6e5ee98abf3c83882d4 25-Sep-2010 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
configure
configure.in
lib/ext2fs/ext2fs.h
misc/mke2fs.c
7f1a1fbf850f6b73b5c9c82365f01029fb250a1c 24-Sep-2010 Theodore Ts'o <tytso@mit.edu> ext2fs: Add Direct I/O support to the ext2fs library

This adds the basic support for Direct I/O to unix_io.c, and adds a
new flag EXT_FLAG_DIRECT_IO which can be passed to ext2fs_open() or
ext2fs_open2() to request Direct I/O support.

Note that device mapper devices in Linux don't support Direct I/O, and
in some circumstances using Direct I/O can actually make performance
*worse*!

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.c
97d26ce9e3589e9f5fa17014467a9730a884d158 07-Jun-2010 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
e2fsck/journal.c
e2fsck/pass1.c
e2fsck/pass2.c
misc/mke2fs.c
543547a52a20cb7e69d74921b2f691078fd55d83 18-May-2010 Theodore Ts'o <tytso@mit.edu> libe2p, libext2fs: Update file copyright permission states to match COPYING

The top-level COPYING file states that the e2p and ext2fs libraries
are available under the LGPLv2. The files were incorrectly labelled.
Alex Thomas/Luster has been consulted wrt to the ext3_extents.h file;
the rest of the files were primarily authored by Theodore Ts'o.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.c
1d18a55c528adf997d8edee60bd8003c822c55e8 15-Feb-2010 Theodore Ts'o <tytso@mit.edu> libext2fs: Fix byte swapping bugs

The 64-bit patches broke compiles on big endian systems. In addition
the block group checksum test was failing, due to bugs in both the
test case and the checksum code itself. This commit addresses these
problems.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.c
cf828f1a72ec1eb0c1e819307137879447c909b7 26-Oct-2009 Theodore Ts'o <tytso@mit.edu> libext2fs: Byte-swap 64-bit block group descriptors

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.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/lib/ext2fs/closefs.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/lib/ext2fs/closefs.c
95fd65bb7fcf84e8d1e207f84b9d5a9f99626a38 24-Aug-2009 Valerie Aurora Henson <vaurora@redhat.com> libext2fs: create generic numeric progress meters and use them

With 64-bit file systems, mke2fs can take a long time to do things
other than write inode tables. I exported the mke2fs numeric progress
meter and used it for allocating group tables and the final file
system flush.

Signed-off-by: Valerie Aurora (Henson) <vaurora@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.c
24a117abd0340d247befbf7687ffb70547fdf218 08-Sep-2009 Valerie Aurora Henson <vaurora@redhat.com> Convert to use io_channel_read_blk64() and io_channel_write_blk64()

Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.c
20f2ccb3262b11d3a7b892cb9a11ea1c8c2ddd3b 12-Jul-2009 Jose R. Santos <jrs@us.ibm.com> Use new ext2fs_super_and_bgd_loc2 call in libext2fs

The new ext2fs_super_and_bgd_loc2() function has some changes aside
from just blk64_t support. Lets make sure that the interfaces are
sane by adding libext2fs support early to get the new API tested here.

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.c
71300f35de9b7fd0ab4252500ec5a4da1d9a1424 01-Jun-2009 Jose R. Santos <jrs@us.ibm.com> Add 64-bit closefs interface

Add new ext2fs_super_and_bgd_loc2() that returns blk64_t pointers.
The function now returns the number of blocks used by super block and
group descriptors since with flex_bg, it can no longer be assumed that
bitmaps and inode tables still resided within the block group.

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.c
6d67ee305cdfff7131a4105551409d1603dba81d 03-May-2009 Theodore Ts'o <tytso@mit.edu> Avoid unneeded updates of block group descriptors in ext2fs_closefs()

If the superblock is clean, and we only need to update
s_kbytes_written, then we only need to update the superblock.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.c
b7c5b4030870b31d73019d9d9ec55d550772590b 06-Mar-2009 Theodore Ts'o <tytso@mit.edu> Add support for a new superblock field: s_kbytes_written

This field tracks the lifetime amount of writes to the filesystem. It
will be updated by the kernel as well as by e2fsprogs programs which
write to the filesystem.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.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/lib/ext2fs/closefs.c
4a568505ab904d39d9553e9c1d1c565615a5c6ca 21-Apr-2008 Theodore Ts'o <tytso@mit.edu> Add comments documenting ext2fs_[reserve_]super_and_bgd_loc()

Add an explanation of exactly what ext2fs_super_and_bgd_loc() and
ext2fs_reserve_super_and_bgd_loc() do, and more importantly, exactly
what they return. Note that most callers should *not* rely on the
return value since it's rarely useful, especially once the flex_bg
feature is enabled and inode table and allocation bitmap blocks may
not be in the block group.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.c
2d328bb76d2d63bdfdba923b54c28bd686bd8fec 18-Mar-2008 Theodore Ts'o <tytso@mit.edu> Fix miscellaneous gcc -Wall warnings

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.c
b689b8dd14e69c652d2c8211bdef3effe81cfd65 17-Dec-2007 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:

lib/ext2fs/closefs.c
9a083af71a2388ae47252f8af2b796f9055f4af7 16-Dec-2007 Theodore Ts'o <tytso@mit.edu> ext2fs_flushfs: Remove the NEEDS_RECOVERY from the backup superblocks

Now that e2fsck tries to backup the primary superblock to the backups
when the feature sets ar different, it's important when tune2fs writes
out a changed superblock, that we filter out the
EXT3_FEATURE_INCOMPAT_RECOVER feature to the backup superblocks, since
it will be removed from the primary superblock either when the
filesystem is mounted uncleanly or when journal is replayed.

Addresses-Debian-Bug: #454926

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.c
e6a4571eec5ce0e75fb8a5a41c30bf0e68d90efe 09-Dec-2007 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:

lib/ext2fs/closefs.c
ee01079a17bfecd17292ccd60058056fb3a8ba6c 10-Nov-2007 Theodore Ts'o <tytso@mit.edu> libext2fs: Add checks to prevent integer overflows passed to malloc()

This addresses a potential security vulnerability where an untrusted
filesystem can be corrupted in such a way that a program using
libext2fs will allocate a buffer which is far too small. This can
lead to either a crash or potentially a heap-based buffer overflow
crash. No known exploits exist, but main concern is where an
untrusted user who possesses privileged access in a guest Xen
environment could corrupt a filesystem which is then accessed by the
pygrub program, running as root in the dom0 host environment, thus
allowing the untrusted user to gain privileged access in the host OS.

Thanks to the McAfee AVERT Research group for reporting this issue.

Addresses CVE-2007-5497.

Signed-off-by: Rafal Wojtczuk <rafal_wojtczuk@mcafee.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.c
f2de1d38d0819b17895977fabc52d81d0ea6ec00 30-Aug-2007 Valerie Clement <valerie.clement@bull.net> libext2fs: Add EXT2_DESC_SIZE and EXT2_DESC_PER_BLOCK macros

Add macros to support variable-length group descriptors for ext4.

Signed-off-by: Valerie Clement <valerie.clement@bull.net>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.c
5d38ef1d049bf56d1c1e88b8b4d287c0f9470e61 30-Aug-2007 Valerie Clement <valerie.clement@bull.net> libext2fs: cleanup usage of unsigned int or __u32 and replace it with blk_t

Signed-off-by: Valerie Clement <valerie.clement@bull.net>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.c
3bfca9a499af9f72a2b22ff0d92bcc8686904e8e 30-Aug-2007 Valerie Clement <valerie.clement@bull.net> libext2fs: use ext2fs_group_first_block() instead of open-coded equivalent

Use ext2fs_group_first_block() instead of the open-coded equivalent in
ext2fs_super_and_bgd_loc() and ext2fs_descriptor_block_loc().

Signed-off-by: Valerie Clement <valerie.clement@bull.net>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.c
126a291c768b523bc228b276d3bea82675a86d09 11-Aug-2007 Theodore Ts'o <tytso@mit.edu> Clean up libext2fs by byte swapping iff WORDS_BIGENDIAN

We don't need byte swapping to be a run-time option; it can just be a
compile-time option instead.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.c
62c6d1403ea00dd72890862c761a41baa10a7ad4 12-Sep-2006 Eric Sandeen <esandeen@redhat.com> Remove unused variables

Signed-off-by: Eric Sandeen <esandeen@redhat.com>
/external/e2fsprogs/lib/ext2fs/closefs.c
0d961040fe9ad927254b5a0e1a4de7bedadd8579 13-Nov-2005 Theodore Ts'o <tytso@mit.edu> Fix writing external journals on big-endian machines

Fix a bug when writing an external journal device on an big
endian machine (such as a S/390), where when the number of
block groups is zero, we never end up writing out the
primary superblock at all.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.c
32138187f08d1f1dc03feb269f987982db76f3db 25-Sep-2005 Theodore Ts'o <tytso@mit.edu> Add fs->now to override time(0) in libext2fs

If fs->now is non-zero, use that as the time instead of the system
time when setting various filesystem fields (last modified time, last
write time, etc.)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/closefs.c
1b4cd9c7464d5bd0f5b416c7303bcc827e312473 16-Dec-2004 Theodore Ts'o <tytso@mit.edu> sparse.c (ext2fs_list_backups, ext2fs_bg_has_super),
res_gdt.c (list_backups), closefs.c (ext2fs_bg_has_super),
ext2fs.h: Move ext2fs_list_backups() to res_gdt.c, and
ext2fs_bg_has_super() back to closefs.c. There's no
reason for the new file, since list_backups() isn't being
used by any other functions, and can be made static, and
all users of the ext2fs filesystem will have to call
ext2fs_close() anyway.
/external/e2fsprogs/lib/ext2fs/closefs.c
d323f8fb369089b97d6f3bf0f8d64ceeab0b10f5 15-Dec-2004 Theodore Ts'o <tytso@mit.edu> Add support for on-line resizing ala the resize inode. This patch
is taken from Fedora Core 3's e2fsprogs 1.35-11.2.src.rpm's
e2fsprogs-resize.patch.
/external/e2fsprogs/lib/ext2fs/closefs.c
a63d12678369f4ab0edf8fc5741825c035e78bf9 27-May-2004 Theodore Ts'o <tytso@mit.edu> closefs.c (ext2fs_flush): Make sure the master superblock is
written last, and only after other I/O has been flushed to
disk. Thanks to Junfeng Yang from the Stanford
Metacompilation group for pointing a potential ordering
constraint problem if we don't write things out in the
right order.
/external/e2fsprogs/lib/ext2fs/closefs.c
544349270e4c74a6feb971123884a8cf5052a7ee 07-Dec-2003 Theodore Ts'o <tytso@mit.edu> Fix gcc -Wall nitpicks
/external/e2fsprogs/lib/ext2fs/closefs.c
ef344e13d2125e9dae3764b98f9fe3a170cd79e2 21-Nov-2003 Theodore Ts'o <tytso@mit.edu> Centeralize calculation of which blocks are reserved/used for
the superblock and block group descriptors into two functions:
ext2fs_reserve_super_and_bgd, found in lib/ext2fs/alloc_sb.c, and
ext2fs_super_and_bgd_lock, found in lib/ext2fs/close.c.

Change e2fsck/pass1.c (mark_table_blocks), lib/ext2fs/closefs.c
(ext2fs_flush), lib/ext2fs/initialize.c (ext2fs_initialize),
and misc/dumpe2fs.c (list_desc) to use these functions.

e2fsck/ChangeLog
pass1.c (mark_table_blocks): Use the new function
ext2fs_reserve_super_and_bgd to calculate the blocks to be
reserved.

lib/ext2fs/ChangeLog
closefs.c (ext2fs_super_and_bgd_loc): New function which
centralizes the calculation of the superblock and block
group descriptors.
(ext2fs_flush): Use ext2fs_super_and_bgd_lock to figure
out where to write the superblock and block group
descriptors.

alloc_sb.c (ext2fs_reserve_super_and_bgd): New function which
reserves space in the block bitmap using
ext2fs_super_and_bgd_loc.

initialize.c (ext2fs_initialize): Use
ext2fs_reserve_super_and_bgd to initialize the block bitmap.

misc/ChangeLog
dumpe2fs.c (list_desc): Use ext2fs_super_and_bgd_loc to
determine the locations of the superblock and block group
descriptors.
/external/e2fsprogs/lib/ext2fs/closefs.c
c4e3d3f374b409500e3dd05c0b0eca6ac98a6b4e 01-Aug-2003 Theodore Ts'o <tytso@mit.edu> ext2fs_getmem(), ext2fs_free_mem(), and ext2fs_resize_mem()
all now take a 'void *' instead of a 'void **' in order to
avoid pointer aliasing problems with GCC 3.x.
/external/e2fsprogs/lib/ext2fs/closefs.c
bfd418832d46da1767517b40a7857de449ea03fe 08-Nov-2002 Theodore Ts'o <tytso@mit.edu> closefs.c (write_bgdesc, ext2fs_flush): Fix bug in meta_bg
support when the MASTER_SB_ONLY flag is set. Some of
the descriptor blocks that should have been written out
were getting skipped.
/external/e2fsprogs/lib/ext2fs/closefs.c
76dd5e5c2842fb1a7b858aad3e68b5e9c16890c9 31-Oct-2002 Theodore Ts'o <tytso@mit.edu> Add support for the meta_bg feature flag to the resize2fs program.

Fix bug in meta_bg support in mke2fs, e2fsck, and dumpe2fs; we were
incorrectly reserving the legacy block groups desriptor blocks.
/external/e2fsprogs/lib/ext2fs/closefs.c
c046ac7f2e4c53e20cf1e909bbe511f91074b396 20-Oct-2002 Theodore Ts'o <tytso@mit.edu> Add support for the meta_blockgroup filesystem format.
/external/e2fsprogs/lib/ext2fs/closefs.c
3c6b8977d44c66f0a50dd77c18a78b57b1022f8c 10-Jul-2001 Theodore Ts'o <tytso@mit.edu> Speed up journal recovery in userspace by avoiding a pointless
unconditional ext2_flush() call. Also made ext2_flush() more
efficient when the superblock is modified after the filesystem has
been flushed, and make it clear the superblock dirty flag
after doing the superblock/block group descriptor flush.
/external/e2fsprogs/lib/ext2fs/closefs.c
5df55d7f847e29d23227592a0bb23daad1a61500 11-Jun-2001 Theodore Ts'o <tytso@mit.edu> ChangeLog, Makefile.in, swapfs.c, unix.c:
Makefile.in: Add message.c and swapfs.c to the list of source files to
build the make depend.
swapfs.c, unix.c: Only support the -s and -S options to e2fsck if
ENABLE_SWAPFS is defined.
Many files:
ext2fs.h, bitops.h, block.c, bmap.c, closefs.c, dirblock.c, inode.c,
native.c, openfs.c, rw_bitmaps.c, swapfs.c: Only include the
byte-swapping logic if ENABLE_SWAPFS is turned on or if we're on a
big-endian machine.
initialize.c (ext2fs_initialize):Use WORDS_BIGENDIAN directly to set
EXT2_FLAG_SWAP_BYTES, instead of using ext2fs_native_flag.
native.c (ext2fs_native_flag): Use WORDS_BIGENDIAN provided by
autoconf to determine whether or not return EXT2_FLAG_SWAP_BYTES.
/external/e2fsprogs/lib/ext2fs/closefs.c
9f8046fc6dfc13eee2f5c363214e60b533872cac 14-May-2001 Theodore Ts'o <tytso@mit.edu> Many files:
alloc.c, alloc_tables.c, badblocks.c, bb_compat.c, bb_inode.c,
bitmaps.c, bitops.c, block.c, bmap.c, bmove.c, brel_ma.c,
check_desc.c, closefs.c, cmp_bitmaps.c, dblist.c, dblist_dir.c,
dir_iterate.c, dirblock.c, dupfs.c, expanddir.c, ext2_fs.h, fileio.c,
finddev.c, flushb.c, freefs.c, get_pathname.c, getsize.c, icount.c,
imager.c, initialize.c, inline.c, inode.c, irel_ma.c, ismounted.c,
link.c, lookup.c, mkdir.c, mkjournal.c, namei.c, native.c, newdir.c,
nt_io.c, openfs.c, read_bb.c, read_bb_file.c, rs_bitmap.c,
rw_bitmaps.c, swapfs.c, test_io.c, tst_badblocks.c, tst_byteswap.c,
tst_getsize.c, tst_iscan.c, unix_io.c, unlink.c, valid_blk.c,
version.c, write_bb_file.c, ext2_fs.h: Moved file from include/linux.
Adjust all files in this directroy to include this file.
/external/e2fsprogs/lib/ext2fs/closefs.c
8077994116824ae55d4b8f9a26971a7d11e089bf 14-Jan-2001 Theodore Ts'o <tytso@mit.edu> ChangeLog, closefs.c:
closefs.c (ext2fs_flush): Don't write out anything beyond the primary
superblock if EXT2_INCOMPAT_JOURNAL_DEV is listed.
/external/e2fsprogs/lib/ext2fs/closefs.c
43ec8734f2ecd0a345e831f45fd3dfb077426811 03-Jan-2001 Theodore Ts'o <tytso@mit.edu> ChangeLog, ext2fs.h, ismounted.c:
ismounted.c: add ext2fs_check_mount_point() function, which will
optionally return the mount point of a device if mounted
ChangeLog, closefs.c, ext2fs.h:
ext2fs.h, closefs.c (ext2fs_flush): Add new flag,
EXT2_FLAG_SUPER_ONLY, which the close routines to only update the
superblock, and not the group descriptors.
/external/e2fsprogs/lib/ext2fs/closefs.c
e5b38a5fafe4807b54d90a2e70bddf4b41b1695b 01-Jan-2001 Theodore Ts'o <tytso@mit.edu> Many files:
ext2fs.h: Remove definition of ext2fs_sb. Note: this may break source
(but not binary) compatibility of some users of the ext2 library.
They should just simply do a global search and replace of struct
ext2fs_sb with struct ext2_super_block, and use their own private copy
of ext2_fs.h if they aren't already.
closefs.c, initialize.c, link.c, newdir.c, openfs.c, swapfs.c: Replace
use of ext2fs_sb with ext2_super_block.
ChangeLog, main.c:
main.c (main): Replace use of struct ext2fs_sb with struct ext2_super_block.
/external/e2fsprogs/lib/ext2fs/closefs.c
a917d1ccf49605b3009f4e7225f00b81fc16100b 13-Dec-2000 Theodore Ts'o <tytso@mit.edu> ChangeLog, closefs.c, ext2fs.h, jump.funcs, super.c:
Rename _ext2fs_update_fs_dynamic_rev to _ext2fs_update_dynamic_rev
/external/e2fsprogs/lib/ext2fs/closefs.c
3fe973b3068f68bb9d3ea6ba309dc7d2df30301f 13-Dec-2000 Theodore Ts'o <tytso@mit.edu> ChangeLog, closefs.c, ext2fs.h, jump.funcs:
closefs.c (ext2fs_update_fs_dynamic_rev): New function suggested by
Andreas Dilger to update the filesystem revision to EXT2_DYNAMIC_REV.
/external/e2fsprogs/lib/ext2fs/closefs.c
c180ac86533bcbfb1560bd4aa01464785a760f70 26-Oct-2000 Theodore Ts'o <tytso@mit.edu> Many files:
ext2_io.h (io_channel_write_byte): Add new interface to allow callers
to write specific byte ranges. This is an optional interface, which
not all IO channels may implement.
unix_io.c (unix_write_byte): test_io.c (test_write_byte): Add
implementation of the write_byte function.
closefs.c (write_primary_superblock, ext2fs_flush): Add a new function
which writes the primary superblock. If the IO channel supports
writing raw bytes directly, only fields which were modified are
written to the disk. This makes it safe(r) to use utilities like
tune2fs on a mounted filesystem.
freefs.c (ext2fs_free): Free the original superblock if it is available.
openfs.c (ext2fs_open): Store a copy of the original superblock when
opening it.
ext2fs.h: Add a field to store the original superblock in the ext2
context structure.
/external/e2fsprogs/lib/ext2fs/closefs.c
30c42619e83867727f84ee72f411e93bb40e900a 30-Jun-1998 Theodore Ts'o <tytso@mit.edu> ChangeLog, closefs.c, ext2fs.h:
closefs.c (ext2fs_flush): Update the s_block_group_nr field as
appropriate for all of the block group copies, so that it's clear
where the beginning of the filesystem is on the disk. (For when the
partition table gets scrod.)
ext2fs.h: Change the name of the feature from
EXT2_FEATURE_INCOMPAT_DIRNAME_SIZE to EXT2_FEATURE_INCOMPAT_FILESIZE
(to match with the kernel).
/external/e2fsprogs/lib/ext2fs/closefs.c
b5abe6fac9c9e7caf4710501d1657d30e4857ef6 19-Jan-1998 Theodore Ts'o <tytso@mit.edu> Many files:
inode.c (ext2fs_open_inode_scan): Initialize the group variables
so that we don't need to call get_next_blockgroup() the first
time around. Saves a bit of time, and prevents us from
needing to assign -1 to current_group (which is an unsigned
value).
icount.c (insert_icount_el): Cast the estimated number of inodes
from a float to an ino_t.
alloc.c, alloc_tables.c, badlbocks.c, bb_compat.c, bb_inode.c,
bitmaps.c, bitops.c, block.c, bmap.c, bmove.c, brel_ma.c,
check_desc.c, closefs.c, cmp_bitmaps.c, dblist.c,
dblist_dir.c, dir_iterate.c, dirblock.c, dupfs.c, expanddir.c,
ext2fs.h, fileio.c, freefs.c, get_pathname.c, getsize.c,
icount.c, initialize.c, inline.c, inode.c, irel_ma.c,
ismounted.c, link.c, lookup.c, mkdir.c, namei.c, native.c,
newdir.c, openfs.c, read_bb.c, read_bb_file.c, rs_bitmap.c,
rw_bitmaps.c, swapfs.c, test_io.c, tst_badblocks.c,
tst_getsize.c, tst_iscan.c, unix_io.c, unlink.c, valid_blk.c,
version.c: If EXT2_FLAT_INCLUDES is defined, then assume all
of the ext2-specific header files are in a flat directory.
block.c, bmove.c, dirblock.c, fileio.c: Explicitly cast
all assignments from void * to be compatible with C++.
closefs.c (ext2fs_flush): Add a call to io_channel_flush() to
make sure the contents of the disk are flushed to disk.
dblist.c (ext2fs_add_dir_block): Change new to be new_entry to
avoid C++ namespace clash.
bitmaps.c (ext2fs_copy_bitmap): Change new to be new_map to
avoid C++ namespace clash.
ext2fs.h, bb_inode.c, block.c, bmove.c, brel.h, brel_ma.c,
irel.h, irel_ma.c, dblist.c, dblist_dir.c, dir_iterate.c,
ext2fsP.h, expanddir.c, get_pathname.c, inode.c, link.c,
unlink.c: Change private to be priv_data (to avoid C++
namespace clash)
/external/e2fsprogs/lib/ext2fs/closefs.c
5be8dc2143c7b3b21a9b8fb56797dd855ee87560 01-Dec-1997 Theodore Ts'o <tytso@mit.edu> Many files:
dblist.c (ext2fs_get_num_dirs): Make ext2fs_get_num_dirs more paranoid
about validating the directory counts from the block group
information.
all files: Don't include stdlib.h anymore; include it in ext2_fs.h,
since that file requires stdlib.h
ChangeLog, Makefile.in, dirinfo.c:
dirinfo.c (e2fsck_add_dir_info): Use ext2fs_get_num_dirs instead of
e2fsck_get_num_dirs, which has been removed.
Makefile.in (PROGS): Remove @EXTRA_PROGS@, since we don't want to
compile and install flushb.
ChangeLog, configure.in:
Remove @EXTRA_PROGS@, since we aren't using it in 2fsck/Makefile.in anymore
ChangeLog, Makefile.in:
Install debugfs in /sbin, instead of /usr/sbin.
libext2fs.texinfo:
Update version string to be 1.12
Makefile.in:
Fix bug in find script which made the exclusion list, where a '-' was
missing from an -name option.
/external/e2fsprogs/lib/ext2fs/closefs.c
1f0b6c1f895d189fea6999d0c07a7fee936a4baa 31-Oct-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Rename new error codes to have _ET_ in them for consistency.
/external/e2fsprogs/lib/ext2fs/closefs.c
7b4e4534f9361b21d3fafdd88a58f133decee38c 26-Oct-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Added definition of ext2fs_get_mem, ext2fs_free_mem, and
ext2fs_resize_mem in ext2fs.h, and changed all library routines to use
these wrapper functions.
/external/e2fsprogs/lib/ext2fs/closefs.c
c555aebde40afdc0d15d674f2c81c0e05cfded3f 25-Oct-1997 Theodore Ts'o <tytso@mit.edu> Many files:
alloc.c (ext2fs_alloc_block): New function which allocates a
block and updates the filesystem accounting records
appropriately.
ext2_err.et.in: Added new error codes: EXT2_NO_MEMORY,
EXT2_INVALID_ARGUMENT, EXT2_BLOCK_ALLOC_FAIL, EXT2_INODE_ALLOC_FAIL,
EXT2_NOT_DIRECTORY
Change various library files to use these functions instead of EINVAL,
ENOENT, etc.
ChangeLog, pass1.c, pass3.c:
pass3.c (get_lost_and_found): Check error return of
EXT2_FILE_NOT_FOUND instead of ENOTDIR
pass1.c (pass1_check_directory): Return EXT2_NO_DIRECTORY instead of
ENOTDIR
expect.icount:
Change expected error string to be "Invalid argument passed to ext2 library"
instead of just "Invalid argument"
/external/e2fsprogs/lib/ext2fs/closefs.c
3cb6c5021d722e17b7105d1bc090880671f6fc6d 11-Aug-1997 Theodore Ts'o <tytso@mit.edu> Many files:
dosio.c: New file to do DOS/BIOS disk accesses.
namei.c (open_namei): Make pathlen be of type size_t.
llseek.c: Always #include stdlib.h since it's need to define
size_t.
io.h: Use errcode_t for magic numbers.
icount.c (get_icount_el), dupfs.c (ext2fs_dup_handle), dblist.c
(dir_block_cmp): Use size_t where appropriate.
read_bb.c (ext2fs_read_bb_inode), cmp_bitmaps.c
(ext2fs_compare_inode_bitmap): Use blk_t, ino_t and size_t
where appropriate.
closefs.c (ext2fs_flush): Use dgrp_t instead of int where
appropriate.
openfs.c (ext2fs_open), check_desc.c (ext2fs_check_desc): Use blk_t
instead of int where appropriate.
rw_bitmaps.c (read_bitmaps), irel_ma.c, inode.c (ext2fs_write_inode),
initialize.c (ext2fs_initialize): brel_ma.c: Fix to make be
16-bit safe.
link.c (ext2fs_link), unlink.c (ext2fs_unlink), lookup.c (lookup_proc),
ismounted.c (ext2fs_check_if_mounted), block.c (xlate_func):
Add #pragma argsused for Turbo C.
/external/e2fsprogs/lib/ext2fs/closefs.c
4cbe8af4b0d0c72fb28bb500c1bd8a46b00fdde3 11-Aug-1997 Theodore Ts'o <tytso@mit.edu> Many files:
block.c (ext2fs_block_iterate2): Use retval which is a errcode_t type.
bitmaps.c (make_bitmap): Use size_t instead of int where appropriate.
bb_inode.c (set_bad_block_proc): Add #pragma argsused for Turbo C.
alloc.c (ext2fs_new_inode): Use ino_t instead of int for the group number.
get_pathname.c: Use ino_t instead of int where appropriate.
ext2fs.h: Make the magic structure element be errcode_t instead of int.
alloc.c alloc_tables.c badblocks.c bb_compat.c bb_inode.c
bitmaps.c block.c bmove.c brel_ma.c check_desc.c closefs.c
cmp_bitmaps.c dblist.c dblist_dir.c dir_iterate.c dirblock.c
dupfs.c expanddir.c freefs.c get_pathname.c icount.c
initialize.c inline.c inode.c irel_ma.c link.c llseek.c
lookup.c mkdir.c namei.c newdir.c read_bb.c read_bb_file.c
rs_bitmap.c rw_bitmaps.c swapfs.c test_io.c tst_badblocks.c
tst_iscan.c unix_io.c unlink.c valid_blk.c version.c: Add an
#ifdef for HAVE_UNISTD_H
/external/e2fsprogs/lib/ext2fs/closefs.c
a29f4d30f24d68f1f1c75548e020689ede532c05 29-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checkin of e2fsprogs 1.10
/external/e2fsprogs/lib/ext2fs/closefs.c
521e36857227b21e7ab47b0a97f788d2af9f9717 29-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checked in e2fsprogs 1.08.
/external/e2fsprogs/lib/ext2fs/closefs.c
21c84b71e205b5ab13f14343da5645dcc985856d 29-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checked in e2fsprogs-1.07
/external/e2fsprogs/lib/ext2fs/closefs.c
5c576477ccb2f0ca8c5d5af2e2354fd8eeff1589 29-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checked in e2fsprogs 1.06
/external/e2fsprogs/lib/ext2fs/closefs.c
50e1e10fa0ac12a3e2a9d20a75ee9041873cda96 26-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checked in e2fsprogs 0.5c
/external/e2fsprogs/lib/ext2fs/closefs.c
f3db3566b5e1342e49dffc5ec3f418a838584194 26-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checkin of e2fsprogs 0.5b
/external/e2fsprogs/lib/ext2fs/closefs.c
3839e65723771b85975f4263102dd3ceec4523c0 26-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checkin of e2fsprogs 0.5b
/external/e2fsprogs/lib/ext2fs/closefs.c