History log of /external/e2fsprogs/lib/ext2fs/unix_io.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/unix_io.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/unix_io.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/unix_io.c
1d6fd6d0c3766a8165e69284c75812574a29c804 29-Nov-2012 Andreas Dilger <adilger@dilger.ca> misc: cleanup unused variables on MacOS

Clean up unused variables found by GCC on MacOS.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/unix_io.c
4e0bb5eb745009decac4c5836671ff4bef21ce2a 17-Dec-2012 Theodore Ts'o <tytso@mit.edu> libext2fs: fix memory and fd leak in error path of unix_open()

Fix a potential memory leak reported by Li Xi. In addition, there
were possible error cases where the file descriptor would not be
properly closed, so fix those as well while we're at it.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reported-by: Li Xi <pkuelelixi@gmail.com>
/external/e2fsprogs/lib/ext2fs/unix_io.c
182acd17bef0cf8dcb66568448a528abb1dfcd71 28-May-2012 Andreas Dilger <adilger@whamcloud.com> libext2fs: don't inline ext2fs_open_file() and ext2fs_stat()

The creation of inline wrappers ext2fs_open_file() and ext2fs_stat()
in commit c859cb1de0d624caa0779fb17d1a53766143136e in ext2fs.h caused
difficulties with the use of headers, since the headers for open64()
and stat64() may already be included (and skip the declaration of the
64-bit variants) before ext2fs.h is ever read. There is no real way
to solve the missing prototypes and resulting compiler warnings inside
ext2fs.h.

Since ext2fs_open_file() and ext2fs_stat() are not performance
critical operations, they do not need to be inline functions at all,
and the needed function headers can be handled properly in one file.

Similarly, posix_memalloc() was having difficulties with headers, and
was being defined in ext2fs.h, but it is now only being used by a
single file, so move the required header there.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/unix_io.c
40024fdbafdf3875a0950e8fee5dd8bf69ea6b6c 14-May-2012 Theodore Ts'o <tytso@mit.edu> libext2fs: fix bug in unix_io corrupted > 16TB file systems on 32-bit systems

The code was assuming that "unsigned long" was 64-bit, which of course
it isn't on 32-bit systems. This caused blocks to get written to the
wrong place.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/unix_io.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/unix_io.c
dd0a2679ddd0a9bf53e32efc0f67a7e7a5ea5f00 07-May-2012 Theodore Ts'o <tytso@mit.edu> libext2fs: refactor Direct I/O alignment requirement calculations

Create a new function, ext2fs_get_dio_alignment(), which returns the
alignment requirements for direct I/O. This way we can factor out the
code from MMP and the Unix I/O manager. The two modules weren't
consistently calculating the alignment factors, and in particular MMP
would sometimes use a larger alignment factor than was strictly
necessary.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/unix_io.c
0a05b90330d8b505469c72143964b954776be232 07-May-2012 Theodore Ts'o <tytso@mit.edu> libext2fs: move the alignment field from unix_io to the io_manager

The align field which indicated the required data alignment of data
buffers was stored in a field specific to the unix_io manager. Move
it to the top-level io_channel structure so it can be better
generalized.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/unix_io.c
800766ee4a2bcdc0a32442d093d20da6ea3815ab 07-Mar-2012 Mike Frysinger <vapier@gentoo.org> libext2fs: check for fallocate symbol before using it

If we have newer kernel headers which define FALLOC_FL_PUNCH_HOLE, but we
are on an older glibc which lacks fallocate, we end up trying to use the
func anyways. Check the ifdef that autoconf already set up for us.

Reported-by: Ortwin Glueck <odi@odi.ch>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/unix_io.c
d9a5d37535794842358e1cfe4faa4a89804ed209 21-Feb-2012 Theodore Ts'o <tytso@mit.edu> libext2fs: support O_DIRECT functionality for Mac OS X

Darwin uses fcntl(fd, F_NOCACHE, 1) instead of the O_DIRECT flag.

Addresses-SourceForge-Bug: #3140289

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/unix_io.c
c4012e5a7ace2e1f382c4d46f56e5749758c9a1a 06-Oct-2011 Theodore Ts'o <tytso@mit.edu> libext2fs: make ext2fs_open_file() always use 3 arguments instead of varargs

Some architectures have narrow mode_t's which can cause some
portability warnings with varargs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/unix_io.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/unix_io.c
624e8ebe3058bad9af6e719b7f9e7afab7d3fe30 16-Sep-2011 Eric Sandeen <sandeen@redhat.com> e2fsprogs: Fix some error cleanup path bugs

In inode_open(), if the allocation of &io fails, we go to cleanup
and dereference io to test io->name, which is a bug.

Similarly in undo_open() if allocation of &data fails, we
go to cleanup and dereference data to test data->real.

In the test_open() case we explicitly set retval to the only
possible error return from ext2fs_get_mem(), so remove that
for tidiness.

The other changes just make make earlier returns go through
the error goto for consistency.

In many cases we returned directly from the first error, but
"goto cleanup" etc for every subsequent error. In some
cases this leads to "impossible" tests such as:

if (ptr)
ext2fs_free_mem(&ptr)

on paths where ptr cannot be null because we would have
returned directly earlier, and Coverity flags this.

This isn't really indicative of an error in most cases, but
I think it can be clearer to always exit through the error goto
if it's used later in the function.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/unix_io.c
d2bfdc7ff15ce7b6b40c087021528ce190ef43c3 16-Sep-2011 Lukas Czerner <lczerner@redhat.com> e2fsprogs: Use punch hole as "discard" on regular files

If e2fsprogs tools (mke2fs, e2fsck) is run on regular file instead of
on block device, we can use punch hole instead of regular discard
command which would not work on regular file anyway. This gives us
several advantages. First of all when e2fsck is run with '-E discard'
parameter it will punch out all ununsed space from the image, hence
trimming down the file system image. And secondly, when creating an
file system on regular file (with '-E discard' which is default), we
can use punch hole to clear the file content, hence we can skip inode
table initialization, because reads from sparse area returns zeros. This
will result in faster file system creation (without the need to specify
lazy_itable_init) and smaller images.

This commit also fixes some tests that would fail due to mke2fs showing
discard progress, hence the output would differ.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/unix_io.c
c859cb1de0d624caa0779fb17d1a53766143136e 16-Sep-2011 Lukas Czerner <lczerner@redhat.com> e2fsprogs: create open() and stat() helpers

In many places we are using #ifdef HAVE_OPEN64 to determine if we can
use open64() but that's ugly. This commit creates two new helpers
ext2fs_open_file() for open() and ext2fs_stat() for stat(). Also we need
new typedef ext2fs_struct_stat for struct stat.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/unix_io.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/unix_io.c
534a4c3db58064caee4fc3e9e294251240d9d28a 11-Jun-2011 Andreas Dilger <adilger@whamcloud.com> ext2fs: don't use O_DIRECT if not available

O_DIRECT is not defined on OSX. Since direct IO is only a new
optimization and not needed for correct functionality, disable
it if O_DIRECT is unavailable.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/unix_io.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/unix_io.c
d866599ab4955858b1541f0891b1b165ba66493a 18-Nov-2010 Lukas Czerner <lczerner@redhat.com> e2fsprogs: Add CHANNEL_FLAGS_DISCARD_ZEROES flag for io_manager

When the device have discard support and simultaneously discard zeroes
data (and it is properly advertised), then we can take advantage of such
behavior in several e2fsprogs tools.

Add new flag CHANNEL_FLAGS_DISCARD_ZEROES for struct_io_channel so
each io_manager can take advantage of this. The flag is properly set
according to BLKDISCARDZEROES ioctl in unix_open.

Also remove old mke2fs_discard_zeroes_data() function and substitute it
with helper which test this flag.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/unix_io.c
e90a59ed434d6c5e38dd148aa4ba5b22b8f7eb24 18-Nov-2010 Lukas Czerner <lczerner@redhat.com> e2fsprogs: Add discard function into struct_io_manager

In order to provide generic "discard" function for all e2fsprogs tools
add a discard function prototype into struct_io_manager. Specific
function for specific io managers can be crated that way.

This commit also creates unix_discard function which uses BLKDISCARD
ioctl to discard data blocks on the block device and bind it into
unit_io_manager structure to be available for all e2fsprogs tools.
Note that BLKDISCARD is still Linux specific ioctl, however other
unix systems may provide similar functionality. So far the
unix_discard() remains linux specific hence is embedded in #ifdef
__linux__ macro.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/unix_io.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/unix_io.c
faafdb765b4ed2bb33070d998426bec0cf774344 23-Sep-2010 Theodore Ts'o <tytso@mit.edu> libext2fs: Fix memory leak in the Unix I/O layer when changing block size

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/unix_io.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/unix_io.c
7ed7a4b6ed8b2fce891874a0eafdc8f77c3ffc34 11-Oct-2008 Eric Sandeen <sandeen@redhat.com> unix_io: check for read-only devices when opening R/W

When we open a device on linux, test whether it is writable
right away, rather than trying to proceed and clean up when
writes start failing.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/unix_io.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/unix_io.c
59ecd32dcb1d890bd52444c7cdeaabf8d9b2dbd1 03-Mar-2008 Jose R. Santos <jrs@us.ibm.com> Add {read,write}_blk64 to unix_io.c

Add 64-bit block capable routines to Unix IO manager.

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/unix_io.c
6d96b00d57d236e2746f8245df6c8ea64abc64c1 04-Aug-2007 Theodore Ts'o <tytso@mit.edu> Add I/O statistics to e2fsck

This patch instruments the libext2fs unix I/O manager and adds bytes
read/written and data rate to e2fsck -tt pass/overall timing output.

Signed-off-by: Jim Garlick <garlick@llnl.gov>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/unix_io.c
2aee23f325037fce1db32d556e6cf9adaa97ce04 12-Nov-2006 Theodore Ts'o <tytso@mit.edu> Allow unix_io offsets greater than 2G

Addresses SourceForge Bug: #1547922

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/unix_io.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/lib/ext2fs/unix_io.c
fa6c653ec3117dd689c8adb4ea2ebfc10f8cdd4a 19-Mar-2006 Theodore Ts'o <tytso@mit.edu> Add IO_FLAG_EXCLUSIVE flag to io_channel abstraction

Add a new io_channel open flag, IO_FLAG_EXCLUSIVE,which requests that
the device be opened in exclusive (O_EXCL) mode. Add support to the unix_io
implementation for this flag.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/unix_io.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/unix_io.c
83e692e88bf2d01edb089010bdfc07b7dcc78642 30-Mar-2004 Matthias Andree <matthias.andree@gmx.de> unix_io.c, pass1.c:
int -> unsigned for 1 bit wide bitfields - we cannot have a value and a sign in 1 bit.
Fixes some of the Intel C++ 8.0 warnings (-w1 level).
/external/e2fsprogs/lib/ext2fs/unix_io.c
289e0557c24c68290b6d9b73b09674447801fdac 30-Mar-2004 Matthias Andree <matthias.andree@gmx.de> GNU/KFreeBSD portability fixes. (Addresses Debian Bug #239934)
/external/e2fsprogs/lib/ext2fs/unix_io.c
b34cbddbd66baedc163d36dd281b63ef478f547a 28-Dec-2003 Matthias Andree <matthias.andree@gmx.de> Re-add FreeBSD support.
Tested on FreeBSD 5.2-CURRENT as of 2003-12-28.
Tested on FreeBSD 4.9-STABLE as of 2003-12-27.
/external/e2fsprogs/lib/ext2fs/unix_io.c
544349270e4c74a6feb971123884a8cf5052a7ee 07-Dec-2003 Theodore Ts'o <tytso@mit.edu> Fix gcc -Wall nitpicks
/external/e2fsprogs/lib/ext2fs/unix_io.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/unix_io.c
b8a953157bce577bff6f9d8437e8d7f2c881fe63 14-May-2003 Theodore Ts'o <tytso@mit.edu> unix_io.c: Add #ifdef NO_IO_CACHE which disables all userspace
caching by the unix_io layer. Not enabled, only for
debugging.
/external/e2fsprogs/lib/ext2fs/unix_io.c
a85e81a2ff4fb1afc05ff74d5da573031c3495e0 18-Apr-2003 Theodore Ts'o <tytso@mit.edu> configure.in: Remove CYGWIN definition; we will use the
automatically defined __CYGWIN__ instead.
/external/e2fsprogs/lib/ext2fs/unix_io.c
fff45483ede7fe38a31b3364a9c07e2418776dee 13-Apr-2003 Theodore Ts'o <tytso@mit.edu> Add portability enhancements for Cygwin32 environment.
/external/e2fsprogs/lib/ext2fs/unix_io.c
23b7c8b88673248b1f93abc717943867ad037bb4 23-Jan-2003 Theodore Ts'o <tytso@mit.edu> unix_io.c (unix_write_blk): Fix up GCC -Wall nits.
/external/e2fsprogs/lib/ext2fs/unix_io.c
82c4660c756fba5eae289e6fbf03fab55393e3e2 09-Nov-2002 Theodore Ts'o <tytso@mit.edu> unix_io.c (find_cached_block, reuse_cache, unix_read_blk,
unix_write_blk): Optimize routines so that we don't end up
searching the cache twice when a block isn't in the
cache. If reads are larger than READ_DIRECT_SIZE, don't
let them go through the cache.
/external/e2fsprogs/lib/ext2fs/unix_io.c
1d47dfb91ef010c506e9354dec102385d8494d8f 09-Nov-2002 Theodore Ts'o <tytso@mit.edu> unix_io.c (find_cached_block): Fixed bug which caused some clean
blocks to be erroneously marked as dirty, so they would
get written back to the disk before they are evicted from
the cache. Harmless, but it slows down e2fsck
significantly.
/external/e2fsprogs/lib/ext2fs/unix_io.c
f154d2f687e922f8444ef3050dc83f5d8e0e2178 14-Jul-2002 Theodore Ts'o <tytso@mit.edu> unix_io.c (unix_open): Only attempt the setrlimit workaround if
the kernel version is 2.4.10 -- 2.4.17, since otherwise an
old version of glibc (built against 2.2 headers) will
interact badly with the workaround to actually cause more
problems. I hate it when the glibc folks think they're
being smarter than the kernel....
/external/e2fsprogs/lib/ext2fs/unix_io.c
64e1b274edc48553c76511ff9b30f85c52aff046 24-Feb-2002 Theodore Ts'o <tytso@mit.edu> unix_io.c (unix_open): Fix 2.4 resource limit workaround so that
it doesn't break things on mis32, sparc32, and alpha
platforms.
/external/e2fsprogs/lib/ext2fs/unix_io.c
f12e285ffd9ff0b37c4f91d5ab2b021ed1eb43be 20-Feb-2002 Theodore Ts'o <tytso@mit.edu> Add new inode I/O abstraction interface which exports an inode as
an I/O object.

Export ext2_file_flush as a public interface.

Also minor cleanups to tighten code in other I/O abstractions, and to
mark a void * pointer as const in the ext2_file_write interface.
/external/e2fsprogs/lib/ext2fs/unix_io.c
bd27880b4ba42544f30a08ac3b6ba86190da021b 03-Dec-2001 Theodore Ts'o <tytso@mit.edu> unix_io.c (unix_open): Make sure the ulimit workaround works
regardless of the version of glibc which is used to
compild e2fsprogs.
/external/e2fsprogs/lib/ext2fs/unix_io.c
8880e7599ced6d047626dd45665b765d0f5eded5 27-Nov-2001 Theodore Ts'o <tytso@mit.edu> unix_io.c (unix_open): Work around a bug in 2.4.10+ kernels by
trying to unset the filesize limit if at all possible,
if a block device is getting opened. (The filesize limit
shouldn't be applied against writes to a block device, but
starting in 2.4.10, the kernel is doing this.)
/external/e2fsprogs/lib/ext2fs/unix_io.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/unix_io.c
31dbecd482405e0d3a67eb58e1a1c8cb9f2ad83e 11-Jan-2001 Theodore Ts'o <tytso@mit.edu> Many files:
alloc.c, bb_inode.c, bitmaps.c, bitops.h, block.c, bmap.c, bmove.c,
brel.h, cmp_bitmaps.c, dblist.c, dblist_dir.c, dir_iterate.c,
expanddir.c, ext2fs.h, ext2fsP.h, fileio.c, finddev.c, get_pathname.c,
icount.c, inode.c, irel.h, irel_ma.c, ismounted.c, link.c, lookup.c,
mkdir.c, mkjournal.c, namei.c, newdir.c, read_bb_file.c, test_io.c,
tst_iscan.c, unix_io.c, unlink.c: Change use of ino_t to ext2_ino_t,
to protect applications that attempt to compile
-D_FILE_OFFSET_BITS=64, since this inexplicably changes ino_t(!?). So
we use ext2_ino_t to avoid an unexpected ABI change.
/external/e2fsprogs/lib/ext2fs/unix_io.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/unix_io.c
adfc8c6c9902c3f08c79a44c1927971175f9d947 18-Oct-2000 Theodore Ts'o <tytso@mit.edu> ChangeLog, ext2_io.h, unix_io.c:
unix_io.c: Make massive changes to support a multiple block
writethrough cacheing.
ext2_io.h: Added flags field to the io_channel structure.
/external/e2fsprogs/lib/ext2fs/unix_io.c
dc5f68cad3c8ee4c583acf9afbfdb7354cd3d6af 26-May-2000 Theodore Ts'o <tytso@mit.edu> ChangeLog, getsize.c, llseek.c, unix_io.c:
getsize.c (ext2fs_get_device_size): Use open64() instead of open() if
it exists.
unix_io.c (unix_open): Use open64() instead of open() if it exists.
llseek.c: Simplify header includes of unistd.h. If lseek64 is
available (and prototypes are defined) use it in preference to llseek.
/external/e2fsprogs/lib/ext2fs/unix_io.c
c4e749abd8451f02418fe552b2af14f226f7bd1e 20-Feb-1998 Theodore Ts'o <tytso@mit.edu> ChangeLog, getsize.c, ismounted.c, unix_io.c:
getsize.c, ismounted.c, unix_io.c: #include errno.h since it's needed.
/external/e2fsprogs/lib/ext2fs/unix_io.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/unix_io.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/unix_io.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/unix_io.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/unix_io.c
d40259fd552d942903f2fd0b426c75a5c2516017 20-Oct-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Rename io.h to be ext2_io.h (avoid namespace collisions)
ChangeLog, resize2fs.h:
Add #ifdef's for HAVE_SYS_TYPES_H and HAVE_SYS_TIME_H.
/external/e2fsprogs/lib/ext2fs/unix_io.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/unix_io.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/unix_io.c
a1230b1376dc5514a260134f53c23f8d2d1e61ce 02-Jul-1997 Theodore Ts'o <tytso@mit.edu> ChangeLog, ext2_err.et.in, unix_io.c:
unix_io.c (unix_read_blk): If ext2fs_llseek() fails, but errno is
zero, then return EXT2_IO_LLSEEK_FAILED.
ext2_err.et.in: Add a new error code, EXT2_IO_LLSEEK_FAILED.
/external/e2fsprogs/lib/ext2fs/unix_io.c
36f21439f5d8b2233d13e042833d4d921a5c2c40 14-Jun-1997 Theodore Ts'o <tytso@mit.edu> ChangeLog, unix_io.c:
Make the io_channel flush function do a fsync to flush the kernel
buffers to disk.
bmove.c, ext2fs.h:
Added debugging flag to block move function.
/external/e2fsprogs/lib/ext2fs/unix_io.c
a29f4d30f24d68f1f1c75548e020689ede532c05 29-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checkin of e2fsprogs 1.10
/external/e2fsprogs/lib/ext2fs/unix_io.c
19c78dc07fce2d6f39b5e541562afc3ca1ea38ff 29-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checked in e2fsprogs-1.07
/external/e2fsprogs/lib/ext2fs/unix_io.c
50e1e10fa0ac12a3e2a9d20a75ee9041873cda96 26-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checked in e2fsprogs 0.5c
/external/e2fsprogs/lib/ext2fs/unix_io.c
f3db3566b5e1342e49dffc5ec3f418a838584194 26-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checkin of e2fsprogs 0.5b
/external/e2fsprogs/lib/ext2fs/unix_io.c
3839e65723771b85975f4263102dd3ceec4523c0 26-Apr-1997 Theodore Ts'o <tytso@mit.edu> Many files:
Checkin of e2fsprogs 0.5b
/external/e2fsprogs/lib/ext2fs/unix_io.c