PATCH] scsi_debug: Fix endianess in partition table

2013-04-26 Thread Martin Peschke
James, could you pick up this fix, preferably for 3.10, please? I am not the only one you has run into the issue: https://nazar.karan.org/blob/distro! parted.git/8780c767126938173f49dfbcd4360813932f7756/SOURCES! disable-t9020.patch Thanks, Martin Both start_sect and nr_sects in struct partiti

[PATCH] scsi_debug: Fix endianess in partition table

2013-02-15 Thread Martin Peschke
James, could you pick up this fix, please? Btw., it looks like others where bitten by this one: https://nazar.karan.org/blob/distro! parted.git/8780c767126938173f49dfbcd4360813932f7756/SOURCES! disable-t9020.patch Thanks, Martin Both start_sect and nr_sects in struct partition are __le32 and

Re: [PATCH] scsi_debug: Fix endianess in partition table

2013-02-13 Thread Douglas Gilbert
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. Besi

Re: [PATCH] scsi_debug: Fix endianess in partition table

2013-02-13 Thread Martin Peschke
On Tue, 2013-02-12 at 09:45 -0500, Douglas Gilbert wrote: > However since SCSI is big endian and you are introducing > some "le" code then a line or so of explanation (comments) > in your revised patch might be helpful. I would argue that the definition of struct partition itself should be suffici

Re: [PATCH] scsi_debug: Fix endianess in partition table

2013-02-12 Thread Douglas Gilbert
On 13-02-12 04:03 AM, Martin Peschke wrote: On Mon, 2013-02-11 at 18:34 +0100, Martin Peschke wrote: Both start_sect and nr_sects in struct partition are __le32 and require cpu_to_le32() on assignment. Steffen Maier has pointed me at: block/partitions/msdos.c: return (sector_t)get_unali

Re: [PATCH] scsi_debug: Fix endianess in partition table

2013-02-12 Thread Martin Peschke
On Mon, 2013-02-11 at 18:34 +0100, Martin Peschke wrote: > Both start_sect and nr_sects in struct partition are __le32 and > require cpu_to_le32() on assignment. Steffen Maier has pointed me at: block/partitions/msdos.c: return (sector_t)get_unaligned_le32(&p->start_sect); Unfortunately, b

[PATCH] scsi_debug: Fix endianess in partition table

2013-02-11 Thread Martin Peschke
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: s