add patch delete-useless-comments-about-ext4_move_extents
[ext4-patch-queue.git] / delete-useless-comments-about-ext4_move_extents
blobae6785d8f2f493353846ee6dc4d71aa58c1e5d75
1 ext4: delete useless comments about ext4_move_extents
3 From: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
5 In patch 'ext4: refactor ext4_move_extents code base',  Dmitry Monakhov has
6 refactored ext4_move_extents' implementation, but forgot to update the
7 corresponding comments, this patch will try to delete some useless comments.
9 Reviewed-by: Dmitry Monakhov <dmonakhov@openvz.org>
10 Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
11 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
12 ---
13  fs/ext4/move_extent.c | 59 ++++++---------------------------------------------
14  1 file changed, 6 insertions(+), 53 deletions(-)
16 diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
17 index 5d78063..9f2311b 100644
18 --- a/fs/ext4/move_extent.c
19 +++ b/fs/ext4/move_extent.c
20 @@ -120,33 +120,12 @@ out:
21  }
23  /**
24 - * mext_replace_branches - Replace original extents with new extents
25 - *
26 - * @handle:            journal handle
27 - * @orig_inode:                original inode
28 - * @donor_inode:       donor inode
29 - * @from:              block offset of orig_inode
30 - * @count:             block count to be replaced
31 - * @err:               pointer to save return value
32 - *
33 - * Replace original inode extents and donor inode extents page by page.
34 - * We implement this replacement in the following three steps:
35 - * 1. Save the block information of original and donor inodes into
36 - *    dummy extents.
37 - * 2. Change the block information of original inode to point at the
38 - *    donor inode blocks.
39 - * 3. Change the block information of donor inode to point at the saved
40 - *    original inode blocks in the dummy extents.
41 - *
42 - * Return replaced block count.
43 - */
45 -/**
46   * mext_page_double_lock - Grab and lock pages on both @inode1 and @inode2
47   *
48   * @inode1:    the inode structure
49   * @inode2:    the inode structure
50 - * @index:     page index
51 + * @index1:    page index
52 + * @index2:    page index
53   * @page:      result page vector
54   *
55   * Grab two locked pages for inode's by inode order
56 @@ -266,13 +245,14 @@ out:
57   * @o_filp:                    file structure of original file
58   * @donor_inode:               donor inode
59   * @orig_page_offset:          page index on original file
60 + * @donor_page_offset:         page index on donor file
61   * @data_offset_in_page:       block index where data swapping starts
62   * @block_len_in_page:         the number of blocks to be swapped
63   * @unwritten:                 orig extent is unwritten or not
64   * @err:                       pointer to save return value
65   *
66   * Save the data in original inode blocks and replace original inode extents
67 - * with donor inode extents by calling mext_replace_branches().
68 + * with donor inode extents by calling ext4_swap_extents().
69   * Finally, write out the saved data in new original inode blocks. Return
70   * replaced block count.
71   */
72 @@ -551,41 +531,14 @@ mext_check_arguments(struct inode *orig_inode,
73   *
74   * @o_filp:            file structure of the original file
75   * @d_filp:            file structure of the donor file
76 - * @orig_start:                start offset in block for orig
77 - * @donor_start:       start offset in block for donor
78 + * @orig_blk:          start offset in block for orig
79 + * @donor_blk:         start offset in block for donor
80   * @len:               the number of blocks to be moved
81   * @moved_len:         moved block length
82   *
83   * This function returns 0 and moved block length is set in moved_len
84   * if succeed, otherwise returns error value.
85   *
86 - * Note: ext4_move_extents() proceeds the following order.
87 - * 1:ext4_move_extents() calculates the last block number of moving extent
88 - *   function by the start block number (orig_start) and the number of blocks
89 - *   to be moved (len) specified as arguments.
90 - *   If the {orig, donor}_start points a hole, the extent's start offset
91 - *   pointed by ext_cur (current extent), holecheck_path, orig_path are set
92 - *   after hole behind.
93 - * 2:Continue step 3 to step 5, until the holecheck_path points to last_extent
94 - *   or the ext_cur exceeds the block_end which is last logical block number.
95 - * 3:To get the length of continues area, call mext_next_extent()
96 - *   specified with the ext_cur (initial value is holecheck_path) re-cursive,
97 - *   until find un-continuous extent, the start logical block number exceeds
98 - *   the block_end or the extent points to the last extent.
99 - * 4:Exchange the original inode data with donor inode data
100 - *   from orig_page_offset to seq_end_page.
101 - *   The start indexes of data are specified as arguments.
102 - *   That of the original inode is orig_page_offset,
103 - *   and the donor inode is also orig_page_offset
104 - *   (To easily handle blocksize != pagesize case, the offset for the
105 - *   donor inode is block unit).
106 - * 5:Update holecheck_path and orig_path to points a next proceeding extent,
107 - *   then returns to step 2.
108 - * 6:Release holecheck_path, orig_path and set the len to moved_len
109 - *   which shows the number of moved blocks.
110 - *   The moved_len is useful for the command to calculate the file offset
111 - *   for starting next move extent ioctl.
112 - * 7:Return 0 on success, or a negative error value on failure.
113   */
114  int
115  ext4_move_extents(struct file *o_filp, struct file *d_filp, __u64 orig_blk,
116 -- 
117 1.8.3.1