lkml.org 
[lkml]   [2010]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateThu, 13 May 2010 18:22:06 +0200
FromTejun Heo <>
SubjectRe: [PATCHSET] libata: implement ->set_capacity()
Hello,

On 05/13/2010 06:06 PM, James Bottomley wrote:
> I'm not sure this is such a good interface ... it sounds very error
> prone for what is effectively a binary lock/unlock.

Well, the original block interface was like that. It has been used as
binary switch tho. The requested capacity is always ~0ULL and return
value smaller than the current capacity is ignored. I'm all for
dropping the capacity parameter and the return value from
->set_capacity() so that it just unlocks native capacity and directly
sets the new capacity. Jens?

> Instead of just saying unlock the HPA and show me the new capacity
> (with a rescan), you have to echo the right number of sectors to the
> set_capacity variable. Isn't a hpa_unlock libata specific attribute
> better (you could even call BLKRRPART from the user context of the
> write)?

Hmmm... I lost you. What are you talking about?

Thanks.

--
tejun


\
 
 \ /
  Last update: 2010-05-13 18:25    [from the cache]
©2003-2010