diff options
Diffstat (limited to 'fs/ext4/inode.c')
| -rw-r--r-- | fs/ext4/inode.c | 19 | 
1 files changed, 8 insertions, 11 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 0188e65e1f58..ba33c67d6e48 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -465,7 +465,7 @@ static void ext4_map_blocks_es_recheck(handle_t *handle,  	if (es_map->m_lblk != map->m_lblk ||  	    es_map->m_flags != map->m_flags ||  	    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] != "  		       "found ex [%d/%d/%llu/%x] retval %d flags %x\n",  		       inode->i_ino, es_map->m_lblk, es_map->m_len, @@ -514,10 +514,9 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode,  		  "logical block %lu\n", inode->i_ino, flags, map->m_len,  		  (unsigned long) map->m_lblk); -	ext4_es_lru_add(inode); -  	/* Lookup extent status tree firstly */  	if (ext4_es_lookup_extent(inode, map->m_lblk, &es)) { +		ext4_es_lru_add(inode);  		if (ext4_es_is_written(&es) || ext4_es_is_unwritten(&es)) {  			map->m_pblk = ext4_es_pblock(&es) +  					map->m_lblk - es.es_lblk; @@ -558,7 +557,7 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode,  #ifdef ES_AGGRESSIVE_TEST  		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 "  			       "in %s (lookup)\n", inode->i_ino, retval,  			       map->m_len, __func__); @@ -659,7 +658,7 @@ found:  #ifdef ES_AGGRESSIVE_TEST  		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 "  			       "in %s (allocation)\n", inode->i_ino, retval,  			       map->m_len, __func__); @@ -1529,11 +1528,9 @@ static int ext4_da_map_blocks(struct inode *inode, sector_t iblock,  		  "logical block %lu\n", inode->i_ino, map->m_len,  		  (unsigned long) map->m_lblk); -	ext4_es_lru_add(inode); -  	/* Lookup extent status tree firstly */  	if (ext4_es_lookup_extent(inode, iblock, &es)) { - +		ext4_es_lru_add(inode);  		if (ext4_es_is_hole(&es)) {  			retval = 0;  			down_read((&EXT4_I(inode)->i_data_sem)); @@ -1642,7 +1639,7 @@ add_delayed:  #ifdef ES_AGGRESSIVE_TEST  		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 "  			       "in %s (lookup)\n", inode->i_ino, retval,  			       map->m_len, __func__); @@ -2163,7 +2160,7 @@ static int mpage_map_and_submit_extent(handle_t *handle,  	mpd->io_submit.io_end->offset =  				((loff_t)map->m_lblk) << inode->i_blkbits; -	while (map->m_len) { +	do {  		err = mpage_map_one_extent(handle, mpd);  		if (err < 0) {  			struct super_block *sb = inode->i_sb; @@ -2201,7 +2198,7 @@ static int mpage_map_and_submit_extent(handle_t *handle,  		err = mpage_map_and_submit_buffers(mpd);  		if (err < 0)  			return err; -	} +	} while (map->m_len);  	/* Update on-disk size after IO is submitted */  	disksize = ((loff_t)mpd->first_page) << PAGE_CACHE_SHIFT;  | 
