From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: James Harper <james.harper@bendigoit.com.au>
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: bug when using 4K sectors?
Date: Thu, 6 Sep 2012 06:58:22 -0400 [thread overview]
Message-ID: <20120906105822.GB3668@phenom.dumpdata.com> (raw)
In-Reply-To: <6035A0D088A63A46850C3988ED045A4B29B5D23E@BITCOM1.int.sbss.com.au>
On Wed, Sep 05, 2012 at 11:56:08PM +0000, James Harper wrote:
> > On Mon, Aug 13, 2012 at 02:12:58PM +0000, James Harper wrote:
> > > I notice this code in drivers/block/xen-blkback/common.h
> > >
> > > #define vbd_sz(_v) ((_v)->bdev->bd_part ? \
> > > (_v)->bdev->bd_part->nr_sects : \
> > > get_capacity((_v)->bdev->bd_disk))
> > >
> > > is the value returned by vbd_sz(_v) the number of sectors in the Linux
> > > device (eg size / 4096), or the number of 512 byte sectors? I suspect
> > > the former which is causing block requests beyond 1/8th the size of
> > > the device to fail (assuming 4K sectors are expected to work at all -
> > > I can't quite get my head around how it would be expected to work -
> > > does Linux do the read-modify-write if required?)
> >
> > I think you need to instrument it to be sure.. But more interesting, do you
> > actually have a disk that exposes a 4KB hardware and logical sector? So far
> > I've only found SSDs that expose a 512kB logical sector but also expose the
> > 4KB hardware.
> >
> > Never could figure out how that is all suppose to work as the blkback is filled
> > with << 9 on a bunch of things.
> >
>
> I was using bcache which does expose a 4K block size, by default. I changed it to 512 and it all works now, although I haven't tested if there is any loss of performance.
OK, let me see how I can setup bcache and play with that.
>
> Does Xen provide a way to tell Windows that the underlying device is 512e (4K sector with 512 byte emulated interface)? This would keep everything working as is but allow windows to align writes to 4K boundaries where possible.
We can certainly expose that via the XenBus interface.
>
> James
next prev parent reply other threads:[~2012-09-06 10:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-13 14:12 bug when using 4K sectors? James Harper
2012-09-05 20:29 ` Konrad Rzeszutek Wilk
2012-09-05 23:56 ` James Harper
2012-09-06 10:58 ` Konrad Rzeszutek Wilk [this message]
2012-09-16 7:00 ` Joseph Glanville
2012-09-16 8:31 ` Keir Fraser
2012-09-16 9:00 ` Joseph Glanville
2012-09-16 10:37 ` James Harper
2012-09-16 11:18 ` Keir Fraser
2012-09-16 11:21 ` James Harper
2012-09-16 11:27 ` Alan Cox
2012-09-16 11:50 ` James Harper
2012-09-16 16:07 ` Alan Cox
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=20120906105822.GB3668@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=james.harper@bendigoit.com.au \
--cc=xen-devel@lists.xen.org \
/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;
as well as URLs for NNTP newsgroup(s).