aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2009-04-27 07:29:04 -0400
committerChris Mason <chris.mason@oracle.com>2009-04-27 07:40:52 -0400
commitb7967db75a38df4891b22efe1b0969b9357eb946 (patch)
tree63ce1e5394446d65111fbc768e44845c295c1049 /fs/btrfs/disk-io.c
parentd6397baee468809ef311e763dfc6e9f73418f8a6 (diff)
Btrfs: remove #if 0 code
Btrfs had some old code sitting around under #if 0, this drops it. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c48
1 files changed, 1 insertions, 47 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 44c94d808e2b..77f9a3b824be 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -584,18 +584,7 @@ int btrfs_wq_submit_bio(struct btrfs_fs_info *fs_info, struct inode *inode,
584 btrfs_set_work_high_prio(&async->work); 584 btrfs_set_work_high_prio(&async->work);
585 585
586 btrfs_queue_worker(&fs_info->workers, &async->work); 586 btrfs_queue_worker(&fs_info->workers, &async->work);
587#if 0
588 int limit = btrfs_async_submit_limit(fs_info);
589 if (atomic_read(&fs_info->nr_async_submits) > limit) {
590 wait_event_timeout(fs_info->async_submit_wait,
591 (atomic_read(&fs_info->nr_async_submits) < limit),
592 HZ/10);
593 587
594 wait_event_timeout(fs_info->async_submit_wait,
595 (atomic_read(&fs_info->nr_async_bios) < limit),
596 HZ/10);
597 }
598#endif
599 while (atomic_read(&fs_info->async_submit_draining) && 588 while (atomic_read(&fs_info->async_submit_draining) &&
600 atomic_read(&fs_info->nr_async_submits)) { 589 atomic_read(&fs_info->nr_async_submits)) {
601 wait_event(fs_info->async_submit_wait, 590 wait_event(fs_info->async_submit_wait,
@@ -770,27 +759,6 @@ static void btree_invalidatepage(struct page *page, unsigned long offset)
770 } 759 }
771} 760}
772 761
773#if 0
774static int btree_writepage(struct page *page, struct writeback_control *wbc)
775{
776 struct buffer_head *bh;
777 struct btrfs_root *root = BTRFS_I(page->mapping->host)->root;
778 struct buffer_head *head;
779 if (!page_has_buffers(page)) {
780 create_empty_buffers(page, root->fs_info->sb->s_blocksize,
781 (1 << BH_Dirty)|(1 << BH_Uptodate));
782 }
783 head = page_buffers(page);
784 bh = head;
785 do {
786 if (buffer_dirty(bh))
787 csum_tree_block(root, bh, 0);
788 bh = bh->b_this_page;
789 } while (bh != head);
790 return block_write_full_page(page, btree_get_block, wbc);
791}
792#endif
793
794static struct address_space_operations btree_aops = { 762static struct address_space_operations btree_aops = {
795 .readpage = btree_readpage, 763 .readpage = btree_readpage,
796 .writepage = btree_writepage, 764 .writepage = btree_writepage,
@@ -1278,11 +1246,7 @@ static int btrfs_congested_fn(void *congested_data, int bdi_bits)
1278 int ret = 0; 1246 int ret = 0;
1279 struct btrfs_device *device; 1247 struct btrfs_device *device;
1280 struct backing_dev_info *bdi; 1248 struct backing_dev_info *bdi;
1281#if 0 1249
1282 if ((bdi_bits & (1 << BDI_write_congested)) &&
1283 btrfs_congested_async(info, 0))
1284 return 1;
1285#endif
1286 list_for_each_entry(device, &info->fs_devices->devices, dev_list) { 1250 list_for_each_entry(device, &info->fs_devices->devices, dev_list) {
1287 if (!device->bdev) 1251 if (!device->bdev)
1288 continue; 1252 continue;
@@ -2334,16 +2298,6 @@ int close_ctree(struct btrfs_root *root)
2334 btrfs_stop_workers(&fs_info->endio_write_workers); 2298 btrfs_stop_workers(&fs_info->endio_write_workers);
2335 btrfs_stop_workers(&fs_info->submit_workers); 2299 btrfs_stop_workers(&fs_info->submit_workers);
2336 2300
2337#if 0
2338 while (!list_empty(&fs_info->hashers)) {
2339 struct btrfs_hasher *hasher;
2340 hasher = list_entry(fs_info->hashers.next, struct btrfs_hasher,
2341 hashers);
2342 list_del(&hasher->hashers);
2343 crypto_free_hash(&fs_info->hash_tfm);
2344 kfree(hasher);
2345 }
2346#endif
2347 btrfs_close_devices(fs_info->fs_devices); 2301 btrfs_close_devices(fs_info->fs_devices);
2348 btrfs_mapping_tree_free(&fs_info->mapping_tree); 2302 btrfs_mapping_tree_free(&fs_info->mapping_tree);
2349 2303