diff options
author | Tejun Heo <tj@kernel.org> | 2008-08-25 06:56:13 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-10-09 02:56:08 -0400 |
commit | eddb2e26b5ee3c5da68ba4bf1921ba20e2097bff (patch) | |
tree | 7a24f3f3cb577f344491dc57ea441060fac9d9a9 /block/blk-core.c | |
parent | 0762b8bde9729f10f8e6249809660ff2ec3ad735 (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.c | 5 |
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); | |||
1273 | 1273 | ||
1274 | static int should_fail_request(struct bio *bio) | 1274 | static int should_fail_request(struct bio *bio) |
1275 | { | 1275 | { |
1276 | if ((bio->bi_bdev->bd_disk->flags & GENHD_FL_FAIL) || | 1276 | struct hd_struct *part = bio->bi_bdev->bd_part; |
1277 | bio->bi_bdev->bd_part->make_it_fail) | 1277 | |
1278 | if (part_to_disk(part)->part0.make_it_fail || part->make_it_fail) | ||
1278 | return should_fail(&fail_make_request, bio->bi_size); | 1279 | return should_fail(&fail_make_request, bio->bi_size); |
1279 | 1280 | ||
1280 | return 0; | 1281 | return 0; |