Commit bdafe42a authored by Theodore Ts'o's avatar Theodore Ts'o

ext4: fix spelling errors and a comment in extent_status tree

Replace "assertation" with "assertion" in lots and lots of debugging
messages.

Correct the comment stating when ext4_es_insert_extent() is used.  It
was no doubt tree at one point, but it is no longer true...
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
Cc: Zheng Liu <gnehzuil.liu@gmail.com>
parent e8974c39
...@@ -439,7 +439,7 @@ static void ext4_es_insert_extent_ext_check(struct inode *inode, ...@@ -439,7 +439,7 @@ static void ext4_es_insert_extent_ext_check(struct inode *inode,
*/ */
if (!ext4_es_is_written(es) && !ext4_es_is_unwritten(es)) { if (!ext4_es_is_written(es) && !ext4_es_is_unwritten(es)) {
if (in_range(es->es_lblk, ee_block, ee_len)) { if (in_range(es->es_lblk, ee_block, ee_len)) {
pr_warn("ES insert assertation failed for " pr_warn("ES insert assertion failed for "
"inode: %lu we can find an extent " "inode: %lu we can find an extent "
"at block [%d/%d/%llu/%c], but we " "at block [%d/%d/%llu/%c], but we "
"want to add an delayed/hole extent " "want to add an delayed/hole extent "
...@@ -458,7 +458,7 @@ static void ext4_es_insert_extent_ext_check(struct inode *inode, ...@@ -458,7 +458,7 @@ static void ext4_es_insert_extent_ext_check(struct inode *inode,
*/ */
if (es->es_lblk < ee_block || if (es->es_lblk < ee_block ||
ext4_es_pblock(es) != ee_start + es->es_lblk - ee_block) { ext4_es_pblock(es) != ee_start + es->es_lblk - ee_block) {
pr_warn("ES insert assertation failed for inode: %lu " pr_warn("ES insert assertion failed for inode: %lu "
"ex_status [%d/%d/%llu/%c] != " "ex_status [%d/%d/%llu/%c] != "
"es_status [%d/%d/%llu/%c]\n", inode->i_ino, "es_status [%d/%d/%llu/%c]\n", inode->i_ino,
ee_block, ee_len, ee_start, ee_block, ee_len, ee_start,
...@@ -468,7 +468,7 @@ static void ext4_es_insert_extent_ext_check(struct inode *inode, ...@@ -468,7 +468,7 @@ static void ext4_es_insert_extent_ext_check(struct inode *inode,
} }
if (ee_status ^ es_status) { if (ee_status ^ es_status) {
pr_warn("ES insert assertation failed for inode: %lu " pr_warn("ES insert assertion failed for inode: %lu "
"ex_status [%d/%d/%llu/%c] != " "ex_status [%d/%d/%llu/%c] != "
"es_status [%d/%d/%llu/%c]\n", inode->i_ino, "es_status [%d/%d/%llu/%c]\n", inode->i_ino,
ee_block, ee_len, ee_start, ee_block, ee_len, ee_start,
...@@ -481,7 +481,7 @@ static void ext4_es_insert_extent_ext_check(struct inode *inode, ...@@ -481,7 +481,7 @@ static void ext4_es_insert_extent_ext_check(struct inode *inode,
* that we don't want to add an written/unwritten extent. * that we don't want to add an written/unwritten extent.
*/ */
if (!ext4_es_is_delayed(es) && !ext4_es_is_hole(es)) { if (!ext4_es_is_delayed(es) && !ext4_es_is_hole(es)) {
pr_warn("ES insert assertation failed for inode: %lu " pr_warn("ES insert assertion failed for inode: %lu "
"can't find an extent at block %d but we want " "can't find an extent at block %d but we want "
"to add an written/unwritten extent " "to add an written/unwritten extent "
"[%d/%d/%llu/%llx]\n", inode->i_ino, "[%d/%d/%llu/%llx]\n", inode->i_ino,
...@@ -519,7 +519,7 @@ static void ext4_es_insert_extent_ind_check(struct inode *inode, ...@@ -519,7 +519,7 @@ static void ext4_es_insert_extent_ind_check(struct inode *inode,
* We want to add a delayed/hole extent but this * We want to add a delayed/hole extent but this
* block has been allocated. * block has been allocated.
*/ */
pr_warn("ES insert assertation failed for inode: %lu " pr_warn("ES insert assertion failed for inode: %lu "
"We can find blocks but we want to add a " "We can find blocks but we want to add a "
"delayed/hole extent [%d/%d/%llu/%llx]\n", "delayed/hole extent [%d/%d/%llu/%llx]\n",
inode->i_ino, es->es_lblk, es->es_len, inode->i_ino, es->es_lblk, es->es_len,
...@@ -527,13 +527,13 @@ static void ext4_es_insert_extent_ind_check(struct inode *inode, ...@@ -527,13 +527,13 @@ static void ext4_es_insert_extent_ind_check(struct inode *inode,
return; return;
} else if (ext4_es_is_written(es)) { } else if (ext4_es_is_written(es)) {
if (retval != es->es_len) { if (retval != es->es_len) {
pr_warn("ES insert assertation failed for " pr_warn("ES insert assertion failed for "
"inode: %lu retval %d != es_len %d\n", "inode: %lu retval %d != es_len %d\n",
inode->i_ino, retval, es->es_len); inode->i_ino, retval, es->es_len);
return; return;
} }
if (map.m_pblk != ext4_es_pblock(es)) { if (map.m_pblk != ext4_es_pblock(es)) {
pr_warn("ES insert assertation failed for " pr_warn("ES insert assertion failed for "
"inode: %lu m_pblk %llu != " "inode: %lu m_pblk %llu != "
"es_pblk %llu\n", "es_pblk %llu\n",
inode->i_ino, map.m_pblk, inode->i_ino, map.m_pblk,
...@@ -549,7 +549,7 @@ static void ext4_es_insert_extent_ind_check(struct inode *inode, ...@@ -549,7 +549,7 @@ static void ext4_es_insert_extent_ind_check(struct inode *inode,
} }
} else if (retval == 0) { } else if (retval == 0) {
if (ext4_es_is_written(es)) { if (ext4_es_is_written(es)) {
pr_warn("ES insert assertation failed for inode: %lu " pr_warn("ES insert assertion failed for inode: %lu "
"We can't find the block but we want to add " "We can't find the block but we want to add "
"an written extent [%d/%d/%llu/%llx]\n", "an written extent [%d/%d/%llu/%llx]\n",
inode->i_ino, es->es_lblk, es->es_len, inode->i_ino, es->es_lblk, es->es_len,
...@@ -632,10 +632,8 @@ static int __es_insert_extent(struct inode *inode, struct extent_status *newes) ...@@ -632,10 +632,8 @@ static int __es_insert_extent(struct inode *inode, struct extent_status *newes)
} }
/* /*
* ext4_es_insert_extent() adds a space to a extent status tree. * ext4_es_insert_extent() adds information to an inode's extent
* * status tree.
* ext4_es_insert_extent is called by ext4_da_write_begin and
* ext4_es_remove_extent.
* *
* Return 0 on success, error code on failure. * Return 0 on success, error code on failure.
*/ */
......
...@@ -465,7 +465,7 @@ static void ext4_map_blocks_es_recheck(handle_t *handle, ...@@ -465,7 +465,7 @@ static void ext4_map_blocks_es_recheck(handle_t *handle,
if (es_map->m_lblk != map->m_lblk || if (es_map->m_lblk != map->m_lblk ||
es_map->m_flags != map->m_flags || es_map->m_flags != map->m_flags ||
es_map->m_pblk != map->m_pblk) { es_map->m_pblk != map->m_pblk) {
printk("ES cache assertation failed for inode: %lu " printk("ES cache assertion failed for inode: %lu "
"es_cached ex [%d/%d/%llu/%x] != " "es_cached ex [%d/%d/%llu/%x] != "
"found ex [%d/%d/%llu/%x] retval %d flags %x\n", "found ex [%d/%d/%llu/%x] retval %d flags %x\n",
inode->i_ino, es_map->m_lblk, es_map->m_len, inode->i_ino, es_map->m_lblk, es_map->m_len,
...@@ -558,7 +558,7 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode, ...@@ -558,7 +558,7 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode,
#ifdef ES_AGGRESSIVE_TEST #ifdef ES_AGGRESSIVE_TEST
if (retval != map->m_len) { if (retval != map->m_len) {
printk("ES len assertation failed for inode: %lu " printk("ES len assertion failed for inode: %lu "
"retval %d != map->m_len %d " "retval %d != map->m_len %d "
"in %s (lookup)\n", inode->i_ino, retval, "in %s (lookup)\n", inode->i_ino, retval,
map->m_len, __func__); map->m_len, __func__);
...@@ -659,7 +659,7 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode, ...@@ -659,7 +659,7 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode,
#ifdef ES_AGGRESSIVE_TEST #ifdef ES_AGGRESSIVE_TEST
if (retval != map->m_len) { if (retval != map->m_len) {
printk("ES len assertation failed for inode: %lu " printk("ES len assertion failed for inode: %lu "
"retval %d != map->m_len %d " "retval %d != map->m_len %d "
"in %s (allocation)\n", inode->i_ino, retval, "in %s (allocation)\n", inode->i_ino, retval,
map->m_len, __func__); map->m_len, __func__);
...@@ -1642,7 +1642,7 @@ static int ext4_da_map_blocks(struct inode *inode, sector_t iblock, ...@@ -1642,7 +1642,7 @@ static int ext4_da_map_blocks(struct inode *inode, sector_t iblock,
#ifdef ES_AGGRESSIVE_TEST #ifdef ES_AGGRESSIVE_TEST
if (retval != map->m_len) { if (retval != map->m_len) {
printk("ES len assertation failed for inode: %lu " printk("ES len assertion failed for inode: %lu "
"retval %d != map->m_len %d " "retval %d != map->m_len %d "
"in %s (lookup)\n", inode->i_ino, retval, "in %s (lookup)\n", inode->i_ino, retval,
map->m_len, __func__); map->m_len, __func__);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment