diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2012-12-05 10:52:48 +0000 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2012-12-16 20:46:18 -0500 |
commit | 543eabd5e1929bc73e22b279aa911eb01447535f (patch) | |
tree | 79d0991024920c76d07eb573a9c8dceb0daba06e /fs/btrfs/inode.c | |
parent | fb57dc817c24d46b035320d871b7a3fcc778558d (diff) |
Btrfs: don't auto defrag a file when doing directIO
If we runt the direct IO, we should not run auto defrag, because it may
introduce buffered IO vs direcIO problem, and make direct IO slow down.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 657f16d9c78..bf609581c5d 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -5692,9 +5692,6 @@ static struct extent_map *btrfs_new_extent_direct(struct inode *inode, if (IS_ERR(trans)) return ERR_CAST(trans); - if (start <= BTRFS_I(inode)->disk_i_size && len < 64 * 1024) - btrfs_add_inode_defrag(trans, inode); - trans->block_rsv = &root->fs_info->delalloc_block_rsv; alloc_hint = get_extent_allocation_hint(inode, start, len); |