From: Phillip Susi <psusi@cfl.rr.com>
To: Linux-kernel <linux-kernel@vger.kernel.org>
Subject: Extended partition mapping wrong size
Date: Mon, 29 Mar 2010 12:11:23 -0400 [thread overview]
Message-ID: <4BB0D12B.6060701@cfl.rr.com> (raw)
I've been investigating a problem I ran into trying to create partitions
in sector mode and found that the first logical partition can not begin
on the very first sector of the extended partition, immediately
following the EBR. This apparently is because the kernel creates a dev
node to represent the extended partition and sizes it to two sectors. I
could have sworn that the kernel did not used to create a device for the
extended partition itself, but I wondered why it was 2 sectors long. I
found this:
from fs/partitions/msdos.c:
/* prevent someone doing mkfs or mkswap on an
extended partition, but leave room for LILO */
put_partition(state, slot, start, size == 1 ? 1 : 2);
This appears to set the size of the device to 2 sectors, unless the
extended partition is only 1 sector long. Shouldn't the size be
whatever length there is between the start of the extended partition,
and the first logical partition it contains? So if there are 63 sectors
there, as is the usual case when using cylinder alignment, then the
device node would expose all of those, but if there is no space, then
the device node should only be 1 sector for the EBR, otherwise it
overlays the first sector of the logical partition.
next reply other threads:[~2010-03-29 16:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-29 16:11 Phillip Susi [this message]
2010-04-06 11:47 ` Extended partition mapping wrong size Karel Zak
2010-04-06 13:58 ` Phillip Susi
2010-04-06 15:33 ` Karel Zak
2010-04-06 16:06 ` Phillip Susi
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=4BB0D12B.6060701@cfl.rr.com \
--to=psusi@cfl.rr.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox