From: Christoph Hellwig <hch@lst.de>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: ppc-dev <linuxppc-dev@ozlabs.org>,
paulus@samba.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] [POWERPC] Fix viodasd geometry calculations.
Date: Wed, 30 May 2007 12:21:14 +0200 [thread overview]
Message-ID: <20070530102114.GA25568@lst.de> (raw)
In-Reply-To: <20070529160654.8e12e507.sfr@canb.auug.org.au>
On Tue, May 29, 2007 at 04:06:54PM +1000, Stephen Rothwell wrote:
> Commit a885c8c4316e1c1d2d2c8755da3f3d14f852528d that introduced the
> getgeo block device method changed the fallback number of sectors and
> introduced a bug into the fallback cylinder number calculation.
Looking at the patch I can confirm that it introduced this abitrary
changes and your patch reverts it to the original.
ACK.
>
> Thanks to Rusty Russell for noticing this.
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> drivers/block/viodasd.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> Paul, this is not too urgent as in most (all) cases the fallbacks will
> not be taken.
>
> --
> Cheers,
> Stephen Rothwell sfr@canb.auug.org.au
>
> diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c
> index 68592c3..dae3991 100644
> --- a/drivers/block/viodasd.c
> +++ b/drivers/block/viodasd.c
> @@ -252,10 +252,10 @@ static int viodasd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
> struct gendisk *disk = bdev->bd_disk;
> struct viodasd_device *d = disk->private_data;
>
> - geo->sectors = d->sectors ? d->sectors : 0;
> + geo->sectors = d->sectors ? d->sectors : 32;
> geo->heads = d->tracks ? d->tracks : 64;
> geo->cylinders = d->cylinders ? d->cylinders :
> - get_capacity(disk) / (geo->cylinders * geo->heads);
> + get_capacity(disk) / (geo->sectors * geo->heads);
>
> return 0;
> }
> --
> 1.5.1.4
---end quoted text---
prev parent reply other threads:[~2007-05-30 10:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-29 6:06 [PATCH] [POWERPC] Fix viodasd geometry calculations Stephen Rothwell
2007-05-30 10:21 ` Christoph Hellwig [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070530102114.GA25568@lst.de \
--to=hch@lst.de \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).