Re: [PATCH 4/4] brd: Request from fdisk 4k alignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/07/2014 04:00 PM, Karel Zak wrote:
> On Thu, Aug 07, 2014 at 03:17:23PM +0300, Boaz Harrosh wrote:
> 
>>> Is there an error case that this patch fixes?  I've had page alignment checks
>>> in my PRD direct_access code forever, and I don't know if they've ever
>>> tripped.  
>>>
>>
>> Yes! as I said above fix fdisk. You never tripped on it because partitions never
>> worked and you never tried them. With current code fdisk is very trigger happy
> 
>  What do you mean with fdisk? which version?
> 

fdisk from util-linux 2.24.2


>  The current fdisk (and cfdisk) follows I/O limits it has no problem
>  with 4K devices. All you need is to provide all necessary information 
>  by /sys (or ioctls).
> 

I was not saying that fdisk is wrong. I was saying that if my block driver
was *not* exporting 4K physical sectors through limits.physical_block_size
then fdisk would be happy to not align my partition start on 4k and would
give me funny values like 34 for first sector which makes my device unusable
because in direct_access() API we must absolutely have 4K aligned partitions.

>> to miss-align my partitions. Depending on size maybe not the very first one but the
>> consecutive ones easily.
> 
>  it would be nice to have usable bug report...
> 

Hi Karel

Setting limits.physical_block_size = 4k; was the only way I found that could cause
fdisk to default to 4k alignment.

I was trying to play with the  heads, sectors, cylinders; values but none I tried
would cause an alignment of 4k, not even of the first partition start.

Please advise what I can do?

Thanks
Boaz

>     Karel
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux