History log of /external/e2fsprogs/lib/ext2fs/ext2_io.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f9e0f1d4a7cf32c4091eee7d2a1676cac1d17438 11-Nov-2016 Adrien Schildknecht <adriens@google.com> libext2fs: android sparse io manager

Add a new io manager to directly output sparse images.

Test: mke2fs [...] -E sparse_file;
simg2img system.img system.ext4;
e2fsck system.ext4

Change-Id: I41cf8c1b33d359be4f104e03fb4041863214843c
/external/e2fsprogs/lib/ext2fs/ext2_io.h
4ccf9e4fe165cfa966c8af0f3d310230aa5c3a1e 10-Aug-2016 Adrien Schildknecht <adriens@google.com> libext2fs: add unixfd_io_manager

This new manager is similar to the unix_io_manager except it takes a
file descriptor as first argument instead of a filename.

Some programs may want libext2fs to directly use a fd instead of
letting it opening the file.
The use case for such a io_manager would be to let programs use
a fd even if the filename is unknown:
- the fd comes from a temporary file (O_TMPFILE);
- the fd comes from a unix socket...

Refactoring unix_open() also fix a bug when the IO_DIRECT flag was
specified: ext2fs_get_dio_alignment() was called before the file was
actually opened, resulting in an alignment of 0.

Signed-off-by: Adrien Schildknecht <adriens@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/ext2_io.h
3d28f54589909de7abe477c2ca9d2ff7b0f2404d 29-Mar-2015 Darrick J. Wong <darrick.wong@oracle.com> libext2fs: zero blocks via FALLOC_FL_ZERO_RANGE in ext2fs_zero_blocks

Plumb a new call into the IO manager to support translating
ext2fs_zero_blocks calls into the equivalent FALLOC_FL_ZERO_RANGE
fallocate flag primitive when possible. This patch provides _only_
support for file-based images.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/ext2_io.h
ca209dc62512a0b4b68e9abf17399599b0d823ac 19-Sep-2014 Andreas Dilger <adilger@whamcloud.com> ext2fs: add readahead method to improve scanning

Add a readahead method for prefetching ranges of disk blocks. This is
useful for inode table scanning, and other large contiguous ranges of
blocks, and may also prove useful for random block prefetch, since it
will allow reordering of the IO without waiting synchronously for the
reads to complete.

It is currently using the posix_fadvise(POSIX_FADV_WILLNEED)
interface, as this proved most efficient during our testing.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/ext2_io.h
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/ext2_io.h
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/ext2_io.h
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/ext2_io.h
aa07cb79b0a38d9d8407c5631624ef8534bdde3f 28-Feb-2011 Theodore Ts'o <tytso@mit.edu> mke2fs: If the device supports discard, don't print an error message

Check to see if the device supports discard before starting the
progress bar, and then printing an error about inappropriate ioctl for
device (when creating a file system image to a file, for example).

Also, add a function signature in the ext2_io.h header file for
io_channel_discard() and fix an extra, uneeded argument in mke2fs's
call to that function.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/ext2_io.h
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/ext2_io.h
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/ext2_io.h
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/ext2_io.h
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/ext2_io.h
8f82ef9860339039b54a324be137fbc09b762358 05-Aug-2009 Valerie Aurora Henson <vaurora@redhat.com> Convert libext2fs to 64-bit bitmap interface

(Includes fixes from Nick Dokos)

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/ext2_io.h
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/ext2_io.h
4690e621acd4579dae60b6f55f58284ee805e86d 28-Aug-2008 Theodore Ts'o <tytso@mit.edu> Improve future compatibility for the 64-bit I/O channel functions

Provide a C language wrapper function for io_channel_read_blk64() and
io_channel_write_blk64() instead of using a C preprocessor macro, with
an fallback to the old 32-bit functions if an application-provided I/O
channel manager doesn't supply 64-bit method functions and the block
numbers can fit in 32-bit integer.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/ext2_io.h
72a168b59cbabdcfb1fe9db30f3d63f6f9731324 13-Aug-2007 Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> libext2fs: Add undo I/O manager

This I/O manager saves the contents of the location being overwritten
to a tdb database. This helps in undoing the changes done to the
file system.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/ext2_io.h
3154e1cceb9f49bd3898e9a91723141af55cdd36 03-Mar-2008 Jose R. Santos <jrs@us.ibm.com> Add 64-bit IO manager operations to struct_io_manager.

In order to provide 64-bit block support for IO managers an maintain
ABI compatibility with the old API, some new functions need to be
added to struct_io_manger. Luckily, strcut_io_manager has some
reserved space that we can use to add these new functions.

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/external/e2fsprogs/lib/ext2fs/ext2_io.h
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/ext2_io.h
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/ext2_io.h
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/ext2_io.h
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/ext2_io.h
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/ext2_io.h
9abd2ce914f9373fb676f0bb620ffba3a0e3c49e 16-Feb-1998 Theodore Ts'o <tytso@mit.edu> ChangeLog, bmove.c, ext2_io.h, ext2fs.h, rw_bitmaps.c, test_io.c:
ext2_io.h, ext2fs.h: Protect against being included multiple times.
bmove.c: #include ext2fsP.h instead of "ext2fs/ext2fs.h"
test_io.c (test_flush): Add a debugging printf when the flush method
is called.
rw_bitmaps.c (ext2fs_read_bitmaps): If the bitmaps are already read
in, return right away.
/external/e2fsprogs/lib/ext2fs/ext2_io.h
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/ext2_io.h