From: Karel Zak <kzak@redhat.com>
To: Boaz Harrosh <boaz@plexistor.com>
Cc: Boaz Harrosh <openosd@gmail.com>,
Ross Zwisler <ross.zwisler@linux.intel.com>,
Jens Axboe <axboe@kernel.dk>,
Matthew Wilcox <willy@linux.intel.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH 4/4] brd: Request from fdisk 4k alignment
Date: Thu, 7 Aug 2014 17:21:12 +0200 [thread overview]
Message-ID: <20140807152112.GD9401@x2.net.home> (raw)
In-Reply-To: <53E385BE.40100@plexistor.com>
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@redhat.com>
http://karelzak.blogspot.com
next prev parent reply other threads:[~2014-08-07 15:21 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-06 11:27 [PATCHSET 0/4] brd: partition fixes Boaz Harrosh
2014-08-06 11:29 ` [PATCH 1/4] Change direct_access calling convention Boaz Harrosh
2014-08-06 11:30 ` [PATCH 2/4] brd: Add getgeo to block ops Boaz Harrosh
2014-08-06 17:52 ` Ross Zwisler
2014-08-07 9:20 ` Boaz Harrosh
2014-08-07 14:03 ` [PATCH 2/4 v2] " Boaz Harrosh
2014-08-07 18:20 ` One Thousand Gnomes
2014-08-08 6:52 ` Boaz Harrosh
2014-08-08 6:58 ` Davidlohr Bueso
2014-08-06 11:33 ` [PATCH 3/4] brd: Fix all partitions BUGs Boaz Harrosh
2014-08-06 23:06 ` Ross Zwisler
2014-08-07 9:11 ` Boaz Harrosh
2014-08-07 18:50 ` Ross Zwisler
2014-08-07 18:53 ` Ross Zwisler
2014-08-06 11:35 ` [PATCH 4/4] brd: Request from fdisk 4k alignment Boaz Harrosh
2014-08-06 22:03 ` Ross Zwisler
2014-08-07 12:17 ` Boaz Harrosh
2014-08-07 13:00 ` Karel Zak
2014-08-07 13:51 ` Karel Zak
2014-08-07 13:57 ` Boaz Harrosh
2014-08-07 15:21 ` Karel Zak [this message]
2014-08-07 15:40 ` Boaz Harrosh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140807152112.GD9401@x2.net.home \
--to=kzak@redhat.com \
--cc=axboe@kernel.dk \
--cc=boaz@plexistor.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=openosd@gmail.com \
--cc=ross.zwisler@linux.intel.com \
--cc=willy@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome