On Fri 07-08-15 08:55:14, Darrick J. Wong wrote: > On Fri, Aug 07, 2015 at 12:51:18PM +0200, Jan Kara wrote: > > From: Jan Kara <jack@xxxxxxx> > > > > Signed-off-by: Jan Kara <jack@xxxxxxx> > > <snip> > > > diff --git a/lib/ext2fs/extent_map.c b/lib/ext2fs/extent_map.c > > new file mode 100644 > > index 000000000000..702172b24e2b > > --- /dev/null > > +++ b/lib/ext2fs/extent_map.c > > @@ -0,0 +1,233 @@ > > +/* > > + * extent.c --- ext2 extent mapping abstraction > > + * > > + * This abstraction is used to provide a compact way of representing a > > + * translation table, for moving multiple contiguous ranges (extents) > > + * of blocks or inodes. > > + * > > + * Copyright (C) 1997, 1998 by Theodore Ts'o and > > + * PowerQuest, Inc. > > + * > > + * Copyright (C) 1999, 2000 by Theosore Ts'o > > Ted should probably weigh in on this amazing coincidence in contributors :) > but this I suspect is a spelling error waiting a long time to be fixed. Fixed up. > > + * > > + * %Begin-Header% > > <snip> > > > diff --git a/lib/ext2fs/move.h b/lib/ext2fs/move.h > > new file mode 100644 > > index 000000000000..8d66aa039ec0 > > --- /dev/null > > +++ b/lib/ext2fs/move.h > > @@ -0,0 +1,23 @@ > > +#ifndef _EXT2FS_MOVE_H > > +#define _EXT2FS_MOVE_H > > + > > +#include "ext2fs.h" > > + > > +typedef struct _ext2_map_extent *ext2_map_extent; > > + > > +/* extent_map.c */ > > +extern int ext2fs_extent_table_empty(ext2_map_extent extent); > > +extern errcode_t ext2fs_create_extent_table(ext2_map_extent *ret_extent, > > + __u64 size); > > +extern void ext2fs_free_extent_table(ext2_map_extent extent); > > +extern errcode_t ext2fs_add_extent_entry(ext2_map_extent extent, > > + __u64 old_loc, __u64 new_loc); > > +extern __u64 ext2fs_extent_translate(ext2_map_extent extent, __u64 old_loc); > > +extern errcode_t ext2fs_iterate_extent(ext2_map_extent extent, __u64 *old_loc, > > + __u64 *new_loc, __u64 *size); > > + > > +/* move.c */ > > +errcode_t ext2fs_move_blocks(ext2_filsys fs, ext2fs_block_bitmap move_map, > > + ext2fs_block_bitmap reuse_map); > > + > > +#endif > > Hmm... are these functions intended for use by client programs? I'm accustomed > to looking in ext2fs.h for such functions. So block moving function is definitely for use by client programs. So I'll move that to ext2fs.h. Extent mapping functions could possibly be useful but no interface in libext2fs needs these as an input / output so I'd consider these internal. Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR -- 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