linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Jan Kara <jack@suse.com>,
	linux-ext4@vger.kernel.org, Ted Tso <tytso@mit.edu>,
	Jan Kara <jack@suse.cz>
Subject: Re: [PATCH 08/19] ext2fs: Implement block moving in libext2fs
Date: Wed, 26 Aug 2015 17:55:22 +0200	[thread overview]
Message-ID: <20150826155522.GC14012@quack.suse.cz> (raw)
In-Reply-To: <20150807155514.GF10037@birch.djwong.org>

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@suse.cz>
> > 
> > Signed-off-by: Jan Kara <jack@suse.cz>
> 
> <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@suse.com>
SUSE Labs, CR

  reply	other threads:[~2015-08-26 15:55 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-07 10:51 [PATCH 00/19] e2fsprogs: Resizing rewrite Jan Kara
2015-08-07 10:51 ` [PATCH 01/19] ext2fs: Move function to initialize uninitialized bitmaps to libext2fs Jan Kara
2015-08-07 10:51 ` [PATCH 02/19] ext2fs: Use range marking function to mark all inode table blocks as used Jan Kara
2015-08-07 10:51 ` [PATCH 03/19] ext2fs: Add pointer to allocator private data into ext2_filsys Jan Kara
2015-08-07 10:51 ` [PATCH 04/19] ext2fs: Implement ext2fs_allocate_group_table2() Jan Kara
2015-08-07 10:51 ` [PATCH 05/19] resize2fs: Use ext2fs_allocate_group_table2() Jan Kara
2015-08-07 10:51 ` [PATCH 06/19] ext2fs: Make ext2fs_reserve_super_and_bgd() clear block_uninit flag Jan Kara
2015-08-07 10:51 ` [PATCH 07/19] ext2fs: Provide helper for wiping resize inode Jan Kara
2015-08-07 10:51 ` [PATCH 08/19] ext2fs: Implement block moving in libext2fs Jan Kara
2015-08-07 15:55   ` Darrick J. Wong
2015-08-26 15:55     ` Jan Kara [this message]
2015-08-07 10:51 ` [PATCH 09/19] ext2fs: Implement inode " Jan Kara
2015-08-07 10:51 ` [PATCH 10/19] tune2fs: Implement setting and disabling of 64-bit feature Jan Kara
2015-08-07 15:32   ` Darrick J. Wong
2015-08-07 15:42     ` Darrick J. Wong
2015-08-26 15:51       ` Jan Kara
2015-08-07 10:51 ` [PATCH 11/19] mke2fs: Allow specifying number of reserved inodes Jan Kara
2015-08-07 15:37   ` Darrick J. Wong
2015-08-26 15:49     ` Jan Kara
2015-08-07 10:51 ` [PATCH 12/19] libext2fs: Bump default number of reserved inodes to 64 Jan Kara
2015-08-07 10:58   ` Alexey Lyashkov
2015-08-07 11:03     ` Jan Kara
2015-08-07 18:11       ` Alexey Lyashkov
2015-08-07 19:11   ` Andreas Dilger
2015-08-26 15:58     ` Jan Kara
2015-08-07 10:51 ` [PATCH 13/19] tune2fs: Add support for changing number of reserved inodes Jan Kara
2015-08-07 18:58   ` Andreas Dilger
2015-08-26 16:11     ` Jan Kara
2015-08-08  7:45   ` Alexey Lyashkov
2015-08-26 16:07     ` Jan Kara
2015-08-07 10:51 ` [PATCH 14/19] resize2fs: Rip out 64-bit feature handling from resize2fs Jan Kara
2015-08-07 10:51 ` [PATCH 15/19] resize2fs: Remove duplicit condition Jan Kara
2015-08-07 19:01   ` Andreas Dilger
2015-08-26 16:12     ` Jan Kara
2015-08-07 10:51 ` [PATCH 16/19] ext2fs: Add extent dumping function to extent mapping code Jan Kara
2015-08-07 10:51 ` [PATCH 17/19] resize2fs: Remove " Jan Kara
2015-08-07 10:51 ` [PATCH 18/19] ext2fs: Move extent mapping test Jan Kara
2015-08-07 10:51 ` [PATCH 19/19] resize2fs: Use libextfs2 helpers for resizing Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150826155522.GC14012@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=darrick.wong@oracle.com \
    --cc=jack@suse.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).