lkml.org 
[lkml]   [2010]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] msdos: add support for large disks
Date
"H. Peter Anvin" <hpa@zytor.com> writes:

> On 03/07/2010 02:59 AM, OGAWA Hirofumi wrote:
>> This part is broken. If "size" is smaller than minimum blocksize (note,
>> "size" is number of 512b, not number of blocksize), we can't read any
>> block after all (it is handled as outside of i_size by bdev).
>>
>> Peter (or someone) know what do we want to in here? This is on extended
> > partition itself (e.g. if sda1 sda2<sda5 sda6>, it's the size of sda2)
>
> We should presumably set it to one logical sector, regardless of size.
> Either that, or the offset of the lowest contained partition.

It means,

min(size, max(logical_sector_size / 512, 2));

or like this? ("size" is "nr_sects(part) * (logical_sector_size/512)")

This should keep old logic, i.e. if partition is bigger than 1kb, it
uses 1kb for (probably) LILO mentioned by comment.

>> [BTW, it seems subtypes stuff is not thinking about sector size> 512b...]
>
> Much else isn't, either. With the exception of some MO disks, it was
> nearly unheard of for 20 years.

Yes. So, well, if someone know the spec of those subtypes, let us know.

Thanks.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>


\
 
 \ /
  Last update: 2010-03-08 01:11    [W:0.196 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site