From: Jens Axboe <jens.axboe@oracle.com>
To: Karel Zak <kzak@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] partitions: use sector size for EFI GPT
Date: Tue, 24 Nov 2009 09:26:51 +0100 [thread overview]
Message-ID: <20091124082651.GM8742@kernel.dk> (raw)
In-Reply-To: <1257802611-9889-1-git-send-email-kzak@redhat.com>
On Mon, Nov 09 2009, Karel Zak wrote:
> Currently, kernel uses strictly 512-byte sectors for EFI GPT parsing.
> That's wrong.
>
> UEFI standard (version 2.3, May 2009, 5.3.1 GUID Format overview, page
> 95) defines that LBA is always based on the logical block size. It
> means bdev_logical_block_size() (aka BLKSSZGET) for Linux.
>
> This patch removes static sector size from EFI GPT parser.
>
> The problem is reproducible with the latest GNU Parted:
>
> # modprobe scsi_debug dev_size_mb=50 sector_size=4096
>
> # ./parted /dev/sdb print
> Model: Linux scsi_debug (scsi)
> Disk /dev/sdb: 52.4MB
> Sector size (logical/physical): 4096B/4096B
> Partition Table: gpt
>
> Number Start End Size File system Name Flags
> 1 24.6kB 3002kB 2978kB primary
> 2 3002kB 6001kB 2998kB primary
> 3 6001kB 9003kB 3002kB primary
>
> # blockdev --rereadpt /dev/sdb
> # dmesg | tail -1
> sdb: unknown partition table <---- !!!
>
> with this patch:
>
> # blockdev --rereadpt /dev/sdb
> # dmesg | tail -1
> sdb: sdb1 sdb2 sdb3
>
> Signed-off-by: Karel Zak <kzak@redhat.com>
I have applied this patch with the division fixup, and 2/2 as well.
Thanks!
--
Jens Axboe
next prev parent reply other threads:[~2009-11-24 8:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-09 21:36 [PATCH 1/2] partitions: use sector size for EFI GPT Karel Zak
2009-11-09 21:36 ` [PATCH 2/2] partitions: read whole sector with EFI GPT header Karel Zak
2009-11-24 8:26 ` Jens Axboe [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-10-23 10:36 [PATCH 1/2] partitions: use sector size for EFI GPT Karel Zak
2009-11-09 13:08 ` Karel Zak
2009-11-09 19:50 ` Jens Axboe
2009-11-09 19:58 ` Andries E. Brouwer
2009-11-09 21:33 ` Karel Zak
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=20091124082651.GM8742@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=kzak@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.