diff options
author | Tejun Heo <tj@kernel.org> | 2008-08-25 06:56:07 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-10-09 02:56:07 -0400 |
commit | 80795aefb76d10c5d698e60c7e7750b5330787da (patch) | |
tree | f22a55483cb2fe77580ee1507c1124bc73b93c3d /drivers/block/aoe/aoecmd.c | |
parent | b5d0b9df0ba5d9a044f3a21e7544f53d90bd1465 (diff) |
block: move capacity from disk to part0
Move disk->capacity to part0->nr_sects and convert all users who
directly accessed the field to use {get|set}_capacity(). This is done
early to allow the __dev field to be moved.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block/aoe/aoecmd.c')
-rw-r--r-- | drivers/block/aoe/aoecmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c index 17eed8c025d0..934800f979c9 100644 --- a/drivers/block/aoe/aoecmd.c +++ b/drivers/block/aoe/aoecmd.c | |||
@@ -645,7 +645,7 @@ aoecmd_sleepwork(struct work_struct *work) | |||
645 | unsigned long flags; | 645 | unsigned long flags; |
646 | u64 ssize; | 646 | u64 ssize; |
647 | 647 | ||
648 | ssize = d->gd->capacity; | 648 | ssize = get_capacity(d->gd); |
649 | bd = bdget_disk(d->gd, 0); | 649 | bd = bdget_disk(d->gd, 0); |
650 | 650 | ||
651 | if (bd) { | 651 | if (bd) { |
@@ -707,7 +707,7 @@ ataid_complete(struct aoedev *d, struct aoetgt *t, unsigned char *id) | |||
707 | if (d->flags & (DEVFL_GDALLOC|DEVFL_NEWSIZE)) | 707 | if (d->flags & (DEVFL_GDALLOC|DEVFL_NEWSIZE)) |
708 | return; | 708 | return; |
709 | if (d->gd != NULL) { | 709 | if (d->gd != NULL) { |
710 | d->gd->capacity = ssize; | 710 | set_capacity(d->gd, ssize); |
711 | d->flags |= DEVFL_NEWSIZE; | 711 | d->flags |= DEVFL_NEWSIZE; |
712 | } else | 712 | } else |
713 | d->flags |= DEVFL_GDALLOC; | 713 | d->flags |= DEVFL_GDALLOC; |