[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1273771131.4353.300.camel@mulgrave.site>
Date: Thu, 13 May 2010 12:18:51 -0500
From: James Bottomley <James.Bottomley@...e.de>
To: Tejun Heo <tj@...nel.org>
Cc: jeff@...zik.org, linux-ide@...r.kernel.org, jens.axboe@...cle.com,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
ben@...adent.org.uk
Subject: Re: [PATCHSET] libata: implement ->set_capacity()
On Thu, 2010-05-13 at 18:54 +0200, Tejun Heo wrote:
> Hello,
>
> On 05/13/2010 06:38 PM, James Bottomley wrote:
> > Instead of making this a block sysfs attribute, since HPA is SATA only,
> > why not make it a libata attribute for the disk?
> >
> > That way on unlock, you can unlock the HPA and then trigger a partition
> > rescan of the block device (BLKRRPART) ... this is an ioctl, so you need
> > user context, but you have it if you do it from the sysfs write routine.
> > This looks to be a lot simpler than threading it up through SCSI and
> > block.
>
> This doesn't have anything to do with sysfs. It's called from block
> partition scan code when it detects a partition extends beyond the end
> of the device. No user intervention at all and the mechanism has been
> there for quite some years and possibly predates sysfs. Am I being
> really slow or are you looking at something else?
OK, so maybe I'm misunderstanding what you're trying to do. I thought
this set_capacity thing was trying to unlock the HPA and then cause
block to see a new capacity ... the latter is what calling BLKRRPART
from the sysfs write would do.
If it's just to unlock the HPA, then forget the RRPART piece.
So I think the bit I missed was you're trying to do this programatically
from boot time partition read to detect if the user previously disabled
the HPA and partitioned the device? In which case you still have user
context, you can call BLKRRPART here too.
James
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists