diff options
author | Jens Axboe <jaxboe@fusionio.com> | 2010-10-24 16:06:02 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-10-24 16:06:02 -0400 |
commit | f253b86b4ad1b3220544e75880510fd455ebd23f (patch) | |
tree | cc2dd76b8ffc8df4356c1e95bd15276169dd335e /block/genhd.c | |
parent | 35da7a307c535f9c2929cae277f3df425c9f9b1e (diff) |
Revert "block: fix accounting bug on cross partition merges"
This reverts commit 7681bfeeccff5efa9eb29bf09249a3c400b15327.
Conflicts:
include/linux/genhd.h
It has numerous issues with the cleanup path and non-elevator
devices. Revert it for now so we can come up with a clean
version without rushing things.
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block/genhd.c')
-rw-r--r-- | block/genhd.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/block/genhd.c b/block/genhd.c index a8adf96a4b41..5fa2b44a72ff 100644 --- a/block/genhd.c +++ b/block/genhd.c | |||
@@ -929,15 +929,8 @@ static void disk_free_ptbl_rcu_cb(struct rcu_head *head) | |||
929 | { | 929 | { |
930 | struct disk_part_tbl *ptbl = | 930 | struct disk_part_tbl *ptbl = |
931 | container_of(head, struct disk_part_tbl, rcu_head); | 931 | container_of(head, struct disk_part_tbl, rcu_head); |
932 | struct gendisk *disk = ptbl->disk; | ||
933 | struct request_queue *q = disk->queue; | ||
934 | unsigned long flags; | ||
935 | 932 | ||
936 | kfree(ptbl); | 933 | kfree(ptbl); |
937 | |||
938 | spin_lock_irqsave(q->queue_lock, flags); | ||
939 | elv_quiesce_end(q); | ||
940 | spin_unlock_irqrestore(q->queue_lock, flags); | ||
941 | } | 934 | } |
942 | 935 | ||
943 | /** | 936 | /** |
@@ -955,17 +948,11 @@ static void disk_replace_part_tbl(struct gendisk *disk, | |||
955 | struct disk_part_tbl *new_ptbl) | 948 | struct disk_part_tbl *new_ptbl) |
956 | { | 949 | { |
957 | struct disk_part_tbl *old_ptbl = disk->part_tbl; | 950 | struct disk_part_tbl *old_ptbl = disk->part_tbl; |
958 | struct request_queue *q = disk->queue; | ||
959 | 951 | ||
960 | rcu_assign_pointer(disk->part_tbl, new_ptbl); | 952 | rcu_assign_pointer(disk->part_tbl, new_ptbl); |
961 | 953 | ||
962 | if (old_ptbl) { | 954 | if (old_ptbl) { |
963 | rcu_assign_pointer(old_ptbl->last_lookup, NULL); | 955 | rcu_assign_pointer(old_ptbl->last_lookup, NULL); |
964 | |||
965 | spin_lock_irq(q->queue_lock); | ||
966 | elv_quiesce_start(q); | ||
967 | spin_unlock_irq(q->queue_lock); | ||
968 | |||
969 | call_rcu(&old_ptbl->rcu_head, disk_free_ptbl_rcu_cb); | 956 | call_rcu(&old_ptbl->rcu_head, disk_free_ptbl_rcu_cb); |
970 | } | 957 | } |
971 | } | 958 | } |
@@ -1006,7 +993,6 @@ int disk_expand_part_tbl(struct gendisk *disk, int partno) | |||
1006 | return -ENOMEM; | 993 | return -ENOMEM; |
1007 | 994 | ||
1008 | new_ptbl->len = target; | 995 | new_ptbl->len = target; |
1009 | new_ptbl->disk = disk; | ||
1010 | 996 | ||
1011 | for (i = 0; i < len; i++) | 997 | for (i = 0; i < len; i++) |
1012 | rcu_assign_pointer(new_ptbl->part[i], old_ptbl->part[i]); | 998 | rcu_assign_pointer(new_ptbl->part[i], old_ptbl->part[i]); |