Re: [PATCHv4] bcache: only permit to recovery read error when cache device is clean

2017-10-27 Thread Michael Lyle
On Fri, Oct 27, 2017 at 4:31 PM, Eric Wheeler wrote: >> Seems like something that's a lot of effort for little gain. It'll >> only help when A) everything you need isn't dirty, and > > Indeed! > >> B) all the associated btree nodes are in memory. > > Is the dirty key map not memory resident? The

Re: [PATCHv4] bcache: only permit to recovery read error when cache device is clean

2017-10-27 Thread Eric Wheeler
On Fri, 27 Oct 2017, Michael Lyle wrote: > On Fri, Oct 27, 2017 at 2:13 PM, Eric Wheeler > wrote: > [snip] > >> > Can KEY_DIRTY facilitate this? > >> > >> Don't we only have the metadata to know if the key is dirty on the > >> cache if we have the cache device? ;) > > > > Certainly if this is fo

Re: [PATCHv4] bcache: only permit to recovery read error when cache device is clean

2017-10-27 Thread Michael Lyle
On Fri, Oct 27, 2017 at 2:13 PM, Eric Wheeler wrote: [snip] >> > Can KEY_DIRTY facilitate this? >> >> Don't we only have the metadata to know if the key is dirty on the >> cache if we have the cache device? ;) > > Certainly if this is for removal or a missing cache (perhaps I missed > that). > > H

Re: [PATCHv4] bcache: only permit to recovery read error when cache device is clean

2017-10-27 Thread Eric Wheeler
On Fri, 27 Oct 2017, Michael Lyle wrote: > On Fri, Oct 27, 2017 at 12:57 PM, Eric Wheeler > wrote: > > Can this be relaxed to only error when the key failing to read is dirty? > > The liklihood of a 100% clean cache in writeback on a busy system seems > > unlikely. > > > > Can KEY_DIRTY facilitat

Re: [PATCHv4] bcache: only permit to recovery read error when cache device is clean

2017-10-27 Thread Michael Lyle
On Fri, Oct 27, 2017 at 12:57 PM, Eric Wheeler wrote: > Can this be relaxed to only error when the key failing to read is dirty? > The liklihood of a 100% clean cache in writeback on a busy system seems > unlikely. > > Can KEY_DIRTY facilitate this? Don't we only have the metadata to know if the

Re: [PATCHv4] bcache: only permit to recovery read error when cache device is clean

2017-10-27 Thread Eric Wheeler
On Tue, 17 Oct 2017, Coly Li wrote: > When bcache does read I/Os, for example in writeback or writethrough mode, > if a read request on cache device is failed, bcache will try to recovery > the request by reading from cached device. If the data on cached device is > not synced with cache device, t

[PATCHv4] bcache: only permit to recovery read error when cache device is clean

2017-10-16 Thread Coly Li
When bcache does read I/Os, for example in writeback or writethrough mode, if a read request on cache device is failed, bcache will try to recovery the request by reading from cached device. If the data on cached device is not synced with cache device, then requester will get a stale data. For cri