From: Coly Li <colyli@suse.de>
To: Nix <nix@esperi.org.uk>
Cc: linux-bcache@vger.kernel.org, linux-block@vger.kernel.org,
Kai Krakow <hurikhan77@gmail.com>,
Eric Wheeler <bcache@lists.ewheeler.net>,
Junhui Tang <tang.junhui@zte.com.cn>,
stable@vger.kernel.org
Subject: Re: [PATCH] bcache: option for recovery from staled data
Date: Sun, 17 Sep 2017 23:11:18 +0200 [thread overview]
Message-ID: <e30b6ae7-d39d-0224-d392-e6e64ebdd35c@suse.de> (raw)
In-Reply-To: <87r2v5mzhu.fsf@esperi.org.uk>
On 2017/9/17 上午11:43, Nix wrote:
> On 9 Sep 2017, Coly Li spake thusly:
>
>> 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 staled data.
>>
>> For critical storage system like database, recovery from staled data may
>> result an application level data corruption, which is unacceptible. But
>> for some other situation like multi-media stream cache, continuous service
>> may be more important and it is acceptible to fetch a staled chunk of data.
>>
>> This patch tries to solve the above conflict by adding a sysfs option
>> /sys/block/bcache<idx>/bcache/recovery_from_staled_data
>> which is defaultly cleared (to 0) as disabled. Now people can make choices
>> for different situations.
>
> 'Staled' is not a word, though perhaps it should be. You probably want
> to call it recovery_from_stale_data. But given the description below...
>
Hi Nix,
Thanks for pointing out this. Sure, I will replace all typos with
'stale'. Good suggestion :-)
>> With this patch, for a failed read request in writeback or writethrough
>> mode, recovery a recoverable read request only happens in one of the
>> following conditions,
>> - dc->has_dirty is zero. It means all data on cache device is synced to
>> cached device, the recoveried data is up-to-date.
>> - dc->has_dirty is non-zero, and dc->recovery_from_staled_data is set
>> to 1. It means there is dirty data not synced to cached device yet, but
>> option recovery_from_staled_data is set, receiving staled data is
>> explicitly acceptible for requester.
>
> ... this name is also unclear. It sounded to me like it was an option
> that recovers *from* stale data (as if the stale data was a problem to
> recover from), not an option that uses stale data to *allow* recovery.
>
> Perhaps, instead, something like stale_data_permitted or
> allow_stale_data_on_failure would be better?
>
I didn't notice such a confusion without your suggestion, thank you!
allow_stale_data_on_failure is good for me.
I will send out another patch, fix 'stale' and rename sysfs entry to
allow_stale_data_on_failure.
prev parent reply other threads:[~2017-09-17 21:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-09 17:56 [PATCH] bcache: option for recovery from staled data Coly Li
2017-09-17 9:43 ` Nix
2017-09-17 21:11 ` Coly Li [this message]
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=e30b6ae7-d39d-0224-d392-e6e64ebdd35c@suse.de \
--to=colyli@suse.de \
--cc=bcache@lists.ewheeler.net \
--cc=hurikhan77@gmail.com \
--cc=linux-bcache@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=nix@esperi.org.uk \
--cc=stable@vger.kernel.org \
--cc=tang.junhui@zte.com.cn \
/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