diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-02-20 16:11:05 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:00 -0400 |
commit | 6885f308b557020efce6ef9c1fcc96adaabecbb6 (patch) | |
tree | 9570d312b770254a93560d55ac93f3ae0cbcd885 /fs | |
parent | e3fe4e7120bc753552b071773022efcff704e34b (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/inode.c | 29 | ||||
-rw-r--r-- | fs/btrfs/super.c | 11 |
2 files changed, 11 insertions, 29 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index bbb71fad861a..315dd550d560 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, | |||
297 | 297 | ||
298 | int btrfs_submit_bio_hook(int rw, struct bio *bio) | 298 | int btrfs_submit_bio_hook(int rw, struct bio *bio) |
299 | { | 299 | { |
300 | // struct bio_vec *bvec = bio->bi_io_vec + bio->bi_vcnt - 1; | ||
301 | struct bio_vec *bvec = bio->bi_io_vec; | 300 | struct bio_vec *bvec = bio->bi_io_vec; |
302 | struct inode *inode = bvec->bv_page->mapping->host; | 301 | struct inode *inode = bvec->bv_page->mapping->host; |
303 | struct btrfs_root *root = BTRFS_I(inode)->root; | 302 | struct btrfs_root *root = BTRFS_I(inode)->root; |
@@ -320,32 +319,7 @@ int btrfs_submit_bio_hook(int rw, struct bio *bio) | |||
320 | mutex_unlock(&root->fs_info->fs_mutex); | 319 | mutex_unlock(&root->fs_info->fs_mutex); |
321 | return ret; | 320 | return ret; |
322 | } | 321 | } |
323 | #if 0 | 322 | |
324 | int btrfs_writepage_io_hook(struct page *page, u64 start, u64 end) | ||
325 | { | ||
326 | struct inode *inode = page->mapping->host; | ||
327 | struct btrfs_root *root = BTRFS_I(inode)->root; | ||
328 | struct btrfs_trans_handle *trans; | ||
329 | char *kaddr; | ||
330 | int ret = 0; | ||
331 | u64 page_start = (u64)page->index << PAGE_CACHE_SHIFT; | ||
332 | size_t offset = start - page_start; | ||
333 | if (btrfs_test_opt(root, NODATASUM) || | ||
334 | btrfs_test_flag(inode, NODATASUM)) | ||
335 | return 0; | ||
336 | mutex_lock(&root->fs_info->fs_mutex); | ||
337 | trans = btrfs_start_transaction(root, 1); | ||
338 | btrfs_set_trans_block_group(trans, inode); | ||
339 | kaddr = kmap(page); | ||
340 | btrfs_csum_file_block(trans, root, inode, inode->i_ino, | ||
341 | start, kaddr + offset, end - start + 1); | ||
342 | kunmap(page); | ||
343 | ret = btrfs_end_transaction(trans, root); | ||
344 | BUG_ON(ret); | ||
345 | mutex_unlock(&root->fs_info->fs_mutex); | ||
346 | return ret; | ||
347 | } | ||
348 | #endif | ||
349 | int btrfs_readpage_io_hook(struct page *page, u64 start, u64 end) | 323 | int btrfs_readpage_io_hook(struct page *page, u64 start, u64 end) |
350 | { | 324 | { |
351 | int ret = 0; | 325 | int ret = 0; |
@@ -3049,7 +3023,6 @@ static struct file_operations btrfs_dir_file_operations = { | |||
3049 | 3023 | ||
3050 | static struct extent_io_ops btrfs_extent_io_ops = { | 3024 | static struct extent_io_ops btrfs_extent_io_ops = { |
3051 | .fill_delalloc = run_delalloc_range, | 3025 | .fill_delalloc = run_delalloc_range, |
3052 | // .writepage_io_hook = btrfs_writepage_io_hook, | ||
3053 | .submit_bio_hook = btrfs_submit_bio_hook, | 3026 | .submit_bio_hook = btrfs_submit_bio_hook, |
3054 | .readpage_io_hook = btrfs_readpage_io_hook, | 3027 | .readpage_io_hook = btrfs_readpage_io_hook, |
3055 | .readpage_end_io_hook = btrfs_readpage_end_io_hook, | 3028 | .readpage_end_io_hook = btrfs_readpage_end_io_hook, |
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index a46300c4753a..4423a91206a1 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) | |||
272 | 272 | ||
273 | sb->s_root = root_dentry; | 273 | sb->s_root = root_dentry; |
274 | btrfs_transaction_queue_work(tree_root, HZ * 30); | 274 | btrfs_transaction_queue_work(tree_root, HZ * 30); |
275 | |||
276 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) | ||
277 | save_mount_options(sb, data); | ||
278 | #endif | ||
279 | |||
275 | return 0; | 280 | return 0; |
276 | 281 | ||
277 | fail_close: | 282 | fail_close: |
@@ -462,9 +467,13 @@ static struct super_operations btrfs_super_ops = { | |||
462 | .delete_inode = btrfs_delete_inode, | 467 | .delete_inode = btrfs_delete_inode, |
463 | .put_inode = btrfs_put_inode, | 468 | .put_inode = btrfs_put_inode, |
464 | .put_super = btrfs_put_super, | 469 | .put_super = btrfs_put_super, |
465 | .read_inode = btrfs_read_locked_inode, | ||
466 | .write_super = btrfs_write_super, | 470 | .write_super = btrfs_write_super, |
467 | .sync_fs = btrfs_sync_fs, | 471 | .sync_fs = btrfs_sync_fs, |
472 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) | ||
473 | .read_inode = btrfs_read_locked_inode, | ||
474 | #else | ||
475 | .show_options = generic_show_options, | ||
476 | #endif | ||
468 | .write_inode = btrfs_write_inode, | 477 | .write_inode = btrfs_write_inode, |
469 | .dirty_inode = btrfs_dirty_inode, | 478 | .dirty_inode = btrfs_dirty_inode, |
470 | .alloc_inode = btrfs_alloc_inode, | 479 | .alloc_inode = btrfs_alloc_inode, |