linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Douglas Gilbert <dgilbert@interlog.com>
To: Martin Peschke <mpeschke@linux.vnet.ibm.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] scsi_debug: Fix endianess in partition table
Date: Wed, 13 Feb 2013 15:08:46 -0500	[thread overview]
Message-ID: <511BF2CE.7040408@interlog.com> (raw)
In-Reply-To: <1360604094.24863.1.camel@br8ggx07.de.ibm.com>

On 13-02-11 12:34 PM, Martin Peschke wrote:
> Both start_sect and nr_sects in struct partition are __le32 and
> require cpu_to_le32() on assignment.
>
> Without this fix tools like fdisk show an invalid partition table
> for SCSI devices emulated by scsi_debug on big-endian architectures,
> like s390x. Besides a kernel message like this was emitted:
>
> sda: p1 start 536870912 is beyond EOD, enabling native capacity
> sda: p1 start 536870912 is beyond EOD, truncated
>
> For verification 'xxd -l 512 /dev/sda' has been used to make sure
> that this fix makes scsi_debug generated partition tables on s390x
> look like the ones generated on my laptop.
>
> Signed-off-by: Martin Peschke <mpeschke@linux.vnet.ibm.com>
> Reviewed-by: Steffen Maier <maier@linux.vnet.ibm.com>

Acked-by: Douglas Gilbert <dgilbert@interlog.com>


  parent reply	other threads:[~2013-02-13 20:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-11 17:34 [PATCH] scsi_debug: Fix endianess in partition table Martin Peschke
2013-02-12  9:03 ` Martin Peschke
2013-02-12 14:45   ` Douglas Gilbert
2013-02-13 15:16     ` Martin Peschke
2013-02-13 20:08 ` Douglas Gilbert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-02-15 12:30 Martin Peschke

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=511BF2CE.7040408@interlog.com \
    --to=dgilbert@interlog.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mpeschke@linux.vnet.ibm.com \
    /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).