e2fsprogs/lib/ext2fs
Zheng Liu 716a3c3536 libext2fs: handle inline_data in block iterator function
After applied this commit (a7f4c635), we have banned to traverse blocks
for an inode which has inline data because no block belongs to it.  But
before calling this function, we need to check inline data flag.  This
commit add a sanity check ext2fs_inode_has_valid_blocks2() to fix them
except that ext2fs_expand_dir because it will be fixed by another patch.

Meanwhile in this commit it fixes a bug that when we kill a file we
could leak an inode.

Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-03-04 08:46:13 -05:00
..
tdb Update to latest samba tdb library before LGPLv3 change 2008-02-17 17:35:54 -05:00
Makefile.in libext2fs: handle inline data in dir iterator function 2014-03-04 08:46:08 -05:00
Makefile.pq libext2fs: handle inline data in dir iterator function 2014-03-04 08:46:08 -05:00
alloc.c Merge branch 'maint' into next 2014-01-30 19:05:16 -05:00
alloc_sb.c libext2fs: no need to clear BLOCK_UNINIT during ext2fs_reserve_super_and_bgd 2014-01-11 14:15:51 -05:00
alloc_stats.c Merge branch 'maint' into next 2014-01-30 19:05:16 -05:00
alloc_tables.c Merge branch 'maint' into next 2014-01-30 19:05:16 -05:00
badblocks.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
bb_compat.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
bb_inode.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
bitmaps.c libext2fs: add default_bitmap_type to the ext2_filsys structure 2011-12-18 00:28:43 -05:00
bitops.c libext2fs: fix gcc -Wall warnings 2013-05-19 18:50:10 -04:00
bitops.h libext2fs: add ext2fs_find_first_set_{block,inode}_bitmap2() 2014-01-13 14:02:06 -05:00
blkmap64_ba.c Merge branch 'maint' into next 2014-01-30 19:05:16 -05:00
blkmap64_rb.c Merge branch 'maint' into next 2014-02-20 21:39:29 -05:00
blknum.c Merge branch 'maint' into next 2013-12-26 00:30:56 -05:00
block.c libext2fs: handle inline_data in block iterator by returning an error code 2013-10-13 21:43:41 -04:00
bmap.c libext2fs: don't hang on to unmapped block if extent tree update fails 2014-02-06 15:32:20 -05:00
bmap64.h Merge branch 'maint' into next 2014-01-30 19:05:16 -05:00
bmove.c libext2fs: ext2fs_[set_]file_acl_block needs to check for 64-bit feature flag 2011-10-16 20:46:49 -04:00
brel.h e2fsprogs: fix inode and block relocation functions to use blk64_t 2013-10-07 09:57:43 -04:00
brel_ma.c e2fsprogs: fix inode and block relocation functions to use blk64_t 2013-10-07 09:57:43 -04:00
check_desc.c e2fsck: verify s_desc_size is power-of-two value 2013-12-23 16:03:46 -05:00
closefs.c Merge branch 'maint' into next 2014-01-30 19:05:16 -05:00
crc16.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
crc16.h Fix compiling under diet libc 2008-09-12 09:10:39 -04:00
crc32c.c libext2fs: fix gcc -Wall nits 2013-05-19 22:12:36 -04:00
crc32c_defs.h libext2fs: optimize the CRC32c implementation 2012-08-02 20:47:46 -04:00
csum.c libext2fs: make ext2fs_group_desc_csum return 0 if meta_csum not enabled 2014-01-07 09:10:24 -05:00
dblist.c Merge branch 'maint' into next 2013-12-26 00:30:56 -05:00
dblist_dir.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
dir_iterate.c libext2fs: handle inline data in dir iterator function 2014-03-04 08:46:08 -05:00
dirblock.c libext2fs: add checksums to the end of directory leaf nodes 2012-08-02 17:27:43 -04:00
dirhash.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
dosio.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
dosio.h libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
dupfs.c libext2fs: ext2fs_dup_handle should not alias MMP buffers 2013-09-09 10:39:33 -04:00
e2image.h e2image: only skip writing zero blocks when writing to a new file 2013-12-26 00:21:08 -05:00
expanddir.c Merge branch 'maint' into next 2013-12-16 01:35:56 -05:00
ext2_err.et.in libext2fs: handle inline data in dir iterator function 2014-03-04 08:46:08 -05:00
ext2_ext_attr.h libext2fs: change ext4 on-disk layout to support metadata checksumming 2012-07-30 17:44:15 -04:00
ext2_fs.h libext2fs: handle inline data in dir iterator function 2014-03-04 08:46:08 -05:00
ext2_io.h libext2fs: factor out I/O buffer allocation 2012-05-07 14:41:49 -04:00
ext2_types.h.in build: use long long for __u64 by default 2013-12-15 22:10:09 -05:00
ext2fs.h libext2fs: handle inline data in dir iterator function 2014-03-04 08:46:08 -05:00
ext2fs.pc.in Change pkg-config files so that both <et/com_err.h> and <com_err.h> work 2012-05-14 12:45:54 -04:00
ext2fsP.h libext2fs: handle inline data in dir iterator function 2014-03-04 08:46:08 -05:00
ext3_extents.h libext2fs: change ext4 on-disk layout to support metadata checksumming 2012-07-30 17:44:15 -04:00
ext_attr.c libext2fs: free key/value pairs before reading 2014-02-23 23:08:43 -05:00
extent.c Merge branch 'maint' into next 2014-02-06 15:39:28 -05:00
fiemap.h Merge branch 'maint' into next 2010-06-07 12:42:40 -04:00
fileio.c Clean up sparse warnings 2013-12-16 18:56:36 -05:00
finddev.c libext2fs: enforce a max nested link count in ext2fs_find_block_device() 2011-11-19 23:11:20 -05:00
flushb.c libext2fs: check return values 2013-12-12 13:14:52 -05:00
freefs.c Merge branch 'maint' into next 2013-12-03 00:24:39 -05:00
gen_bitmap.c libext2fs: add ext2fs_find_first_set_{block,inode}_bitmap2() 2014-01-13 14:02:06 -05:00
gen_bitmap64.c Merge branch 'maint' into next 2014-01-30 19:05:16 -05:00
gen_crc32ctable.c libext2fs: optimize the CRC32c implementation 2012-08-02 20:47:46 -04:00
get_num_dirs.c libext2fs: move ext2fs_get_num_dirs to its own file 2012-07-30 17:19:15 -04:00
get_pathname.c libext2fs: provide functions to safely access name_len and file_type 2013-06-08 17:03:05 -04:00
getsectsize.c libext2fs: refactor Direct I/O alignment requirement calculations 2012-05-07 13:25:44 -04:00
getsize.c ext2fs, blkid: localize environment-specific variables 2012-11-26 09:34:20 -05:00
i_block.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
icount.c Save and restore umask around calls to mkstemp() 2014-01-09 15:18:44 -05:00
imager.c libext2fs: check return values 2013-12-12 13:14:52 -05:00
ind_block.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
initialize.c Merge branch 'maint' into next 2014-01-30 19:05:16 -05:00
inline.c tests: don't consider "make check" a compiler error 2012-12-29 17:13:24 -05:00
inline_data.c libext2fs: handle inline data in dir iterator function 2014-03-04 08:46:08 -05:00
inode.c Merge branch 'maint' into next 2013-10-12 22:26:28 -04:00
inode_io.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
io_manager.c libext2fs: factor out I/O buffer allocation 2012-05-07 14:41:49 -04:00
irel.h e2fsprogs: fix inode and block relocation functions to use blk64_t 2013-10-07 09:57:43 -04:00
irel_ma.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
ismounted.c mke2fs: disallow creating FS on a loop mounted file with no option 2013-12-16 00:48:54 -05:00
jfs_compat.h libext2fs: change on-disk journal layout to support metadata checksumming 2012-08-02 20:47:45 -04:00
jfs_dat.h Remove trailing whitespace for the entire source tree 2008-08-27 23:07:54 -04: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
kernel-jbd.h Merge branch 'maint' into next 2013-06-20 23:20:51 -04:00
kernel-list.h ext2fs,blkid: delete unused LIST_HEAD() macro 2013-12-15 23:26:39 -05:00
link.c Merge branch 'maint' into next 2013-10-23 20:17:35 -04:00
llseek.c libext2fs: fix ext2fs_llseek on i386 2013-01-24 23:04:01 -05:00
lookup.c libext2fs: provide functions to safely access name_len and file_type 2013-06-08 17:03:05 -04:00
mkdir.c libext2fs: add checksums to the end of directory leaf nodes 2012-08-02 17:27:43 -04:00
mkjournal.c libext2fs: add new function ext2fs_add_journal_inode2() 2014-01-30 13:58:17 -05:00
mmp.c Merge branch 'maint' into next 2013-12-26 00:30:56 -05:00
namei.c libext2fs: make symlinks safe for 64bit blocks and extents 2013-12-12 12:48:39 -05:00
native.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
newdir.c Merge branch 'maint' into next 2013-12-12 15:39:14 -05:00
nt_io.c libe2p, libext2fs: Update file copyright permission states to match COPYING 2010-05-17 23:04:39 -04:00
openfs.c Merge branch 'maint' into next 2014-02-20 21:39:29 -05:00
progress.c Merge branch 'maint' into next 2012-09-22 21:35:46 -04:00
punch.c libext2fs: during punch, fix parent extents after modifying extent 2014-02-06 15:31:03 -05:00
qcow2.c libext2fs: fix potential memory leak in qcow2_write_raw_image() 2014-01-05 22:58:16 -05:00
qcow2.h e2image: Add support for qcow2 format 2011-05-18 11:51:06 -04:00
rbtree.c libext2fs: fix gcc -Wall warnings 2013-05-19 18:50:10 -04:00
rbtree.h libext2fs: fix gcc -Wall warnings 2013-05-19 18:50:10 -04:00
read_bb.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
read_bb_file.c libext2fs: reject 64bit badblocks numbers 2013-10-23 19:56:21 -04:00
res_gdt.c Add support for new compat feature "sparse_super2" 2014-01-30 13:58:18 -05:00
rw_bitmaps.c Merge branch 'maint' into next 2014-01-30 19:05:16 -05:00
swapfs.c libext2fs: handle inline data in dir iterator function 2014-03-04 08:46:08 -05:00
symlink.c libext2fs: delete unused "handle" variable 2014-02-20 20:49:43 -05:00
tdb.c libext2fs: change getpagesize to sysconf 2012-01-09 21:19:48 -05:00
tdb.h libext2fs: don't leak tdb_null out of the shared library namespace 2011-11-05 14:55:30 -04:00
tdbtool.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
test_io.c ext2fs: declare struct_io_manager at end of file 2014-02-18 18:31:43 -05:00
tst_badblocks.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
tst_bitmaps.c libext2fs: add ext2fs_find_first_set_{block,inode}_bitmap2() 2014-01-13 14:02:06 -05:00
tst_bitmaps_cmd.ct libext2fs: add ext2fs_find_first_set_{block,inode}_bitmap2() 2014-01-13 14:02:06 -05:00
tst_bitmaps_cmds libext2fs: add ext2fs_find_first_set_{block,inode}_bitmap2() 2014-01-13 14:02:06 -05:00
tst_bitmaps_exp libext2fs: add ext2fs_find_first_set_{block,inode}_bitmap2() 2014-01-13 14:02:06 -05:00
tst_bitops.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
tst_byteswap.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
tst_fs_struct.c tst_fs_struct: add program to help check ABI compatibility of ext2fs_filsys 2011-11-25 21:16:38 -05:00
tst_getsectsize.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
tst_getsize.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
tst_inode_size.c Allow e2fsprogs to be built using the clang (LLVM) frontend 2012-09-09 21:35:39 -04:00
tst_iscan.c libext2fs: fix printf conversion spec in tst_iscan.c 2013-12-02 23:37:08 -05:00
tst_super_size.c Merge branch 'maint' into next 2014-01-30 19:05:16 -05:00
tst_types.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
undo_io.c ext2fs: declare struct_io_manager at end of file 2014-02-18 18:31:43 -05:00
unix_io.c ext2fs: declare struct_io_manager at end of file 2014-02-18 18:31:43 -05:00
unlink.c libext2fs: provide functions to safely access name_len and file_type 2013-06-08 17:03:05 -04:00
valid_blk.c libext2fs: handle inline_data in block iterator function 2014-03-04 08:46:13 -05:00
version.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00
write_bb_file.c Shorten compile commands run by the build system 2011-09-18 17:34:37 -04:00