All of lore.kernel.org
 help / color / mirror / Atom feed
* blkback and bcache
@ 2012-08-13  7:16 James Harper
       [not found] ` <6035A0D088A63A46850C3988ED045A4B299F67FA-mzsoxcrO4/2UD0RQwgcqbDSf8X3wrgjD@public.gmane.org>
  2012-08-13  7:35 ` Joseph Glanville
  0 siblings, 2 replies; 17+ messages in thread
From: James Harper @ 2012-08-13  7:16 UTC (permalink / raw)
  To: xen-devel@lists.xen.org

I'm having trouble using blkback under gplpv when the disk is on top of a bcache device. My devices are layered as follows:

/dev/sd[ab]
md0 (RAID1)
bcache
lvm

It seems that bcache presents a 4K sector size to Linux, which is then reflected by lvm and in turn blkback.

Obviously GPLPV isn't handling 4K sectors correctly... any suggestions as to what I might need to do to make this work properly? As a last resort I should be able to fake 512 byte sectors to Windows but would prefer that Windows knew it was dealing with a device with 4K sectors underneath.

Thanks

James

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Xen-devel] blkback and bcache
       [not found] ` <6035A0D088A63A46850C3988ED045A4B299F67FA-mzsoxcrO4/2UD0RQwgcqbDSf8X3wrgjD@public.gmane.org>
@ 2012-08-13  7:35   ` Joseph Glanville
  2012-08-13  8:17     ` James Harper
       [not found]     ` <CAOzFzEhna3CaBE28aHVX_ZoNLDEa6AhArHPcB9240Ni4jh9PYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 2 replies; 17+ messages in thread
From: Joseph Glanville @ 2012-08-13  7:35 UTC (permalink / raw)
  To: James Harper
  Cc: xen-devel-GuqFBffKawuEi8DpZVb4nw@public.gmane.org,
	linux-bcache-u79uwXL29TY76Z2rM5mHXA, Kent Overstreet

On 13 August 2012 17:16, James Harper <james.harper-NMzNsA1hOHcW+bLBXbPJGg@public.gmane.org> wrote:
> I'm having trouble using blkback under gplpv when the disk is on top of a bcache device. My devices are layered as follows:
>
> /dev/sd[ab]
> md0 (RAID1)
> bcache
> lvm
>
> It seems that bcache presents a 4K sector size to Linux, which is then reflected by lvm and in turn blkback.
>
> Obviously GPLPV isn't handling 4K sectors correctly... any suggestions as to what I might need to do to make this work properly? As a last resort I should be able to fake 512 byte sectors to Windows but would prefer that Windows knew it was dealing with a device with 4K sectors underneath.
>
> Thanks
>
> James
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel-GuqFBffKawuEi8DpZVb4nw@public.gmane.org
> http://lists.xen.org/xen-devel

This could very well be the issue I was having, I haven't been able to
pull the latest bcache code for a few days (repo down?) but if I can
help debug let me know.

-- 
CTO | Orion Virtualisation Solutions | www.orionvm.com.au
Phone: 1300 56 99 52 | Mobile: 0428 754 846

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: blkback and bcache
  2012-08-13  7:16 blkback and bcache James Harper
       [not found] ` <6035A0D088A63A46850C3988ED045A4B299F67FA-mzsoxcrO4/2UD0RQwgcqbDSf8X3wrgjD@public.gmane.org>
@ 2012-08-13  7:35 ` Joseph Glanville
  1 sibling, 0 replies; 17+ messages in thread
From: Joseph Glanville @ 2012-08-13  7:35 UTC (permalink / raw)
  To: James Harper; +Cc: linux-bcache, Kent Overstreet, xen-devel@lists.xen.org

On 13 August 2012 17:16, James Harper <james.harper@bendigoit.com.au> wrote:
> I'm having trouble using blkback under gplpv when the disk is on top of a bcache device. My devices are layered as follows:
>
> /dev/sd[ab]
> md0 (RAID1)
> bcache
> lvm
>
> It seems that bcache presents a 4K sector size to Linux, which is then reflected by lvm and in turn blkback.
>
> Obviously GPLPV isn't handling 4K sectors correctly... any suggestions as to what I might need to do to make this work properly? As a last resort I should be able to fake 512 byte sectors to Windows but would prefer that Windows knew it was dealing with a device with 4K sectors underneath.
>
> Thanks
>
> James
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

This could very well be the issue I was having, I haven't been able to
pull the latest bcache code for a few days (repo down?) but if I can
help debug let me know.

-- 
CTO | Orion Virtualisation Solutions | www.orionvm.com.au
Phone: 1300 56 99 52 | Mobile: 0428 754 846

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [Xen-devel] blkback and bcache
       [not found]     ` <CAOzFzEhna3CaBE28aHVX_ZoNLDEa6AhArHPcB9240Ni4jh9PYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-08-13  8:17       ` James Harper
       [not found]         ` <6035A0D088A63A46850C3988ED045A4B299F6A9B-mzsoxcrO4/2UD0RQwgcqbDSf8X3wrgjD@public.gmane.org>
  2012-08-13 10:53         ` Joseph Glanville
  0 siblings, 2 replies; 17+ messages in thread
From: James Harper @ 2012-08-13  8:17 UTC (permalink / raw)
  To: Joseph Glanville
  Cc: xen-devel-GuqFBffKawuEi8DpZVb4nw@public.gmane.org,
	linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Kent Overstreet

> 
> This could very well be the issue I was having, I haven't been able to pull the
> latest bcache code for a few days (repo down?) but if I can help debug let me
> know.
> 

Is it Windows or Linux giving you problems? I've only tested Windows so far.

James

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: blkback and bcache
  2012-08-13  7:35   ` [Xen-devel] " Joseph Glanville
@ 2012-08-13  8:17     ` James Harper
       [not found]     ` <CAOzFzEhna3CaBE28aHVX_ZoNLDEa6AhArHPcB9240Ni4jh9PYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  1 sibling, 0 replies; 17+ messages in thread
From: James Harper @ 2012-08-13  8:17 UTC (permalink / raw)
  To: Joseph Glanville
  Cc: linux-bcache@vger.kernel.org, Kent Overstreet,
	xen-devel@lists.xen.org

> 
> This could very well be the issue I was having, I haven't been able to pull the
> latest bcache code for a few days (repo down?) but if I can help debug let me
> know.
> 

Is it Windows or Linux giving you problems? I've only tested Windows so far.

James

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Xen-devel] blkback and bcache
       [not found]         ` <6035A0D088A63A46850C3988ED045A4B299F6A9B-mzsoxcrO4/2UD0RQwgcqbDSf8X3wrgjD@public.gmane.org>
@ 2012-08-13 10:53           ` Joseph Glanville
  2012-08-13 21:34             ` Kent Overstreet
       [not found]             ` <CAOzFzEhF+Pb89PNoibBc-9_Db6OUiyG5R8mKkAPi5pns4+CsAg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 2 replies; 17+ messages in thread
From: Joseph Glanville @ 2012-08-13 10:53 UTC (permalink / raw)
  To: James Harper
  Cc: xen-devel-GuqFBffKawuEi8DpZVb4nw@public.gmane.org,
	linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Kent Overstreet

On 13 August 2012 18:17, James Harper <james.harper-NMzNsA1hOHcW+bLBXbPJGg@public.gmane.org> wrote:
>>
>> This could very well be the issue I was having, I haven't been able to pull the
>> latest bcache code for a few days (repo down?) but if I can help debug let me
>> know.
>>
>
> Is it Windows or Linux giving you problems? I've only tested Windows so far.
>
> James
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Both, I wasn't able to get either to work correctly with blkback.

-- 
CTO | Orion Virtualisation Solutions | www.orionvm.com.au
Phone: 1300 56 99 52 | Mobile: 0428 754 846

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: blkback and bcache
  2012-08-13  8:17       ` [Xen-devel] " James Harper
       [not found]         ` <6035A0D088A63A46850C3988ED045A4B299F6A9B-mzsoxcrO4/2UD0RQwgcqbDSf8X3wrgjD@public.gmane.org>
@ 2012-08-13 10:53         ` Joseph Glanville
  1 sibling, 0 replies; 17+ messages in thread
From: Joseph Glanville @ 2012-08-13 10:53 UTC (permalink / raw)
  To: James Harper
  Cc: linux-bcache@vger.kernel.org, Kent Overstreet,
	xen-devel@lists.xen.org

On 13 August 2012 18:17, James Harper <james.harper@bendigoit.com.au> wrote:
>>
>> This could very well be the issue I was having, I haven't been able to pull the
>> latest bcache code for a few days (repo down?) but if I can help debug let me
>> know.
>>
>
> Is it Windows or Linux giving you problems? I've only tested Windows so far.
>
> James
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Both, I wasn't able to get either to work correctly with blkback.

-- 
CTO | Orion Virtualisation Solutions | www.orionvm.com.au
Phone: 1300 56 99 52 | Mobile: 0428 754 846

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Xen-devel] blkback and bcache
       [not found]             ` <CAOzFzEhF+Pb89PNoibBc-9_Db6OUiyG5R8mKkAPi5pns4+CsAg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-08-13 21:34               ` Kent Overstreet
  2012-08-13 23:30                 ` James Harper
       [not found]                 ` <20120813213455.GC6887-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
  0 siblings, 2 replies; 17+ messages in thread
From: Kent Overstreet @ 2012-08-13 21:34 UTC (permalink / raw)
  To: Joseph Glanville
  Cc: James Harper, xen-devel-GuqFBffKawuEi8DpZVb4nw@public.gmane.org,
	linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On Mon, Aug 13, 2012 at 08:53:44PM +1000, Joseph Glanville wrote:
> On 13 August 2012 18:17, James Harper <james.harper-NMzNsA1hOHcW+bLBXbPJGg@public.gmane.org> wrote:
> >>
> >> This could very well be the issue I was having, I haven't been able to pull the
> >> latest bcache code for a few days (repo down?) but if I can help debug let me
> >> know.
> >>
> >
> > Is it Windows or Linux giving you problems? I've only tested Windows so far.
> >
> > James
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
> > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> Both, I wasn't able to get either to work correctly with blkback.

Just mentioned this in the other thread, but if this is due to the 4k
blocksize - that's easy to fix: just format with 512 byte blocksize

make-bcache --block 512

Maybe I should change the default.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: blkback and bcache
  2012-08-13 10:53           ` Joseph Glanville
@ 2012-08-13 21:34             ` Kent Overstreet
       [not found]             ` <CAOzFzEhF+Pb89PNoibBc-9_Db6OUiyG5R8mKkAPi5pns4+CsAg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  1 sibling, 0 replies; 17+ messages in thread
From: Kent Overstreet @ 2012-08-13 21:34 UTC (permalink / raw)
  To: Joseph Glanville
  Cc: linux-bcache@vger.kernel.org, James Harper,
	xen-devel@lists.xen.org

On Mon, Aug 13, 2012 at 08:53:44PM +1000, Joseph Glanville wrote:
> On 13 August 2012 18:17, James Harper <james.harper@bendigoit.com.au> wrote:
> >>
> >> This could very well be the issue I was having, I haven't been able to pull the
> >> latest bcache code for a few days (repo down?) but if I can help debug let me
> >> know.
> >>
> >
> > Is it Windows or Linux giving you problems? I've only tested Windows so far.
> >
> > James
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> Both, I wasn't able to get either to work correctly with blkback.

Just mentioned this in the other thread, but if this is due to the 4k
blocksize - that's easy to fix: just format with 512 byte blocksize

make-bcache --block 512

Maybe I should change the default.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [Xen-devel] blkback and bcache
       [not found]                 ` <20120813213455.GC6887-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
@ 2012-08-13 23:30                   ` James Harper
  2012-08-15 12:40                     ` Joseph Glanville
       [not found]                     ` <6035A0D088A63A46850C3988ED045A4B299F80E1-mzsoxcrO4/2UD0RQwgcqbDSf8X3wrgjD@public.gmane.org>
  0 siblings, 2 replies; 17+ messages in thread
From: James Harper @ 2012-08-13 23:30 UTC (permalink / raw)
  To: Kent Overstreet, Joseph Glanville
  Cc: xen-devel-GuqFBffKawuEi8DpZVb4nw@public.gmane.org,
	linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

> 
> Just mentioned this in the other thread, but if this is due to the 4k blocksize -
> that's easy to fix: just format with 512 byte blocksize
> 
> make-bcache --block 512
> 
> Maybe I should change the default.

I suggest making the default 512, but also print a warning if the user didn't explicitly set it,eg "Block size not set - defaulting to 512 bytes"

James

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: blkback and bcache
  2012-08-13 21:34               ` [Xen-devel] " Kent Overstreet
@ 2012-08-13 23:30                 ` James Harper
       [not found]                 ` <20120813213455.GC6887-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
  1 sibling, 0 replies; 17+ messages in thread
From: James Harper @ 2012-08-13 23:30 UTC (permalink / raw)
  To: Kent Overstreet, Joseph Glanville
  Cc: linux-bcache@vger.kernel.org, xen-devel@lists.xen.org

> 
> Just mentioned this in the other thread, but if this is due to the 4k blocksize -
> that's easy to fix: just format with 512 byte blocksize
> 
> make-bcache --block 512
> 
> Maybe I should change the default.

I suggest making the default 512, but also print a warning if the user didn't explicitly set it,eg "Block size not set - defaulting to 512 bytes"

James

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Xen-devel] blkback and bcache
       [not found]                     ` <6035A0D088A63A46850C3988ED045A4B299F80E1-mzsoxcrO4/2UD0RQwgcqbDSf8X3wrgjD@public.gmane.org>
@ 2012-08-15 12:40                       ` Joseph Glanville
       [not found]                         ` <CAOzFzEitP95cy4LKJD+H1ffBLP_OjxWPTYCEd=XNkb-i5Mz39w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2012-08-15 20:04                         ` Kent Overstreet
  0 siblings, 2 replies; 17+ messages in thread
From: Joseph Glanville @ 2012-08-15 12:40 UTC (permalink / raw)
  To: James Harper
  Cc: Kent Overstreet,
	xen-devel-GuqFBffKawuEi8DpZVb4nw@public.gmane.org,
	linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

Hi James, Kent.

I can confirm this is the issue I was seeing, thanks for locating the
blkback issue!
Is there anything xen-devel should be doing about this? I wouldn't
expect blkback to care about block size...

Joseph.

On 14 August 2012 09:30, James Harper <james.harper-NMzNsA1hOHcW+bLBXbPJGg@public.gmane.org> wrote:
>>
>> Just mentioned this in the other thread, but if this is due to the 4k blocksize -
>> that's easy to fix: just format with 512 byte blocksize
>>
>> make-bcache --block 512
>>
>> Maybe I should change the default.
>
> I suggest making the default 512, but also print a warning if the user didn't explicitly set it,eg "Block size not set - defaulting to 512 bytes"
>
> James
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
CTO | Orion Virtualisation Solutions | www.orionvm.com.au
Phone: 1300 56 99 52 | Mobile: 0428 754 846

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: blkback and bcache
  2012-08-13 23:30                   ` [Xen-devel] " James Harper
@ 2012-08-15 12:40                     ` Joseph Glanville
       [not found]                     ` <6035A0D088A63A46850C3988ED045A4B299F80E1-mzsoxcrO4/2UD0RQwgcqbDSf8X3wrgjD@public.gmane.org>
  1 sibling, 0 replies; 17+ messages in thread
From: Joseph Glanville @ 2012-08-15 12:40 UTC (permalink / raw)
  To: James Harper
  Cc: Kent Overstreet, linux-bcache@vger.kernel.org,
	xen-devel@lists.xen.org

Hi James, Kent.

I can confirm this is the issue I was seeing, thanks for locating the
blkback issue!
Is there anything xen-devel should be doing about this? I wouldn't
expect blkback to care about block size...

Joseph.

On 14 August 2012 09:30, James Harper <james.harper@bendigoit.com.au> wrote:
>>
>> Just mentioned this in the other thread, but if this is due to the 4k blocksize -
>> that's easy to fix: just format with 512 byte blocksize
>>
>> make-bcache --block 512
>>
>> Maybe I should change the default.
>
> I suggest making the default 512, but also print a warning if the user didn't explicitly set it,eg "Block size not set - defaulting to 512 bytes"
>
> James
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
CTO | Orion Virtualisation Solutions | www.orionvm.com.au
Phone: 1300 56 99 52 | Mobile: 0428 754 846

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Xen-devel] blkback and bcache
       [not found]                         ` <CAOzFzEitP95cy4LKJD+H1ffBLP_OjxWPTYCEd=XNkb-i5Mz39w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-08-15 20:04                           ` Kent Overstreet
       [not found]                             ` <20120815200418.GA2758-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
  2012-08-15 23:48                             ` James Harper
  0 siblings, 2 replies; 17+ messages in thread
From: Kent Overstreet @ 2012-08-15 20:04 UTC (permalink / raw)
  To: Joseph Glanville
  Cc: James Harper, xen-devel-GuqFBffKawuEi8DpZVb4nw@public.gmane.org,
	linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On Wed, Aug 15, 2012 at 10:40:08PM +1000, Joseph Glanville wrote:
> Hi James, Kent.
> 
> I can confirm this is the issue I was seeing, thanks for locating the
> blkback issue!

Cool!

> Is there anything xen-devel should be doing about this? I wouldn't
> expect blkback to care about block size...

Well, I wouldn't be surprised if Windows doesn't work on a device with
block size > 512 bytes. But Linux (ext4 at least) certaintly does work
with 4k blocks - unless maybe it was breaking on something in the boot
process?

So it sounds like this might be indicative of a bug in blkback.

> Joseph.
> 
> On 14 August 2012 09:30, James Harper <james.harper-NMzNsA1hOHcW+bLBXbPJGg@public.gmane.org> wrote:
> >>
> >> Just mentioned this in the other thread, but if this is due to the 4k blocksize -
> >> that's easy to fix: just format with 512 byte blocksize
> >>
> >> make-bcache --block 512
> >>
> >> Maybe I should change the default.
> >
> > I suggest making the default 512, but also print a warning if the user didn't explicitly set it,eg "Block size not set - defaulting to 512 bytes"
> >
> > James
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
> > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
> 
> -- 
> CTO | Orion Virtualisation Solutions | www.orionvm.com.au
> Phone: 1300 56 99 52 | Mobile: 0428 754 846

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: blkback and bcache
  2012-08-15 12:40                       ` [Xen-devel] " Joseph Glanville
       [not found]                         ` <CAOzFzEitP95cy4LKJD+H1ffBLP_OjxWPTYCEd=XNkb-i5Mz39w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-08-15 20:04                         ` Kent Overstreet
  1 sibling, 0 replies; 17+ messages in thread
From: Kent Overstreet @ 2012-08-15 20:04 UTC (permalink / raw)
  To: Joseph Glanville
  Cc: linux-bcache@vger.kernel.org, James Harper,
	xen-devel@lists.xen.org

On Wed, Aug 15, 2012 at 10:40:08PM +1000, Joseph Glanville wrote:
> Hi James, Kent.
> 
> I can confirm this is the issue I was seeing, thanks for locating the
> blkback issue!

Cool!

> Is there anything xen-devel should be doing about this? I wouldn't
> expect blkback to care about block size...

Well, I wouldn't be surprised if Windows doesn't work on a device with
block size > 512 bytes. But Linux (ext4 at least) certaintly does work
with 4k blocks - unless maybe it was breaking on something in the boot
process?

So it sounds like this might be indicative of a bug in blkback.

> Joseph.
> 
> On 14 August 2012 09:30, James Harper <james.harper@bendigoit.com.au> wrote:
> >>
> >> Just mentioned this in the other thread, but if this is due to the 4k blocksize -
> >> that's easy to fix: just format with 512 byte blocksize
> >>
> >> make-bcache --block 512
> >>
> >> Maybe I should change the default.
> >
> > I suggest making the default 512, but also print a warning if the user didn't explicitly set it,eg "Block size not set - defaulting to 512 bytes"
> >
> > James
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
> 
> -- 
> CTO | Orion Virtualisation Solutions | www.orionvm.com.au
> Phone: 1300 56 99 52 | Mobile: 0428 754 846

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [Xen-devel] blkback and bcache
       [not found]                             ` <20120815200418.GA2758-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
@ 2012-08-15 23:48                               ` James Harper
  0 siblings, 0 replies; 17+ messages in thread
From: James Harper @ 2012-08-15 23:48 UTC (permalink / raw)
  To: Kent Overstreet, Joseph Glanville
  Cc: xen-devel-GuqFBffKawuEi8DpZVb4nw@public.gmane.org,
	linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

> > Is there anything xen-devel should be doing about this? I wouldn't
> > expect blkback to care about block size...
> 
> Well, I wouldn't be surprised if Windows doesn't work on a device with block
> size > 512 bytes. But Linux (ext4 at least) certaintly does work with 4k blocks -
> unless maybe it was breaking on something in the boot process?
> 
> So it sounds like this might be indicative of a bug in blkback.
> 

As far as I can tell, blkback works internally in 512 byte sectors, but does a bounds check of the 512 byte sector offset against the native sector count, so if you have 4K sectors you get an error trying to access anything past 1/8th of the disk. This is a problem, but qemu can't boot off anything but 512 byte sectors so that is the more limiting factor. I suspect a more thorough audit of blkback's behaviour wrt 4K sectors would be in order before simply fixing the bounds check bug, although it seems to work fine.

Curiously, despite literature to the contrary, Windows itself doesn't seem to care if the sector size is 4K. I added a second disk to an already running Windows DomU, partitioned it, and formatted it, and tested it (copying files on, off, rebooting, etc). As long as the size of my partition was <1/8th the size of the disk it worked fine.

James

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: blkback and bcache
  2012-08-15 20:04                           ` Kent Overstreet
       [not found]                             ` <20120815200418.GA2758-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
@ 2012-08-15 23:48                             ` James Harper
  1 sibling, 0 replies; 17+ messages in thread
From: James Harper @ 2012-08-15 23:48 UTC (permalink / raw)
  To: Kent Overstreet, Joseph Glanville
  Cc: linux-bcache@vger.kernel.org, xen-devel@lists.xen.org

> > Is there anything xen-devel should be doing about this? I wouldn't
> > expect blkback to care about block size...
> 
> Well, I wouldn't be surprised if Windows doesn't work on a device with block
> size > 512 bytes. But Linux (ext4 at least) certaintly does work with 4k blocks -
> unless maybe it was breaking on something in the boot process?
> 
> So it sounds like this might be indicative of a bug in blkback.
> 

As far as I can tell, blkback works internally in 512 byte sectors, but does a bounds check of the 512 byte sector offset against the native sector count, so if you have 4K sectors you get an error trying to access anything past 1/8th of the disk. This is a problem, but qemu can't boot off anything but 512 byte sectors so that is the more limiting factor. I suspect a more thorough audit of blkback's behaviour wrt 4K sectors would be in order before simply fixing the bounds check bug, although it seems to work fine.

Curiously, despite literature to the contrary, Windows itself doesn't seem to care if the sector size is 4K. I added a second disk to an already running Windows DomU, partitioned it, and formatted it, and tested it (copying files on, off, rebooting, etc). As long as the size of my partition was <1/8th the size of the disk it worked fine.

James

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2012-08-15 23:48 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-13  7:16 blkback and bcache James Harper
     [not found] ` <6035A0D088A63A46850C3988ED045A4B299F67FA-mzsoxcrO4/2UD0RQwgcqbDSf8X3wrgjD@public.gmane.org>
2012-08-13  7:35   ` [Xen-devel] " Joseph Glanville
2012-08-13  8:17     ` James Harper
     [not found]     ` <CAOzFzEhna3CaBE28aHVX_ZoNLDEa6AhArHPcB9240Ni4jh9PYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-08-13  8:17       ` [Xen-devel] " James Harper
     [not found]         ` <6035A0D088A63A46850C3988ED045A4B299F6A9B-mzsoxcrO4/2UD0RQwgcqbDSf8X3wrgjD@public.gmane.org>
2012-08-13 10:53           ` Joseph Glanville
2012-08-13 21:34             ` Kent Overstreet
     [not found]             ` <CAOzFzEhF+Pb89PNoibBc-9_Db6OUiyG5R8mKkAPi5pns4+CsAg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-08-13 21:34               ` [Xen-devel] " Kent Overstreet
2012-08-13 23:30                 ` James Harper
     [not found]                 ` <20120813213455.GC6887-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-08-13 23:30                   ` [Xen-devel] " James Harper
2012-08-15 12:40                     ` Joseph Glanville
     [not found]                     ` <6035A0D088A63A46850C3988ED045A4B299F80E1-mzsoxcrO4/2UD0RQwgcqbDSf8X3wrgjD@public.gmane.org>
2012-08-15 12:40                       ` [Xen-devel] " Joseph Glanville
     [not found]                         ` <CAOzFzEitP95cy4LKJD+H1ffBLP_OjxWPTYCEd=XNkb-i5Mz39w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-08-15 20:04                           ` Kent Overstreet
     [not found]                             ` <20120815200418.GA2758-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-08-15 23:48                               ` James Harper
2012-08-15 23:48                             ` James Harper
2012-08-15 20:04                         ` Kent Overstreet
2012-08-13 10:53         ` Joseph Glanville
2012-08-13  7:35 ` Joseph Glanville

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.