History log of /external/e2fsprogs/lib/ext2fs/openfs.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
51663e0d2aa2958b5ef590299b2018a2ae01d256 28-Aug-2017 Jin Qian <jinqian@google.com> mke2fs, libext2fs: make filesystem image reproducible

Override fs->now with env E2FSPROGS_FAKE_TIME
Override hash seed with -E hash_seed=<uuid>

Bug: 64994964
Change-Id: If1af7e990b5bf2939a7d5f2a9986406e12c294e9
(cherry picked from commit 3164c7644fd096a1ed88cdbe888fca0702ef7415)
/external/e2fsprogs/lib/ext2fs/openfs.c
77b3e9871877fce9908b0696250787fd6ea61af9 24-Oct-2015 Darrick J. Wong <darrick.wong@oracle.com> libext2fs: clean up feature test macros with predicate functions

Create separate predicate functions to test/set/clear feature flags,
thereby replacing the wordy old macros. Furthermore, clean out the
places where we open-coded feature tests.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
f92c600c09bbda482c6c4a37602db4f0db864a9e 09-Sep-2014 Darrick J. Wong <darrick.wong@oracle.com> libext2fs: report bad magic over bad sb checksum

We don't want ext2fs_open2() to report bad sb checksum on something
that's not even an ext* superblock. This apparently happens pretty
easily if we try to open an XFS filesystem. Thus, make it so that a
bad magic number code always trumps the sb checksum error code.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
68083287ae95dce9b610c94b28f95cb702d4c98f 11-Aug-2014 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
e2fsck/unix.c
f66e6ce4446738c2c7f43d41988a3eb73347e2f5 09-Aug-2014 Theodore Ts'o <tytso@mit.edu> libext2fs: avoid buffer overflow if s_first_meta_bg is too big

If s_first_meta_bg is greater than the of number block group
descriptor blocks, then reading or writing the block group descriptors
will end up overruning the memory buffer allocated for the
descriptors. Fix this by limiting first_meta_bg to no more than
fs->desc_blocks. This doesn't correct the bad s_first_meta_bg value,
but it avoids causing the e2fsprogs userspace programs from
potentially crashing.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
dc084ab7b1952c40ef223c8f9b54457716582cd6 21-Feb-2014 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next
585bca68f89aa2a99e39f9234a10f825eb243589 21-Feb-2014 Lukas Czerner <lczerner@redhat.com> Set pointer to NULL after ext2fs_free

ext2fs_free() does not set the ext2_filsys pointer to null so the
caller is responsible to setting it himself if it is needed.

This patch fixes some places where caller did not set ext2_filsys
pointer to NULL after ext2fs_free() which might result in use after
free. Fix it.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
f0996c12d5f189be2fddafc4b2665345230b3826 31-Jan-2014 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
lib/ext2fs/alloc.c
misc/mke2fs.c
d36b957b345ee6e4b529be99b8fdc8d3e70ccdc1 11-Jan-2014 Darrick J. Wong <darrick.wong@oracle.com> libext2fs: don't always read backup group descriptors on a 1k-block meta_bg fs

On a filesystem with 1K blocks and meta_bg enabled, opening a
filesystem with automatic superblock detection tries to compensate for
the fact that the superblock lives in block 1. However, the method by
which this is done is later misinterpreted to mean "read the backup
group descriptors", which is not what we want in this case.

Therefore, in ext2fs_open3() separate the 'group zero' adjustment into
its own variable so that we don't get fed backup group descriptors
when we try to load meta_bg group descriptors.

Furthermore, enhance ext2fs_descriptor_block_loc2() to perform its own
group zero correction. The other caller of this function neglects to
do any group-zero correction of their own, so this fixes them too.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
6ff02832a069bb832c8a72b949816089ae97b356 11-Jan-2014 Darrick J. Wong <darrick.wong@oracle.com> libext2fs: detect correct superblock adjustments when loading backup groups

If ext2fs_descriptor_block_loc2() is called with a meta_bg filesystem
and group_block is not the normal value, the function will return the
location of the backup group descriptor block in the next block group.
Unfortunately, it fails to account for the possibility that the backup
group contains a backup superblock but the regular superblock does
not. This is the case with block groups 48-49 on a meta_bg fs with 1k
blocks; in this case, libext2fs will fail to open the filesystem.

Therefore, teach the function to adjust for superblocks in the backup
group, if necessary.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
2ffccc82c4b9ed935e45118e325896b70e9e3eb0 26-Dec-2013 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
lib/ext2fs/csum.c
2fae17697ad85781f5c045a67a1103cc4111b130 03-Dec-2013 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
e2fsck/pass2.c
e2fsck/pass3.c
496220309337863b45d9ee6173ff431919fb51f5 02-Dec-2013 Theodore Ts'o <tytso@mit.edu> libext2fs: fix some memory leaks with image file handling

These memory leaks were discovered by using "valgrind
--leak-check=full" while running "e2image -I bar.img foo.e2i"

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
8b3c52fb8115c8c37835d74455619f380acbc833 02-Dec-2013 Kit Westneat <kwestneat@ddn.com> libext2fs: set the fs block size to new_io in ext2fs_rewrite_to_io()

e2image manually opens a new IO channel, and then sets the file system
to use this new IO channel via ext2fs_rewrite+to_io(). We need to
make sure the IO channel is set to the file system's block size to
avoid some nasty buffer overruns.

[ Modified by tytso to use io_channel_set_blksize() ]

Signed-off-by: Kit Westneat <kwestneat@ddn.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
/external/e2fsprogs/lib/ext2fs/openfs.c
e337e7fad8d9f29ea6a7436b40361f3a1a17a6af 13-Oct-2013 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
e2fsck/problem.c
e2fsck/rehash.c
e2fsck/super.c
57bde59a067c21ed924de4194344948f3c3ecb9a 12-Oct-2013 Darrick J. Wong <darrick.wong@oracle.com> libext2fs: openfs() musn't allow bigalloc without EXT2_FLAGS_64BITS

Currently, only the new 64-bit bitmap implementation supports the
block<->cluster conversions that bigalloc requires. Therefore, if we
have a bigalloc filesystem, require EXT2_FLAGS_64BITS be passed in to
ext2fs_open(). This does not mean that bigalloc file systems have to
be 64-bits; just that the userspace utilities have to be able to use
the new 64-bit capable library functions.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
/external/e2fsprogs/lib/ext2fs/openfs.c
df5e35fd63b42b66d5025fdca17bfdf6662a2827 09-Jan-2013 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
misc/mke2fs.c
f0257d8891c602cabc7358a5ca826444a172ccf5 09-Jan-2013 Theodore Ts'o <tytso@mit.edu> libext2fs: ext2fs_open2() should not set ret_fs after a MMP failure

The addition of MMP code was added in the wrong place, so ret_fs could
get set (and EXT2_FLAG_NOFREE_ON_ERROR was cleared as well, which
could confuse e2fsck which depends on this flag being cleared if
ext2fs_open2() succeeded.)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
b9b5e43ea81ecf575e3d96cbf51215aba3746b32 02-Jan-2013 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
RELEASE-NOTES
debian/changelog
lib/ext2fs/crc32c.c
lib/ext2fs/rw_bitmaps.c
resize/resize2fs.c
version.h
e3507739e4185bdb2394928eb6479e48f4e690a8 01-Jan-2013 Theodore Ts'o <tytso@mit.edu> Fix gcc -Wall nits

This fixes the last set of gcc -Wall complaints.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
5b58dc2304f06953e1d8314ea570cc3befec95bc 03-Aug-2012 Darrick J. Wong <djwong@us.ibm.com> libext2fs: block group checksum should use metadata_csum algorithm

Change the block group algorithm to use the same algorithm as the rest
of the metadata_csum. This mostly involves providing a helper
function to tell if group descriptors should have checksums set or
verified, and modifying the gdt checksum code to use the correct
algorithm.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
1eedf3e52c2ae8f7ad2ad9c010ce5293e0b19ae3 03-Aug-2012 Darrick J. Wong <djwong@us.ibm.com> libext2fs: record the checksum algorithm in use in the superblock

Record the type of checksum algorithm we're using for metadata in the
superblock, in case we ever want/need to change the algorithm.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
d4ca3e40cabd4ec5124ab9aa958fa9e5337aed39 03-Aug-2012 Darrick J. Wong <djwong@us.ibm.com> libext2fs: calculate and verify superblock checksums

Calculate and verify the superblock checksums. Each copy of the
superblock records the number of the group it's in and the FS UUID, so
we can simply checksum the whole block.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
4ffbe3afa9d05a28712c8f5c11b5b76be3dc99fc 31-Jul-2012 Darrick J. Wong <djwong@us.ibm.com> libext2fs: precompute FS UUID checksum seed

Precompute the FS UUID checksum seed that is used for all metadata
checksumming operations and store it in ext2_filsys.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
8718cb66c85e9b6344dee892edf5bb9a77e6c5c7 30-Jul-2012 Theodore Ts'o <tytso@mit.edu> libext2fs: enforce the block group descriptor size in ext2fs_open()

Since various parts of the library depend on the value of s_desc_size,
check to make sure it is the correct, expected value based on the file
system features.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
fd1c5a0622a9578b86f695d2f60df7d4f8b21875 07-May-2012 Theodore Ts'o <tytso@mit.edu> libext2fs: factor out I/O buffer allocation

Create a new function, io_channel_alloc_buf() which allocates I/O
buffers with appropriate alignment if we are using direct I/O. The
original code was sometimes using a larger alignment factor than
necessary, and would always request an aligned memory buffer even when
it was not necessary since the block device was not opened with
O_DIRECT.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
5f7c04972fefa8198c34f231a9e8a5430705b4ab 23-Mar-2012 Sami Liedes <sami.liedes@iki.fi> libext2fs: document EXT2_FLAG_64BITS in ext2fs_open2()

From 5c7302de65d689ad84427649aab4d361b21270df Mon Sep 17 00:00:00 2001
From: Sami Liedes <sami.liedes@iki.fi>
Date: Sat, 10 Mar 2012 22:25:55 +0200
Subject: [PATCH] libext2fs: Document EXT2_FLAG_64BITS in ext2fs_open2().

Signed-off-by: Sami Liedes <sami.liedes@iki.fi>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
48b89108202172268dd4a12645bece26c51d56fa 21-Feb-2012 Theodore Ts'o <tytso@mit.edu> libext2fs: don't mark the superblock as dirty if the fs was opened r/o

If the file system is read/only opened with a backup superblock, and
the file system has uninit_bg enabled, the super block must not be
marked as dirty; otherwise, ext2fs_close() will call ext2fs_flush(),
which will fail, since the file descriptor for the block device was
opened read/only, and then the file descriptor won't actually be
closed.

This is normally not a problem since most of the time the program will
exit shortly after calling ext2fs_close(), and many programs don't
bother checking the error return from ext2fs_close(), especially if
the file system was opened read/only.

A big exception to this is e2fsck, since it opens and close the file
systems during its startup, and to make matters worse, registers an
error handler which will noisly complain about the failed writes
caused by ext2fs_flush().

Fix this by not marking the superblock as dirty if the file system was
opened read/only. The changes to the block group descriptors to clear
the uninit bits will still happen, so that e2fsck -n will properly
scan the whole file system. However, those changes will get dropped
when the file system handle is closed.

Addresses-SourceForge-Bug: #3444351

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
454ac9d56acb643c48222c71f2b0e63926783b17 08-Feb-2012 Andreas Dilger <adilger@whamcloud.com> libext2fs: quiet spurious group checksum errors

If we have to read the backup group descriptor checksums, the UNINIT
flags are cleared to ensure that all of the inodes in the filesystem
are scanned. However, the code that reset the UNINIT flags did not
reset the group checksum, and this produced many spurious error
messages in e2fsck.

Group descriptor 0 checksum is invalid. FIXED.
Group descriptor 1 checksum is invalid. FIXED.
:
:

Recompute checksums after modifying group descriptors to avoid these
error messages. Remove expected error messages in f_illitable_flexbg.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
fc4fd955f705bdbdf5512b1c739191f17d483135 10-Nov-2011 Eric Sandeen <sandeen@redhat.com> libext2: advance group in ext2fs_open2 during swapping

Without this change, we go back to getting group descriptor
"0" each time we go around the "for i" loop. It must properly
advance through the filesystem.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.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/openfs.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/openfs.c
bc28abc537ff49d708abd66cc70ee451fdd010fd 16-Sep-2011 Eric Sandeen <sandeen@redhat.com> libext2: Fix EXT2_LIB_SOFTSUPP masking

EXT2_LIB_SOFTSUPP_INCOMPAT_* are supposed to be bitmasks
of features which can be opened even though they are
under development. The intent is that these are masked
out of the features list, so that they will be ignored
on open.

However, the code does a logical not vs. a bitwise not:

features &= !EXT2_LIB_SOFTSUPP_INCOMPAT;

which will not have the desired effect...

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
75405ffde6f87f88c7172bfb431ec085c542ec1a 16-Sep-2011 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next
3fbfad558e01ffbacc14e5a536c4dfec0a0af4f5 15-Sep-2011 Theodore Ts'o <tytso@mit.edu> libext2fs: fix binary and source compatibility with the dump program

The dump program relies on fs->frag_size and the
EXT2_FRAGS_PER_BLOCK() macro. Kind of silly for it to do so, but it's
part of the kludgy way the dump program (which was originally written
for the BSD FFS was ported over to support ext2/3.) Given how it
makes assumptions about the ext2/3/4 file system being similar to the
BSD FFS, it's a bit of a miracle it works for ext4 --- or at least
appears to work...

Addresses-Debian-Bug: #636418

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
d32c915abfb224f6f6659e9cada7e9f759b7e3d2 07-Jul-2011 Theodore Ts'o <tytso@mit.edu> libext2fs: Fix gcc -Wall warnings

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.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/openfs.c
cf5301d7f2c3bbed3d26600335102414cbf0c4ba 11-Jun-2011 Andreas Dilger <adilger@whamcloud.com> misc: clean up compiler warnings

Fix several types of compiler warnings (unused variables/labels),
uninitialized variables, etc that are hit with gcc -Wall.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
6a6337c3df7c982eb888764d585ec483a51af16e 05-Jun-2011 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
lib/ext2fs/bitmaps.c
lib/ext2fs/rw_bitmaps.c
misc/dumpe2fs.c
1da5ef707904cf99300a0fb36b9ae3b29dbc8bde 04-Jun-2011 Theodore Ts'o <tytso@mit.edu> libext2fs: change fs->clustersize to fs->cluster_ratio_bits

The log2 of the ratio of cluster size to block size is far more useful
than just storing the cluster size. So make this change, and then
define basic utility macros: EXT2FS_CLUSTER_RATIO(),
EXT2FS_CLUSTER_MASK(), EXT2FS_B2C(), EXT2FS_C2B(), and
EXT2FS_NUM_B2C().

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
6220b6715f4900bbcfa04ef3b81ccf48b2d21825 04-Jun-2011 Theodore Ts'o <tytso@mit.edu> libext2fs: require cluster size == block_size when opening a !bigalloc fs

In ext2fs_open() check to make sure the cluster size superblock field
is the same as the block size field when the bigalloc feature is not
set. This is necessary since we will start introducing calculations
based on the cluster size field.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
829d9994880394e48c883510799b1536812d6efb 28-Feb-2011 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint' into next

Conflicts:
lib/ext2fs/initialize.c
412376efff3c0e0c2fea00666c2457e6f2ae1878 26-Feb-2011 Theodore Ts'o <tytso@mit.edu> Add basic BIGALLOC support for cluster-based allocation

This adds the superblock fields needed so that dumpe2fs works and the
code points and renames the superblock fields from describing
fragments to clusters.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.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
00f0b1411838db56e1e04816e4d369be332fd2b6 24-Sep-2010 Theodore Ts'o <tytso@mit.edu> ext2fs: Optimize for Direct I/O

Allocate various memory structures to be properly aligned to avoid
needing to use a bounce buffer when doing direct I/O read/writes.
This should also help on FreeBSD systems which require aligned buffers
unconditionally.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.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/openfs.c
ccc7cf032852dd5c84b227bafb481b1d158e2b5e 31-Jul-2010 Theodore Ts'o <tytso@mit.edu> libext2fs: fix obvious big-endian bugs introduced by 64-bit changes

These patches fix obvious bone-headed mistakes, so e2fsprogs will now
build and mostly work on powerpc. The m_meta_bg, u_mke2fs, and
u_tune2fs tests are still failing, however, so there's still work to do...

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
6d8b37fa7661484ca50a4951cffbf531ab1bccbb 13-Jun-2010 Valerie Aurora Henson <vaurora@redhat.com> libext2fs: More random 64-bit fixes, lots of block_iterate3

Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.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/openfs.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/openfs.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/openfs.c
e633b58ac75f2f544b7d6572e37d4b63da31e59c 26-Oct-2009 Eric Sandeen <sandeen@redhat.com> libext2fs: clean up ext2fs_bg_flags_ interfaces

The ext2fs_bg_flag* functions were confusing.

Currently we have this:

void ext2fs_bg_flags_set(ext2_filsys fs, dgrp_t group, __u16 bg_flags);
void ext2fs_bg_flags_clear(ext2_filsys fs, dgrp_t group,__u16 bg_flags);

(_set (unused) sets exactly bg_flags; _clear clears all and ignores bg_flags)

and these, which can twiddle individual bits in bg_flags:

void ext2fs_bg_flag_set(ext2_filsys fs, dgrp_t group, __u16 bg_flag);
void ext2fs_bg_flag_clear(ext2_filsys fs, dgrp_t group, __u16 bg_flag);

A better interface, after the patch below, is just:

ext2fs_bg_flags_zap(fs, group) /* zeros bg_flags */
ext2fs_bg_flags_set(fs, group, flags) /* adds flags to bg_flags */
ext2fs_bg_flags_clear(fs, group, flags) /* clears flags in bg_flags */

and remove the original ext2fs_bg_flags_set / ext2fs_bg_flags_clear.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.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/openfs.c
732c8cd58ff30ffae0d3276c411a08920717a46c 08-Sep-2009 Theodore Ts'o <tytso@mit.edu> Use accessor functions fields for bg_flags in the block group descriptors

Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.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/openfs.c
4f8d6ab222beea3557e26aba9eefedb81db956ab 01-Jun-2009 Jose R. Santos <jrs@us.ibm.com> Add 64-bit openfs interface

Add new ext2fs_descriptor_block_loc2() routine that takes blk64_t as
an input.

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
8203fe506a06524587c18940b6cd19a0592a4bd2 23-Apr-2009 Theodore Ts'o <tytso@mit.edu> libext2fs: read the block group descriptors more efficiently

When opening a filesystem, make ext2fs_open2() much more efficient by
reading the normal block group descriptors all at once, instead of one
block at a time.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
341b52dfa8c2afc11d8410de9bd381b03e75c6af 17-Mar-2009 Theodore Ts'o <tytso@mit.edu> libext2fs: external journal devices should not cause ext2fs_open2 to fail

This fixes a regression introduced in commit 79a9ab14 which caused
attempts to open external journals to fail due to overly strict
filesystem consistency checks.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
79a9ab145467b95b96a885e6ac0b2cdd22cde516 20-Jan-2009 Thiemo Nagel <thiemo.nagel@ph.tum.de> ext2fs_open2: Add more checks for filesystem consistency

Add more checks to assure the filesystem is sane to avoid later
division by zero errors.

Patch adds consistency checks on superblock to fix serveral crashes:
* require EXT2_INODES_PER_GROUP != 0
* require EXT2_DESC_PER_BLOCK != 0
* require s_first_data_block < s_blocks_count
* require group_desc_count * EXT2_INODES_PER_GROUP == s_inodes_count

Signed-off-by: Thiemo Nagel <thiemo.nagel@ph.tum.de>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.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/openfs.c
49b4670e5c794f3c0f6f5df61dfa199d6cc7de65 11-Jul-2008 Manish Katiyar <mkatiyar@gmail.com> libext2fs: Add stricter/earlier tests for blocksize in ext2fs_open()

Signed-off-by: "Manish Katiyar" <mkatiyar@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
d4f34d41be97e23db07d5ed606fcc1a26f5a3c76 22-Oct-2007 Jose R. Santos <jrs@us.ibm.com> Add uninit block group support to various libext2fs functions

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.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/openfs.c
a49670e64e28ac3b15e36cb6bd0a8135d3ecdbbb 28-Feb-2008 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint'

Conflicts:

lib/blkid/devname.c
lib/blkid/probe.c
misc/mke2fs.c
misc/tune2fs.c
ab52e12a904b4a31fc3416f0ef7d959f0c38e773 27-Feb-2008 Theodore Ts'o <tytso@mit.edu> libext2fs: Add EXT2_FLAG_NONFREE_ON_ERROR to ext2fs_open2()

Add a flag which returns the partially completed filesystem object so
e2fsck can print more intelligent error messages.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.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/openfs.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/openfs.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/openfs.c
2628a1d3e1e581512d136486768685542d2649b1 06-Oct-2007 Theodore Ts'o <tytso@mit.edu> Merge branch 'maint'
ba9d929d914654f8dba36c634bb537ecf0f0bb04 07-Sep-2007 Theodore Ts'o <tytso@mit.edu> Don't crash if s_inode_size is zero

Any attempt to open a filesystem with s_inode_size set to zero causes
a floating point exception. This is true for e2fsck, dumpe2fs,
e2image, etc. Fix ext2fs_open2() so that it returns the error code
EXT2_ET_CORRUPT_SUPERBLOCK instead of crashing.

Thanks to Dean Bender for reporting this bug.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.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/openfs.c
058ad1c70c9a097d282270c6f76d3c3493e15fe2 19-Jun-2007 Theodore Ts'o <tytso@mit.edu> Don't write changes to the backup superblocks by default

This patch changes ext2fs_open() to set EXT2_FLAG_MASTER_SB_ONLY by
default. This avoids some problems in e2fsck (reported by Jim Garlick)
where a corrupt journal can end up writing the bad superblock to the
backups. In general, only e2fsck (after the filesystem is clean),
tune2fs, and resize2fs should change the backup superblocks by default.
Most callers of ext2fs_open() should not be touching anything where the
backups should be touched. So let's change the defaults to avoid
potential problems.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
96c6a3acd377698cb99ffd9925bec9b20ca4f6f9 19-May-2007 Theodore Ts'o <tytso@mit.edu> Store the RAID stride value in the superblock and take advantage of it

Store the RAID stride value when a filesystem is created with a requested
RAID stride, and then use it automatically in resize2fs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
cf8272e1081f69d898d5182ed516e28807135dea 13-Nov-2006 Theodore Ts'o <tytso@mit.edu> Allow debugfs and dumpe2fs to support fs features under development

Add support for the new flag EXT2_FLAG_SOFTSUPP_FEATURES flag to
ext2fs_open() , which allows application to open filesystes with features
which are currently only partially supported by e2fsprogs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
69022e029f3273b3b860bf701219cd3fe615f76b 30-Aug-2006 Theodore Ts'o <tytso@mit.edu> Fix potential 2**32-1 overflow problems by ext2fs_div_ceil()

Add a new function, ext2fs_div_ceil(), which correctly calculates a division
of two unsigned integer where the result is always rounded up the next
largest integer. This is used everywhere where we might have
previously caused an overflow when the number of blocks
or inodes is too close to 2**32-1.

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/lib/ext2fs/openfs.c
85f93ffdc48f19bed280931b00e41039ee696637 22-May-2006 Theodore Ts'o <tytso@mit.edu> Fix type warning problem with sizeof() in ext2fs_open2()

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
39c47ce6417b81aa74596fd0d4d98d542525a444 19-Mar-2006 Theodore Ts'o <tytso@mit.edu> Add EXT2_FLAG_EXCLUSIVE to the ext2fs library.

This flag when specified to ext2fs_open or ext2fs_initialize indicates
that the application wants the io_channel to be opened in exclusive mode.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/openfs.c
2e8ca9a26b0bd7dae546a3f9a98df67b043fe3be 30-Nov-2004 Theodore Ts'o <tytso@mit.edu> Add support for passing options to the io layer using the URL syntax. For
example, /tmp/test.img?offset=1024. Multiple options can separated using
the & character, although at the moment the only option implemented is
the offset option in the unix_io layer.
/external/e2fsprogs/lib/ext2fs/openfs.c
1ad54a940c499a66241f624882f1ffa03ce56d90 29-Jul-2004 Theodore Ts'o <tytso@mit.edu> Add ability for debugfs to use a separate source of data blocks when
reading from an e2image file. (New -d option)

Add new functions ext2fs_get_data_io, ext2fs_set_data_io,
ext2fs_rewrite_to_io to libext2fs library.
/external/e2fsprogs/lib/ext2fs/openfs.c
544349270e4c74a6feb971123884a8cf5052a7ee 07-Dec-2003 Theodore Ts'o <tytso@mit.edu> Fix gcc -Wall nitpicks
/external/e2fsprogs/lib/ext2fs/openfs.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/openfs.c
9ed06a1eb90efbc3290c1b5a56e0e09d243f95da 31-Oct-2002 Theodore Ts'o <tytso@mit.edu> openfs.c (ext2fs_open): Fix bug which caused us to pass the
wrong group_block to ext2fs_descriptor_block_loc if we're
using the backup superblock/block group descriptors.
(ext2fs_descriptor_block_loc): If we're using the backup
superblock descriptors, use the backup descriptor block in
the next block group.
/external/e2fsprogs/lib/ext2fs/openfs.c
c046ac7f2e4c53e20cf1e909bbe511f91074b396 20-Oct-2002 Theodore Ts'o <tytso@mit.edu> Add support for the meta_blockgroup filesystem format.
/external/e2fsprogs/lib/ext2fs/openfs.c
b21bf267783274683a432eea6e5c589eab94123e 10-Jun-2002 Andreas Dilger <adilger@clusterfs.com> Do sanity checking of the number of blocks and inodes in a group for
8192-byte and 16384-byte blocksize filesystems.

Change the default bytes-per-inode ratio of a new filesystem to be at most
one inode per block for large blocksizes.
/external/e2fsprogs/lib/ext2fs/openfs.c
6a525069a99787ef3ae1156f12230044b3568f4b 24-Dec-2001 Theodore Ts'o <tytso@mit.edu> Mke2fs now creates the lost+found directory with 0700 permissions,
since files which get dropped into that directory may have come
from a protected directory, and the system administrator may not
deal with immediately. (Addresses Debian bug #118443)
/external/e2fsprogs/lib/ext2fs/openfs.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/openfs.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/openfs.c
a777397e228243cdc35056b14956db7280b0844c 14-May-2001 Theodore Ts'o <tytso@mit.edu> openfs.c:
Update documentation about what flags are valid for ext2fs_open().
/external/e2fsprogs/lib/ext2fs/openfs.c
a78926effb15bbabb1c0ed3e438b03be25c4d48c 03-May-2001 Theodore Ts'o <tytso@mit.edu> Many files:
ext2fs.h (EXT2_FLAG_IMAGE_FILE): Add new flag, and add image_header
field in the ext2_filsys structure
block.c (block_iterate_ind, block_iterate_dind, block_iterate_tind):
inode.c (ext2fs_read_inode):
rw_bitmaps.c (read_bitmaps):
openfs.c (ext2fs_open): Add support for EXT2_FLAG_IMAGE_FILE
imager.c (ext2fs_image_bitmap_read): Fix bug in imager to make sure
the full bitmap is saved.
/external/e2fsprogs/lib/ext2fs/openfs.c
a112847b39386f9e7332ba5e5a0a5e54cfe301cc 16-Jan-2001 Theodore Ts'o <tytso@mit.edu> ChangeLog, ext2_err.et.in, ext2fs.h, initialize.c, mkjournal.c, openfs.c:
initialize.c (ext2fs_initialize): Add support for initializing the
ext2 superblock for external journal devices. This basically means we
don't bother to allocate any block group descriptors.
openfs.c (ext2fs_open): Only open external journal devices if the new
flag EXT2_FLAG_JOURNAL_DEV_OK is passed to ext2fs_open. When opening
such devices, don't try to read the block group descriptors, since
they're not there.
ext2_err.et.in (EXT2_NO_JOURNAL_SB): Add new error code
mkjournal.c: Export a new function,
ext2fs_create_journal_superblock(), which allocates and returns a
buffer containing a journal superblock. This is needed by mke2fs to
create an external journal. Rewrote ext2fs_add_journal_device() so
that it no longer creates the external journal, but rather adds a
filesystem to an existing external journal. It handles all of the
UUID manipulation.
ext2fs.h: List the EXT3_FEATURE_JOURNAL_DEV as a flag supported by the
library. Define the EXT2_FLAG_JOURNAL_DEV_OK. Changed function
prototype for ext2fs_add_journal_device().
/external/e2fsprogs/lib/ext2fs/openfs.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/openfs.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/openfs.c
f0687a5e5724abf576c106e07363f2e437cc9883 29-May-1999 Theodore Ts'o <tytso@mit.edu> ChangeLog, openfs.c:
openfs.c (ext2fs_open): Check to make sure that the number of blocks
per group is not zero --- if so, it must be a bad superblock!
/external/e2fsprogs/lib/ext2fs/openfs.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/openfs.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/openfs.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/openfs.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/openfs.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/openfs.c
1d2ff46ae7533ffd038534b189f272d2a4122e4e 20-Oct-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Add #ifdef's for HAVE_SYS_STAT_H and HAVE_SYS_TYPES_H
/external/e2fsprogs/lib/ext2fs/openfs.c
e9affb7bec8641abfc1a63abbd6009a2464ef2dd 24-Aug-1997 Theodore Ts'o <tytso@mit.edu> ChangeLog, Makefile.in, initialize.c, .del-io.h~72680822, openfs.c:
Makefile.in (ELF_SO_VERSION): Bump version to be 2.4 since we've added
a new field to the io_channel (app_data).
io.h: Add a new element to the io_channel structure, app_data.
initialize.c, openfs.c: Set io->app_data to point at the filesystem handle.
/external/e2fsprogs/lib/ext2fs/openfs.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/openfs.c
521e36857227b21e7ab47b0a97f788d2af9f9717 29-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checked in e2fsprogs 1.08.
/external/e2fsprogs/lib/ext2fs/openfs.c
19c78dc07fce2d6f39b5e541562afc3ca1ea38ff 29-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checked in e2fsprogs-1.07
/external/e2fsprogs/lib/ext2fs/openfs.c
5c576477ccb2f0ca8c5d5af2e2354fd8eeff1589 29-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checked in e2fsprogs 1.06
/external/e2fsprogs/lib/ext2fs/openfs.c
1e3472c5f37ca3686dd69b079d4d02a302f5798d 29-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checked in e2fsprogs 1.05
/external/e2fsprogs/lib/ext2fs/openfs.c
7f88b04341d88c5df0360d930832c38040303b61 26-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checkin of e2fsprogs 1.03.
/external/e2fsprogs/lib/ext2fs/openfs.c
50e1e10fa0ac12a3e2a9d20a75ee9041873cda96 26-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checked in e2fsprogs 0.5c
/external/e2fsprogs/lib/ext2fs/openfs.c
f3db3566b5e1342e49dffc5ec3f418a838584194 26-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checkin of e2fsprogs 0.5b
/external/e2fsprogs/lib/ext2fs/openfs.c
3839e65723771b85975f4263102dd3ceec4523c0 26-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checkin of e2fsprogs 0.5b
/external/e2fsprogs/lib/ext2fs/openfs.c