diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-04-04 14:30:09 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-04-04 14:30:09 -0400 |
commit | e8f05c4508aed906146919f2efa89242a7f90a8b (patch) | |
tree | 54f781c00b23c347c634b992b1601d5e6758b2da /fs | |
parent | d4dbff953e1f6f4079126c0404cc24f2ef14e925 (diff) |
Btrfs: disable inline data code for now
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/super.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 0afb6cece82c..822243650ae9 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -824,6 +824,7 @@ printk("btrfs sync_fs\n"); | |||
824 | return 0; | 824 | return 0; |
825 | } | 825 | } |
826 | 826 | ||
827 | #if 0 | ||
827 | static int btrfs_get_block_inline(struct inode *inode, sector_t iblock, | 828 | static int btrfs_get_block_inline(struct inode *inode, sector_t iblock, |
828 | struct buffer_head *result, int create) | 829 | struct buffer_head *result, int create) |
829 | { | 830 | { |
@@ -890,6 +891,7 @@ out: | |||
890 | kunmap(result->b_page); | 891 | kunmap(result->b_page); |
891 | return err; | 892 | return err; |
892 | } | 893 | } |
894 | #endif | ||
893 | 895 | ||
894 | static int btrfs_get_block_lock(struct inode *inode, sector_t iblock, | 896 | static int btrfs_get_block_lock(struct inode *inode, sector_t iblock, |
895 | struct buffer_head *result, int create) | 897 | struct buffer_head *result, int create) |
@@ -993,8 +995,8 @@ static int btrfs_get_block(struct inode *inode, sector_t iblock, | |||
993 | int err; | 995 | int err; |
994 | struct btrfs_root *root = btrfs_sb(inode->i_sb); | 996 | struct btrfs_root *root = btrfs_sb(inode->i_sb); |
995 | mutex_lock(&root->fs_info->fs_mutex); | 997 | mutex_lock(&root->fs_info->fs_mutex); |
996 | // err = btrfs_get_block_lock(inode, iblock, result, create); | 998 | err = btrfs_get_block_lock(inode, iblock, result, create); |
997 | err = btrfs_get_block_inline(inode, iblock, result, create); | 999 | // err = btrfs_get_block_inline(inode, iblock, result, create); |
998 | mutex_unlock(&root->fs_info->fs_mutex); | 1000 | mutex_unlock(&root->fs_info->fs_mutex); |
999 | return err; | 1001 | return err; |
1000 | } | 1002 | } |
@@ -1002,13 +1004,11 @@ static int btrfs_get_block(struct inode *inode, sector_t iblock, | |||
1002 | static int btrfs_prepare_write(struct file *file, struct page *page, | 1004 | static int btrfs_prepare_write(struct file *file, struct page *page, |
1003 | unsigned from, unsigned to) | 1005 | unsigned from, unsigned to) |
1004 | { | 1006 | { |
1005 | WARN_ON(1); | ||
1006 | return nobh_prepare_write(page, from, to, btrfs_get_block); | 1007 | return nobh_prepare_write(page, from, to, btrfs_get_block); |
1007 | } | 1008 | } |
1008 | static int btrfs_commit_write(struct file *file, struct page *page, | 1009 | static int btrfs_commit_write(struct file *file, struct page *page, |
1009 | unsigned from, unsigned to) | 1010 | unsigned from, unsigned to) |
1010 | { | 1011 | { |
1011 | WARN_ON(1); | ||
1012 | return nobh_commit_write(file, page, from, to); | 1012 | return nobh_commit_write(file, page, from, to); |
1013 | } | 1013 | } |
1014 | 1014 | ||
@@ -1044,7 +1044,7 @@ static void btrfs_truncate(struct inode *inode) | |||
1044 | if (IS_APPEND(inode) || IS_IMMUTABLE(inode)) | 1044 | if (IS_APPEND(inode) || IS_IMMUTABLE(inode)) |
1045 | return; | 1045 | return; |
1046 | 1046 | ||
1047 | // nobh_truncate_page(inode->i_mapping, inode->i_size); | 1047 | nobh_truncate_page(inode->i_mapping, inode->i_size); |
1048 | 1048 | ||
1049 | /* FIXME, add redo link to tree so we don't leak on crash */ | 1049 | /* FIXME, add redo link to tree so we don't leak on crash */ |
1050 | mutex_lock(&root->fs_info->fs_mutex); | 1050 | mutex_lock(&root->fs_info->fs_mutex); |
@@ -1253,6 +1253,7 @@ out: | |||
1253 | return num_written ? num_written : err; | 1253 | return num_written ? num_written : err; |
1254 | } | 1254 | } |
1255 | 1255 | ||
1256 | #if 0 | ||
1256 | static ssize_t inline_one_page(struct btrfs_root *root, struct inode *inode, | 1257 | static ssize_t inline_one_page(struct btrfs_root *root, struct inode *inode, |
1257 | struct page *page, loff_t pos, | 1258 | struct page *page, loff_t pos, |
1258 | size_t offset, size_t write_bytes) | 1259 | size_t offset, size_t write_bytes) |
@@ -1418,6 +1419,7 @@ out: | |||
1418 | current->backing_dev_info = NULL; | 1419 | current->backing_dev_info = NULL; |
1419 | return num_written ? num_written : err; | 1420 | return num_written ? num_written : err; |
1420 | } | 1421 | } |
1422 | #endif | ||
1421 | 1423 | ||
1422 | static int btrfs_read_actor(read_descriptor_t *desc, struct page *page, | 1424 | static int btrfs_read_actor(read_descriptor_t *desc, struct page *page, |
1423 | unsigned long offset, unsigned long size) | 1425 | unsigned long offset, unsigned long size) |
@@ -1662,7 +1664,7 @@ static struct file_operations btrfs_dir_file_operations = { | |||
1662 | 1664 | ||
1663 | static struct address_space_operations btrfs_aops = { | 1665 | static struct address_space_operations btrfs_aops = { |
1664 | .readpage = btrfs_readpage, | 1666 | .readpage = btrfs_readpage, |
1665 | // .readpages = btrfs_readpages, | 1667 | .readpages = btrfs_readpages, |
1666 | .writepage = btrfs_writepage, | 1668 | .writepage = btrfs_writepage, |
1667 | .sync_page = block_sync_page, | 1669 | .sync_page = block_sync_page, |
1668 | .prepare_write = btrfs_prepare_write, | 1670 | .prepare_write = btrfs_prepare_write, |
@@ -1676,8 +1678,8 @@ static struct inode_operations btrfs_file_inode_operations = { | |||
1676 | static struct file_operations btrfs_file_operations = { | 1678 | static struct file_operations btrfs_file_operations = { |
1677 | .llseek = generic_file_llseek, | 1679 | .llseek = generic_file_llseek, |
1678 | .read = do_sync_read, | 1680 | .read = do_sync_read, |
1679 | .aio_read = generic_file_aio_read, | 1681 | .aio_read = btrfs_file_aio_read, |
1680 | .write = btrfs_file_inline_write, | 1682 | .write = btrfs_file_write, |
1681 | .mmap = generic_file_mmap, | 1683 | .mmap = generic_file_mmap, |
1682 | .open = generic_file_open, | 1684 | .open = generic_file_open, |
1683 | }; | 1685 | }; |