lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140807152112.GD9401@x2.net.home>
Date:	Thu, 7 Aug 2014 17:21:12 +0200
From:	Karel Zak <kzak@...hat.com>
To:	Boaz Harrosh <boaz@...xistor.com>
Cc:	Boaz Harrosh <openosd@...il.com>,
	Ross Zwisler <ross.zwisler@...ux.intel.com>,
	Jens Axboe <axboe@...nel.dk>,
	Matthew Wilcox <willy@...ux.intel.com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH 4/4] brd: Request from fdisk 4k alignment

On Thu, Aug 07, 2014 at 04:57:18PM +0300, Boaz Harrosh wrote:

> 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

 yep, sorry (it's probably bad idea to read emails and listen to talks on
 conference..)

> 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...
> > 
> 
> Setting limits.physical_block_size = 4k; was the only way I found that could cause
> fdisk to default to 4k alignment.

 fdisk uses physical sector size or minimal I/O size (greater value wins)

> I was trying to play with the  heads, sectors, cylinders; values but none I tried

 don't play with CHS, that's waste of time and it's completely ignored
 by fdisk by default

> would cause an alignment of 4k, not even of the first partition start.
> 
> Please advise what I can do?

 IMHO you're right with your patch (alignment offset is IMHO bad way).
 It's all (brd) about pages, is there any reason to use something else
 for I/O limits?

 It would be also nice to set minimal and optimal io size, zero values
 in this case means (for userspace) that the device does not provide
 any I/O information to system. It's normal for old hw disks and then
 we use some built-in defaults, but I don't see a reason to do the
 same for virtual devices. 

    Karel

-- 
 Karel Zak  <kzak@...hat.com>
 http://karelzak.blogspot.com
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ