linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Colin Watson <cjwatson@ubuntu.com>
To: Alan <alan@lxorguk.ukuu.org.uk>
Cc: Kyle McMartin <kyle@canonical.com>, Jeff Garzik <jeff@garzik.org>,
	linux-ide@vger.kernel.org, mjg59@ubuntu.com
Subject: Re: [RFT] libata hpa support
Date: Fri, 23 Feb 2007 18:23:37 +0000	[thread overview]
Message-ID: <20070223182336.GI31945@riva.ucam.org> (raw)
In-Reply-To: <20070223181959.56502bf2@lxorguk.ukuu.org.uk>

Alan wrote:
> > A few questions are raised, libata SATA hasn't been resizing disks in the
> > past, should we only disable HPA on PATA only, a la drivers/ide? In any
> 
> drivers/ide disable HPA on SATA ports it manages too.
> 
> > event, supporting HPA lets people who had partitions which extend beyond
> > the protected area boot with libata PATA. Some policy decision needs to be
> > made too... Right now, I'm just disabling it unilaterally.
> 
> Last time we had a Red Hat bitching session about it the main thing the
> installer guys wanted was a way to find out what size the disk thought it
> was before we twiddled with it, so that they can make an intelligent
> attempt to handle partitioning in the case where for example a disk is
> unpartitioned. A partitioned disk isn't so much of a problem as the
> partitioning itself tells you the a lot about the state of disk and
> intended HPA.
> 
> What do the Ubuntu installer/partitioning folk think ?

Suspiciously similar to the Red Hat installer folks. :-) Our partitioner
(and Debian's) asks libparted to create a partition table in memory
(ped_disk_new_fresh) and then works entirely based on what libparted
reports about that partition table before actually committing it. This
obviously only works if you can find out the size of the disk before
writing anything to it.

libparted uses ioctl(BLKGETSIZE[64]) to get the size of the disk at the
moment. Making that report the non-HPA size would be enough to make
libparted create new partition tables properly, but it would defeat the
purpose of Kyle's patch in that you probably couldn't use libparted to
work with existing partition tables extending beyond the HPA. Adding say
ioctl(BLKGETNONHPASIZE) or something and teaching libparted to create
new partition tables excluding the HPA but still be able to read
existing partition tables extending into the HPA seems like it'd be the
best approach, and sounds pretty straightforward. I'd be happy to do the
libparted side of that.

-- 
Colin Watson                                       [cjwatson@ubuntu.com]

  reply	other threads:[~2007-02-23 19:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-23 17:06 [RFT] libata hpa support Kyle McMartin
2007-02-23 18:19 ` Alan
2007-02-23 18:23   ` Colin Watson [this message]
2007-02-24 18:00   ` Kyle McMartin
2007-02-25  0:09     ` Alan
2007-02-24 23:17       ` Jeff Garzik
2007-03-05  3:47         ` Tejun Heo
2007-03-21 13:01 ` Kyle McMartin
2007-03-21 18:34   ` Alan Cox
2007-03-21 17:40     ` Matthew Garrett
2007-03-21 18:51       ` Alan Cox
2007-03-21 17:58         ` Matthew Garrett
2007-03-21 17:41     ` Jeff Garzik
2007-03-21 18:50       ` Alan Cox
2007-03-21 18:03         ` Jeff Garzik
2007-03-21 19:17           ` Alan Cox
2007-03-21 18:16             ` Jeff Garzik

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=20070223182336.GI31945@riva.ucam.org \
    --to=cjwatson@ubuntu.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jeff@garzik.org \
    --cc=kyle@canonical.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=mjg59@ubuntu.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).