Skip to contentSkip to conversation

ext4: fix the comment in ext4_ext_insert_extent for ext4_ext_try_to_merge in extents.c

PATCH In review Wang Sheng-Hui 2 participants 3 messages Jul 6, 2012 – Jul 8, 2012 ext4 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ext4: fix the comment in ext4_ext_insert_extent for ext4_ext_try_to_merge in extents.c

The left and right extents merge is done by
ext4_ext_try_to_merge. No specific left/right
fun calls any more.

---
 fs/ext4/extents.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
fs/ext4/extents.c +1 -2
index 5207b7b..6c2a37d 100644
@@ -1891,12 +1891,10 @@ has_space:
 	nearex->ee_len = newext->ee_len;
 
 merge:
-	/* try to merge extents to the right */
+	/* try to merge extents to the neighbours */
 	if (!(flag & EXT4_GET_BLOCKS_PRE_IO))
 		ext4_ext_try_to_merge(inode, path, nearex);
 
-	/* try to merge extents to the left */
#1 lore raw

Hi Sheng-Hui,

It seems that there has a patch to fix it.
http://www.spinics.net/lists/linux-ext4/msg32611.html

Regards,
Zheng

Quoted 34 lines · Wang Sheng-Hui

The left and right extents merge is done by
ext4_ext_try_to_merge. No specific left/right
fun calls any more.

---
 fs/ext4/extents.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
fs/ext4/extents.c +1 -4
index 5207b7b..6c2a37d 100644
@@ -1891,12 +1891,10 @@ has_space:
        nearex->ee_len = newext->ee_len;
 
 merge:
-       /* try to merge extents to the right */
+       /* try to merge extents to the neighbours */
        if (!(flag & EXT4_GET_BLOCKS_PRE_IO))
                ext4_ext_try_to_merge(inode, path, nearex);
 
-       /* try to merge extents to the left */
-
        /* time to correct all indexes above */
        err = ext4_ext_correct_indexes(handle, inode, path);
        if (err)
--

1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 7 lines · Zheng Liu

Hi Sheng-Hui,

It seems that there has a patch to fix it.
http://www.spinics.net/lists/linux-ext4/msg32611.html

Regards,
Zheng

Got it.

I didn't track the patch list. Just checked the git tree.

Thanks,

Quoted 32 lines · Wang Sheng-Hui
Quoted 30 lines

The left and right extents merge is done by
ext4_ext_try_to_merge. No specific left/right
fun calls any more.

---
 fs/ext4/extents.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
fs/ext4/extents.c +1 -4
index 5207b7b..6c2a37d 100644
@@ -1891,12 +1891,10 @@ has_space:
        nearex->ee_len = newext->ee_len;
 
 merge:
-       /* try to merge extents to the right */
+       /* try to merge extents to the neighbours */
        if (!(flag & EXT4_GET_BLOCKS_PRE_IO))
                ext4_ext_try_to_merge(inode, path, nearex);
 
-       /* try to merge extents to the left */
-
        /* time to correct all indexes above */
        err = ext4_ext_correct_indexes(handle, inode, path);
        if (err)
--

1.7.1

Quoted 4 lines
Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html