From: Dmitry Monakhov <dmonakhov@openvz.org>
To: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>, linux-ext4@vger.kernel.org
Cc: tytso@mit.edu, Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Subject: Re: [PATCH] ext4: delete useless comments about ext4_move_extents
Date: Tue, 07 Oct 2014 13:42:09 +0400 [thread overview]
Message-ID: <878uks8bda.fsf@openvz.org> (raw)
In-Reply-To: <1412670990-12903-1-git-send-email-wangxg.fnst@cn.fujitsu.com>
[-- Attachment #1: Type: text/plain, Size: 5444 bytes --]
Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com> writes:
> In patch 'ext4: refactor ext4_move_extents code base', Dmitry Monakhov has
> refactored ext4_move_extents' implementation, but forgot to update the
> corresponding comments, this patch will try to delete some useless comments.
>
> Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Ohh, yes thank you.
You can add reviewed-by: Dmitry Monakhov <dmonakhov@openvz.org>
> ---
> fs/ext4/move_extent.c | 59 ++++++---------------------------------------------
> 1 file changed, 6 insertions(+), 53 deletions(-)
>
> diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
> index 5d78063..9f2311b 100644
> --- a/fs/ext4/move_extent.c
> +++ b/fs/ext4/move_extent.c
> @@ -120,33 +120,12 @@ out:
> }
>
> /**
> - * mext_replace_branches - Replace original extents with new extents
> - *
> - * @handle: journal handle
> - * @orig_inode: original inode
> - * @donor_inode: donor inode
> - * @from: block offset of orig_inode
> - * @count: block count to be replaced
> - * @err: pointer to save return value
> - *
> - * Replace original inode extents and donor inode extents page by page.
> - * We implement this replacement in the following three steps:
> - * 1. Save the block information of original and donor inodes into
> - * dummy extents.
> - * 2. Change the block information of original inode to point at the
> - * donor inode blocks.
> - * 3. Change the block information of donor inode to point at the saved
> - * original inode blocks in the dummy extents.
> - *
> - * Return replaced block count.
> - */
> -
> -/**
> * mext_page_double_lock - Grab and lock pages on both @inode1 and @inode2
> *
> * @inode1: the inode structure
> * @inode2: the inode structure
> - * @index: page index
> + * @index1: page index
> + * @index2: page index
> * @page: result page vector
> *
> * Grab two locked pages for inode's by inode order
> @@ -266,13 +245,14 @@ out:
> * @o_filp: file structure of original file
> * @donor_inode: donor inode
> * @orig_page_offset: page index on original file
> + * @donor_page_offset: page index on donor file
> * @data_offset_in_page: block index where data swapping starts
> * @block_len_in_page: the number of blocks to be swapped
> * @unwritten: orig extent is unwritten or not
> * @err: pointer to save return value
> *
> * Save the data in original inode blocks and replace original inode extents
> - * with donor inode extents by calling mext_replace_branches().
> + * with donor inode extents by calling ext4_swap_extents().
> * Finally, write out the saved data in new original inode blocks. Return
> * replaced block count.
> */
> @@ -551,41 +531,14 @@ mext_check_arguments(struct inode *orig_inode,
> *
> * @o_filp: file structure of the original file
> * @d_filp: file structure of the donor file
> - * @orig_start: start offset in block for orig
> - * @donor_start: start offset in block for donor
> + * @orig_blk: start offset in block for orig
> + * @donor_blk: start offset in block for donor
> * @len: the number of blocks to be moved
> * @moved_len: moved block length
> *
> * This function returns 0 and moved block length is set in moved_len
> * if succeed, otherwise returns error value.
> *
> - * Note: ext4_move_extents() proceeds the following order.
> - * 1:ext4_move_extents() calculates the last block number of moving extent
> - * function by the start block number (orig_start) and the number of blocks
> - * to be moved (len) specified as arguments.
> - * If the {orig, donor}_start points a hole, the extent's start offset
> - * pointed by ext_cur (current extent), holecheck_path, orig_path are set
> - * after hole behind.
> - * 2:Continue step 3 to step 5, until the holecheck_path points to last_extent
> - * or the ext_cur exceeds the block_end which is last logical block number.
> - * 3:To get the length of continues area, call mext_next_extent()
> - * specified with the ext_cur (initial value is holecheck_path) re-cursive,
> - * until find un-continuous extent, the start logical block number exceeds
> - * the block_end or the extent points to the last extent.
> - * 4:Exchange the original inode data with donor inode data
> - * from orig_page_offset to seq_end_page.
> - * The start indexes of data are specified as arguments.
> - * That of the original inode is orig_page_offset,
> - * and the donor inode is also orig_page_offset
> - * (To easily handle blocksize != pagesize case, the offset for the
> - * donor inode is block unit).
> - * 5:Update holecheck_path and orig_path to points a next proceeding extent,
> - * then returns to step 2.
> - * 6:Release holecheck_path, orig_path and set the len to moved_len
> - * which shows the number of moved blocks.
> - * The moved_len is useful for the command to calculate the file offset
> - * for starting next move extent ioctl.
> - * 7:Return 0 on success, or a negative error value on failure.
> */
> int
> ext4_move_extents(struct file *o_filp, struct file *d_filp, __u64 orig_blk,
> --
> 1.8.3.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: Type: application/pgp-signature, Size: 818 bytes --]
next prev parent reply other threads:[~2014-10-07 9:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-07 8:36 [PATCH] ext4: delete useless comments about ext4_move_extents Xiaoguang Wang
2014-10-07 9:42 ` Dmitry Monakhov [this message]
2014-10-11 23:57 ` Theodore Ts'o
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=878uks8bda.fsf@openvz.org \
--to=dmonakhov@openvz.org \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=wangxg.fnst@cn.fujitsu.com \
/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).