Re: [PATCH 2/2] e2fsprogs: Add rbtree backend for bitmaps, use it instead of bitarrays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Oops, hit send by accident. 

On 2011-01-10, at 8:18, Lukas Czerner <lczerner@xxxxxxxxxx> wrote:
>> This commit adds another backend to store bitmaps. It is based on
>> rbtrees and it stores just used extents of bitmaps. It means that it can
>> be more memory efficient in most cases and also with a careful use it
>> might be much faster than simple bitarrays.
>> 
>> 
>> @@ -66,7 +66,7 @@ errcode_t ext2fs_allocate_inode_bitmap(ext2_filsys fs,
>>   if (fs->flags & EXT2_FLAG_64BITS)
>>       return (ext2fs_alloc_generic_bmap(fs,
>>                 EXT2_ET_MAGIC_INODE_BITMAP64,
>> -                  EXT2FS_BMAP64_BITARRAY,
>> +                  EXT2FS_BMAP64_RBTREE,
>>                 start, end, real_end, descr, ret));
> 

It would be really useful to allow runtime selection of bitmap type, ideally separately for block and inode bitmaps. This will allow easier testing of this patch on different filesystems, as well as allow users to select the bitmap the type for performance over space, if they have plenty of memory. 

Perhaps in the future by default e2fsck can select one type based on system memory vs. filesystem size?  That will be important if there continues to be a performance gap between the two types. 

>> +/*
>> 
>> +/*#define DEBUG*/
>> +
>> +#ifdef DEBUG
>> +static void print_tree(struct rb_root *root)

Probably should be DEBUG_RB or similar to allow separate enabling from other debug. 

Cheers, Andreas--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux