e2fsprogs/debugfs
Zheng Liu 54e880b870 libext2fs: handle inline data in read/write function
Currently ext2fs_file_read/write are used to copy data from/to a file.
But they manipulate data by blocksize.  For supporting inline data, we
handle it in two new fucntions called ext2fs_file_read/write_inline_data.

In read path the implementation is straightforward.  But in write path
things get more complicated because if the size of data is greater than
the maximum size of inline data we will expand this file.  So now we
will check this in ext2fs_inline_data_set.  If this inode doesn't have
enough space, it will return EXT2_ET_INLINE_DATA_NO_SPACE error.  Then
the caller will check this error and tries to expand the file.

The following commands in debugfs can handle inline_data feature after
applying this patch:
	- dump
	- cat
	- rdump
	- write

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-03-04 08:46:14 -05:00
..
Makefile.in Add coverage testing using gcov 2014-02-23 00:17:09 -05:00
debug_cmds.ct debugfs: add symlink command 2013-01-16 14:09:20 -05:00
debugfs.8.in Merge branch 'maint' into next 2013-12-28 23:27:39 -05:00
debugfs.c libext2fs: handle inline data in read/write function 2014-03-04 08:46:14 -05:00
debugfs.h debugfs: restore and tweak original error messaging 2013-12-30 16:56:19 -05:00
dump.c Merge branch 'maint' into next 2013-12-12 15:39:14 -05:00
extent_cmds.ct debugfs: add the ability to manipulate the extent tree directly 2012-12-24 10:49:41 -05:00
extent_inode.c debugfs: restore and tweak original error messaging 2013-12-30 16:56:19 -05:00
filefrag.c libext2fs: handle inline_data in block iterator function 2014-03-04 08:46:13 -05:00
htree.c libext2fs: provide functions to safely access name_len and file_type 2013-06-08 17:03:05 -04:00
icheck.c debugfs: restore and tweak original error messaging 2013-12-30 16:56:19 -05:00
jfs_user.h Move linux/jbd.h to ext2fs/kernel-jbd.h, to avoid using the 2001-12-23 19:33:51 -05:00
logdump.c Merge branch 'maint' into next 2014-01-06 06:58:58 -05:00
ls.c libext2fs: provide functions to safely access name_len and file_type 2013-06-08 17:03:05 -04:00
lsdel.c debugfs: make lsdel command support inline data 2014-03-04 08:46:14 -05:00
ncheck.c libext2fs: provide functions to safely access name_len and file_type 2013-06-08 17:03:05 -04:00
ro_debug_cmds.ct debugfs: add the ability to manipulate the extent tree directly 2012-12-24 10:49:41 -05:00
set_fields.c Merge branch 'maint' into next 2014-01-30 19:05:16 -05:00
unused.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
util.c debugfs: fix typo in commit 5a1d25a7b 2014-01-09 14:30:43 -05:00
zap.c debugfs: clean up debugfs man page and help text 2013-12-15 22:13:15 -05:00