summaryrefslogtreecommitdiff
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2008-08-25 19:56:13 +0900
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 08:56:08 +0200
commiteddb2e26b5ee3c5da68ba4bf1921ba20e2097bff (patch)
tree7a24f3f3cb577f344491dc57ea441060fac9d9a9 /block/blk-core.c
parent0762b8bde9729f10f8e6249809660ff2ec3ad735 (diff)
block: kill GENHD_FL_FAIL and use part0->make_it_fail
GENHD_FL_FAIL for disk is what make_it_fail is for parts. Kill it and use part0->make_it_fail. Sysfs node handling is unified too. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index a4a7c08d2f20..505ec61067df 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1273,8 +1273,9 @@ __setup("fail_make_request=", setup_fail_make_request);
static int should_fail_request(struct bio *bio)
{
- if ((bio->bi_bdev->bd_disk->flags & GENHD_FL_FAIL) ||
- bio->bi_bdev->bd_part->make_it_fail)
+ struct hd_struct *part = bio->bi_bdev->bd_part;
+
+ if (part_to_disk(part)->part0.make_it_fail || part->make_it_fail)
return should_fail(&fail_make_request, bio->bi_size);
return 0;