e2fsprogs/lib/ext2fs
Eric Sandeen 9fd6a96d9b libext2fs: Teach extent.c how to split nodes
When called for a given handle, the new function extent_node_split()
will split the current node such that half of the node's entries will
be moved to a new tree block.  The parent will then be updated to
point to the (now smaller) original node as well as the new node.

If the root node is requested to be split, it will move all
entries out to a new node, and leave a single entry in the
root pointing to that new node.

If the reqested split node's parent is full it will recursively
split up to the root to make room for the new node's insertion.

If you ask to split a non-root node with only one entry,
it will refuse (we'd have an empty node otherwise).

It also updates the i_blocks count when a new block has
successfully been connected to the tree.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2008-06-02 10:13:59 -04:00
..
tdb Update to latest samba tdb library before LGPLv3 change 2008-02-17 17:35:54 -05:00
Makefile.in libext2fs: Add undo I/O manager 2008-04-27 19:40:46 -04:00
Makefile.pq Many files: 1997-11-14 05:23:04 +00:00
alloc.c Fix memory leak in ext2fs_alloc_block() 2008-02-19 08:40:27 -05:00
alloc_sb.c Transfer responsibility of setting the *_UNINIT flags to libext2fs 2008-04-21 01:39:23 -04:00
alloc_stats.c Transfer responsibility of setting the *_UNINIT flags to libext2fs 2008-04-21 01:39:23 -04:00
alloc_tables.c mke2fs: New bitmap and inode table allocation for FLEX_BG 2008-04-22 23:32:16 -04:00
badblocks.c libext2fs: Add checks to prevent integer overflows passed to malloc() 2007-12-05 21:01:35 -05:00
bb_compat.c Many files: 2001-05-14 11:35:52 +00:00
bb_inode.c Add support for the HUGE_FILE feature 2008-04-17 16:38:13 -04:00
bitmaps.c libext2fs: 32-bit bitmap refactorization, part 3 2007-07-23 04:32:48 -04:00
bitops.c libext2fs: 32-bit bitmap refactorization, part 1 2007-07-22 22:59:50 -04:00
bitops.h Fix a couple of implicit function declarations 2008-04-06 17:20:12 -04:00
block.c Fix miscellaneous gcc -Wall warnings 2008-03-17 23:17:13 -04:00
bmap.c Add support for the HUGE_FILE feature 2008-04-17 16:38:13 -04:00
bmove.c libext2fs: Add checks to prevent integer overflows passed to malloc() 2007-12-05 21:01:35 -05:00
brel.h Many files: 2001-01-11 04:54:39 +00:00
brel_ma.c libext2fs: Add checks to prevent integer overflows passed to malloc() 2007-12-05 21:01:35 -05:00
check_desc.c Relax group descriptor checking for FLEX_BG 2007-11-03 20:13:16 -04:00
closefs.c Add comments documenting ext2fs_[reserve_]super_and_bgd_loc() 2008-04-20 19:22:49 -04:00
crc16.c Add initial checksum support for the gdt_checksum/uninit_group feature 2008-03-20 15:32:11 -04:00
crc16.h Add initial checksum support for the gdt_checksum/uninit_group feature 2008-03-20 15:32:11 -04:00
csum.c Transfer responsibility of setting the *_UNINIT flags to libext2fs 2008-04-21 01:39:23 -04:00
dblist.c Fix miscellaneous gcc -Wall warnings 2008-03-17 23:17:13 -04:00
dblist_dir.c ext2fs_dblist_dir_iterate: Fix ABORT propagation logic 2007-09-23 11:39:24 -04:00
dir_iterate.c libext2: Add BLOCK_FLAG_READ_ONLY flag to ext2fs_block_iterate2() 2008-02-10 08:04:09 -05:00
dirblock.c Clean up libext2fs by byte swapping iff WORDS_BIGENDIAN 2007-08-11 01:59:13 -04:00
dirhash.c Add directory hashed signed/unsigned hint to superblock 2006-11-11 22:32:35 -05:00
dosio.c ChangeLog, wordwrap.pl: 2001-06-01 23:49:46 +00:00
dosio.h Many files: 1997-08-11 20:29:22 +00:00
dupfs.c libext2fs: Add checks to prevent integer overflows passed to malloc() 2007-12-05 21:01:35 -05:00
e2image.h Many files: 2001-05-03 04:02:29 +00:00
expanddir.c Add support for the HUGE_FILE feature 2008-04-17 16:38:13 -04:00
ext2_err.et.in libext2fs: Teach extent.c how to split nodes 2008-06-02 10:13:59 -04:00
ext2_ext_attr.h Fix gcc -Wall complaints in libext2fs 2006-11-14 23:14:12 -05:00
ext2_fs.h ext2fs.h: Add l_i_file_acl_high and l_version_hi to on-disk inode structure 2008-05-15 22:14:52 -04:00
ext2_io.h libext2fs: Add undo I/O manager 2008-04-27 19:40:46 -04:00
ext2_types.h.in Fix asm_types.h type conflicts 2006-04-09 08:41:55 -04:00
ext2fs.h ext2fs_add_journal_inode: Optimize writing the journal data blocks 2008-04-27 19:42:23 -04:00
ext2fs.pc.in Add pkg-config files to e2fsprogs's libraries. 2005-01-26 12:59:25 -05:00
ext2fsP.h Add support to e2fsck to reindex directories to use hash trees. 2002-07-20 00:28:07 -04:00
ext3_extents.h Add support for extents to libext2fs 2008-02-18 20:05:35 -05:00
ext_attr.c Improve support for in-inode EA's 2008-02-18 21:20:26 -05:00
extent.c libext2fs: Teach extent.c how to split nodes 2008-06-02 10:13:59 -04:00
extent_dbg.ct libext2fs: Teach extent.c how to split nodes 2008-06-02 10:13:59 -04:00
fileio.c libext2fs: Add checks to prevent integer overflows passed to malloc() 2007-12-05 21:01:35 -05:00
finddev.c finddev.c (scan_dir): Fix memory leak; we weren't calling 2001-07-29 12:01:09 -04:00
flushb.c Re-add FreeBSD support. 2003-12-28 18:21:26 +01:00
freefs.c libext2fs: 32-bit bitmap refactorization, part 1 2007-07-22 22:59:50 -04:00
gen_bitmap.c libext2fs: 32-bit bitmap refactorization, part 3 2007-07-23 04:32:48 -04:00
get_pathname.c Fix gcc -Wall nitpicks 2003-12-07 01:28:50 -05:00
getsectsize.c getsectsize.c (BLKSSZGET): Clean up test for when to manually 2005-06-19 23:11:09 -04:00
getsize.c ext2fs_get_device_size(): Fix potential fd descriptor leak in an error case 2007-04-18 21:37:42 -04:00
i_block.c Add support for the HUGE_FILE feature 2008-04-17 16:38:13 -04:00
icount.c libext2fs: Make icount use a 32-bit counter 2008-03-15 01:39:19 -04:00
imager.c libext2fs: 32-bit bitmap refactorization, part 3 2007-07-23 04:32:48 -04:00
ind_block.c Fix miscellaneous gcc -Wall warnings 2008-03-17 23:17:13 -04:00
initialize.c mke2fs: New bitmap and inode table allocation for FLEX_BG 2008-04-22 23:32:16 -04:00
inline.c Many files: 2001-05-14 11:35:52 +00:00
inode.c ext2fs_open_inode_scan: Handle an non-zero bg_itable_used in block group 0 2008-04-22 23:22:17 -04:00
inode_io.c Add {read,write}_blk64 to inode_io.c 2008-03-13 13:47:05 -04:00
io_manager.c Add support for passing options to the io layer using the URL syntax. For 2004-11-30 14:07:11 -05:00
irel.h Many files: 2001-01-11 04:54:39 +00:00
irel_ma.c libext2fs: Add checks to prevent integer overflows passed to malloc() 2007-12-05 21:01:35 -05:00
ismounted.c Merge branch 'maint' into next 2007-12-09 17:03:01 -05:00
jfs_compat.h Fix gcc -Wall nitpicks 2003-12-07 01:28:50 -05:00
jfs_dat.h ChangeLog, Makefile.in, ext2_err.et.in, ext2fs.h, jfs_dat.h, mkjournal.c: 2000-10-24 18:33:16 +00: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 Fix gcc -Wall complaints in libext2fs 2006-11-14 23:14:12 -05:00
kernel-list.h Lots of small random portability fixes to make e2fsprogs build 2002-02-12 02:34:44 -05:00
link.c link.c (ext2fs_link): When adding a new link to a directory, 2002-07-29 19:26:33 -04:00
llseek.c Use lseek() instead of llseek() of sizeof(long) == sizeof(long long) 2008-01-27 00:35:32 -05:00
lookup.c Fix gcc -Wall nitpicks 2003-12-07 01:28:50 -05:00
mkdir.c Add support for the HUGE_FILE feature 2008-04-17 16:38:13 -04:00
mkjournal.c ext2fs_add_journal_inode: Optimize writing the journal data blocks 2008-04-27 19:42:23 -04:00
namei.c Fix gcc -Wall complaints in libext2fs 2006-11-14 23:14:12 -05:00
native.c ChangeLog, Makefile.in, swapfs.c, unix.c: 2001-06-11 07:00:04 +00:00
newdir.c ext2fs_getmem(), ext2fs_free_mem(), and ext2fs_resize_mem() 2003-08-01 09:41:07 -04:00
nt_io.c Many files: 2001-05-14 11:35:52 +00:00
openfs.c Add uninit block group support to various libext2fs functions 2008-03-20 15:33:12 -04:00
read_bb.c Add support for the HUGE_FILE feature 2008-04-17 16:38:13 -04:00
read_bb_file.c Fix various gcc -Wall complaints. 2005-12-10 21:50:30 -05:00
res_gdt.c Add support for the HUGE_FILE feature 2008-04-17 16:38:13 -04:00
rw_bitmaps.c Remove LAZY_BG feature 2008-04-20 23:33:34 -04:00
sparse.c Add support for on-line resizing ala the resize inode. This patch 2004-12-15 14:39:16 -05:00
swapfs.c libext2fs: Fix byte-swap logic for i_block[] in inodes with extents 2008-03-24 08:25:40 -04:00
tdb.c Update to latest samba tdb library before LGPLv3 change 2008-02-17 17:35:54 -05:00
tdb.h Update to latest samba tdb library before LGPLv3 change 2008-02-17 17:35:54 -05:00
tdbtool.c Add tdb from Samba into libext2fs library. 2007-04-04 21:26:37 -04:00
test_io.c Add 64-bit support to the test_io manager 2008-05-24 19:17:01 -04:00
tst_badblocks.c Fix signed vs unsigned printf format strings for block and inode numbers 2006-09-12 14:56:15 -04:00
tst_bitops.c Fix gcc -Wall warnings, especially on 64-bit systems 2007-05-25 11:18:11 -04:00
tst_byteswap.c Fix various gcc -Wall complaints. 2002-03-07 23:52:56 -05:00
tst_csum.c libext2fs: Fix big-endian bug in tst_csum.c 2008-04-01 17:03:00 -04:00
tst_getsectsize.c mke2fs.c (PRS, set_fs_defaults): If the sector size of the 2003-05-21 17:28:29 -04:00
tst_getsize.c Fix signed vs unsigned printf format strings for block and inode numbers 2006-09-12 14:56:15 -04:00
tst_iscan.c Fix signed vs unsigned printf format strings for block and inode numbers 2006-09-12 14:56:15 -04:00
tst_super_size.c Add test to make sure the ext2 superblock structure is 1024 bytes 2007-05-31 12:39:02 -04:00
tst_types.c Fix gcc -Wall warnings, especially on 64-bit systems 2007-05-25 11:18:11 -04:00
undo_io.c libext2fs: Add undo I/O manager 2008-04-27 19:40:46 -04:00
unix_io.c Add {read,write}_blk64 to unix_io.c 2008-03-13 13:46:58 -04:00
unlink.c libext2fs: Fix a corner case bug in ext2fs_unlink 2007-12-02 05:25:30 -05:00
valid_blk.c valid_blk.c (ext2fs_inode_has_valid_blocks): Fix bug which 2002-08-20 01:14:30 -04:00
version.c Stop after the second '.' when parsing version numbers 2007-07-08 12:37:13 -04:00
write_bb_file.c Fix signed vs unsigned printf format strings for block and inode numbers 2006-09-12 14:56:15 -04:00