Semantic patches... a very interesting idea. On Aug 04, 2009 14:18 -0400, Valerie Aurora wrote: > // Free blocks > -fs->group_desc[group].bg_free_blocks_count++ > +ext2fs_bg_free_blocks_count_set(fs, group, ext2fs_bg_free_blocks_count(fs, group)+1) > | > -fs->group_desc[group].bg_free_blocks_count-- > +ext2fs_bg_free_blocks_count_set(fs, group, ext2fs_bg_free_blocks_count(fs, group)-1) > | > -fs->group_desc[group].bg_free_blocks_count += i > +ext2fs_bg_free_blocks_count_set(fs, group, ext2fs_bg_free_blocks_count(fs, group)+i) > | > -fs->group_desc[group].bg_free_blocks_count -= i > +ext2fs_bg_free_blocks_count_set(fs, group, ext2fs_bg_free_blocks_count(fs, group)-i) I wonder if it makes more sense for ext2fs to export functions like ext2fs_bg_free_blocks_count_add() and ext2fs_bg_free_blocks_count_sub()? > -fs->group_desc[group].bg_flags & flag > +ext2fs_bg_flag_test(fs, group, flag) > | > -fs->group_desc[group].bg_flags &= ~flag > +ext2fs_bg_flag_clear(fs, group, flag) > | > -fs->group_desc[group].bg_flags |= flag > +ext2fs_bg_flag_set(fs, group, flag) > | > -fs->group_desc[group].bg_flags = 0 > +ext2fs_bg_flags_clear(fs, group, 0) This last one looks like an error. To clear the flags you should use ext2fs_bg_flags_set(fs, group, 0), otherwise you are "clearing no flags". Cheers, Andreas -- Andreas Dilger Sr. Staff Engineer, Lustre Group Sun Microsystems of Canada, Inc. -- 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