summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-02-20 16:11:05 -0500
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:00 -0400
commit6885f308b557020efce6ef9c1fcc96adaabecbb6 (patch)
tree9570d312b770254a93560d55ac93f3ae0cbcd885
parente3fe4e7120bc753552b071773022efcff704e34b (diff)
downloadlinux-3.10-6885f308b557020efce6ef9c1fcc96adaabecbb6.tar.gz
linux-3.10-6885f308b557020efce6ef9c1fcc96adaabecbb6.tar.bz2
linux-3.10-6885f308b557020efce6ef9c1fcc96adaabecbb6.zip
Btrfs: Misc 2.6.25 updates
Remove the btrfs read_inode method, and use save_mount_options Signed-off-by: Chris Mason <chris.mason@oracle.com>
-rw-r--r--fs/btrfs/inode.c29
-rw-r--r--fs/btrfs/super.c11
2 files changed, 11 insertions, 29 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index bbb71fad861..315dd550d56 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -297,7 +297,6 @@ int btrfs_clear_bit_hook(struct inode *inode, u64 start, u64 end,
int btrfs_submit_bio_hook(int rw, struct bio *bio)
{
- // struct bio_vec *bvec = bio->bi_io_vec + bio->bi_vcnt - 1;
struct bio_vec *bvec = bio->bi_io_vec;
struct inode *inode = bvec->bv_page->mapping->host;
struct btrfs_root *root = BTRFS_I(inode)->root;
@@ -320,32 +319,7 @@ int btrfs_submit_bio_hook(int rw, struct bio *bio)
mutex_unlock(&root->fs_info->fs_mutex);
return ret;
}
-#if 0
-int btrfs_writepage_io_hook(struct page *page, u64 start, u64 end)
-{
- struct inode *inode = page->mapping->host;
- struct btrfs_root *root = BTRFS_I(inode)->root;
- struct btrfs_trans_handle *trans;
- char *kaddr;
- int ret = 0;
- u64 page_start = (u64)page->index << PAGE_CACHE_SHIFT;
- size_t offset = start - page_start;
- if (btrfs_test_opt(root, NODATASUM) ||
- btrfs_test_flag(inode, NODATASUM))
- return 0;
- mutex_lock(&root->fs_info->fs_mutex);
- trans = btrfs_start_transaction(root, 1);
- btrfs_set_trans_block_group(trans, inode);
- kaddr = kmap(page);
- btrfs_csum_file_block(trans, root, inode, inode->i_ino,
- start, kaddr + offset, end - start + 1);
- kunmap(page);
- ret = btrfs_end_transaction(trans, root);
- BUG_ON(ret);
- mutex_unlock(&root->fs_info->fs_mutex);
- return ret;
-}
-#endif
+
int btrfs_readpage_io_hook(struct page *page, u64 start, u64 end)
{
int ret = 0;
@@ -3049,7 +3023,6 @@ static struct file_operations btrfs_dir_file_operations = {
static struct extent_io_ops btrfs_extent_io_ops = {
.fill_delalloc = run_delalloc_range,
- // .writepage_io_hook = btrfs_writepage_io_hook,
.submit_bio_hook = btrfs_submit_bio_hook,
.readpage_io_hook = btrfs_readpage_io_hook,
.readpage_end_io_hook = btrfs_readpage_end_io_hook,
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index a46300c4753..4423a91206a 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -272,6 +272,11 @@ static int btrfs_fill_super(struct super_block * sb, void * data, int silent)
sb->s_root = root_dentry;
btrfs_transaction_queue_work(tree_root, HZ * 30);
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
+ save_mount_options(sb, data);
+#endif
+
return 0;
fail_close:
@@ -462,9 +467,13 @@ static struct super_operations btrfs_super_ops = {
.delete_inode = btrfs_delete_inode,
.put_inode = btrfs_put_inode,
.put_super = btrfs_put_super,
- .read_inode = btrfs_read_locked_inode,
.write_super = btrfs_write_super,
.sync_fs = btrfs_sync_fs,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
+ .read_inode = btrfs_read_locked_inode,
+#else
+ .show_options = generic_show_options,
+#endif
.write_inode = btrfs_write_inode,
.dirty_inode = btrfs_dirty_inode,
.alloc_inode = btrfs_alloc_inode,