Re: [PATCH] dm: dm-cache fails to write the cache device in writethrough mode

2013-03-25 Thread Joe Thornber
Hi Darrick, On Fri, Mar 22, 2013 at 01:11:51PM -0700, Darrick J. Wong wrote: > The new writethrough strategy for dm-cache issues a bio to the origin device, > remaps the bio to the cache device, and issues the bio to the cache device. > However, the block layer modifies bi_sector and bi_size, so w

Re: [dm-devel] [PATCH] dm: dm-cache fails to write the cache device in writethrough mode

2013-03-22 Thread Alasdair G Kergon
On Fri, Mar 22, 2013 at 01:11:51PM -0700, Darrick J. Wong wrote: > The new writethrough strategy for dm-cache issues a bio to the origin device, > remaps the bio to the cache device, and issues the bio to the cache device. > However, the block layer modifies bi_sector and bi_size, so we need to >

Re: [PATCH] dm: dm-cache fails to write the cache device in writethrough mode

2013-03-22 Thread Darrick J. Wong
On Fri, Mar 22, 2013 at 08:21:56PM +, Ben Hutchings wrote: > On Fri, 2013-03-22 at 13:11 -0700, Darrick J. Wong wrote: > > The new writethrough strategy for dm-cache issues a bio to the origin > > device, > > remaps the bio to the cache device, and issues the bio to the cache device. > > Howev

Re: [PATCH] dm: dm-cache fails to write the cache device in writethrough mode

2013-03-22 Thread Ben Hutchings
On Fri, 2013-03-22 at 13:11 -0700, Darrick J. Wong wrote: > The new writethrough strategy for dm-cache issues a bio to the origin device, > remaps the bio to the cache device, and issues the bio to the cache device. > However, the block layer modifies bi_sector and bi_size, so we need to > preserv

[PATCH] dm: dm-cache fails to write the cache device in writethrough mode

2013-03-22 Thread Darrick J. Wong
The new writethrough strategy for dm-cache issues a bio to the origin device, remaps the bio to the cache device, and issues the bio to the cache device. However, the block layer modifies bi_sector and bi_size, so we need to preserve these or else nothing gets written to the cache (bi_size == 0).