diff options
author | Theodore Ts'o <tytso@mit.edu> | 2012-01-10 11:54:07 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-01-10 11:54:07 -0500 |
commit | ff9cb1c4eead5e4c292e75cd3170a82d66944101 (patch) | |
tree | cdb132a39e550a9b7b28ea67544cb86cd6ebdb6e /fs/ext4/extents.c | |
parent | e4e11180dfa545233e5145919b75b7fac88638df (diff) | |
parent | d50f2ab6f050311dbf7b8f5501b25f0bf64a439b (diff) | |
download | linux-ff9cb1c4eead5e4c292e75cd3170a82d66944101.tar.gz linux-ff9cb1c4eead5e4c292e75cd3170a82d66944101.tar.bz2 linux-ff9cb1c4eead5e4c292e75cd3170a82d66944101.zip |
Merge branch 'for_linus' into for_linus_merged
Conflicts:
fs/ext4/ioctl.c
Diffstat (limited to 'fs/ext4/extents.c')
-rw-r--r-- | fs/ext4/extents.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 841faf5fb785..74f23c292e1b 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -3280,6 +3280,9 @@ static int ext4_find_delalloc_range(struct inode *inode, ext4_lblk_t i, pg_lblk; pgoff_t index; + if (!test_opt(inode->i_sb, DELALLOC)) + return 0; + /* reverse search wont work if fs block size is less than page size */ if (inode->i_blkbits < PAGE_CACHE_SHIFT) search_hint_reverse = 0; @@ -3452,8 +3455,8 @@ ext4_ext_handle_uninitialized_extents(handle_t *handle, struct inode *inode, int err = 0; ext4_io_end_t *io = EXT4_I(inode)->cur_aio_dio; - ext_debug("ext4_ext_handle_uninitialized_extents: inode %lu, logical" - "block %llu, max_blocks %u, flags %d, allocated %u", + ext_debug("ext4_ext_handle_uninitialized_extents: inode %lu, logical " + "block %llu, max_blocks %u, flags %x, allocated %u\n", inode->i_ino, (unsigned long long)map->m_lblk, map->m_len, flags, allocated); ext4_ext_show_leaf(inode, path); @@ -3624,7 +3627,7 @@ static int get_implied_cluster_alloc(struct super_block *sb, struct ext4_sb_info *sbi = EXT4_SB(sb); ext4_lblk_t c_offset = map->m_lblk & (sbi->s_cluster_ratio-1); ext4_lblk_t ex_cluster_start, ex_cluster_end; - ext4_lblk_t rr_cluster_start, rr_cluster_end; + ext4_lblk_t rr_cluster_start; ext4_lblk_t ee_block = le32_to_cpu(ex->ee_block); ext4_fsblk_t ee_start = ext4_ext_pblock(ex); unsigned short ee_len = ext4_ext_get_actual_len(ex); @@ -3635,7 +3638,6 @@ static int get_implied_cluster_alloc(struct super_block *sb, /* The requested region passed into ext4_map_blocks() */ rr_cluster_start = EXT4_B2C(sbi, map->m_lblk); - rr_cluster_end = EXT4_B2C(sbi, map->m_lblk + map->m_len - 1); if ((rr_cluster_start == ex_cluster_end) || (rr_cluster_start == ex_cluster_start)) { |