aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorColy Li <[email protected]>2017-10-30 14:46:31 -0700
committerJens Axboe <[email protected]>2017-10-30 15:57:54 -0600
commitd59b23795933678c9638fd20c942d2b4f3cd6185 (patch)
treeec36cd791eba05e4dddcfebdb7a9872e4ada3015 /tools/perf/scripts/python/export-to-sqlite.py
parent4e9b6f20828ac880dbc1fa2fdbafae779473d1af (diff)
bcache: only permit to recovery read error when cache device is clean
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 critical storage system like database, providing stale data from recovery may result an application level data corruption, which is unacceptible. With this patch, for a failed read request in writeback or writethrough mode, recovery a recoverable read request only happens when cache device is clean. That is to say, all data on cached device is up to update. For other cache modes in bcache, read request will never hit cached_dev_read_error(), they don't need this patch. Please note, because cache mode can be switched arbitrarily in run time, a writethrough mode might be switched from a writeback mode. Therefore checking dc->has_data in writethrough mode still makes sense. Changelog: V4: Fix parens error pointed by Michael Lyle. v3: By response from Kent Oversteet, he thinks recovering stale data is a bug to fix, and option to permit it is unnecessary. So this version the sysfs file is removed. v2: rename sysfs entry from allow_stale_data_on_failure to allow_stale_data_on_failure, and fix the confusing commit log. v1: initial patch posted. [small change to patch comment spelling by mlyle] Signed-off-by: Coly Li <[email protected]> Signed-off-by: Michael Lyle <[email protected]> Reported-by: Arne Wolf <[email protected]> Reviewed-by: Michael Lyle <[email protected]> Cc: Kent Overstreet <[email protected]> Cc: Nix <[email protected]> Cc: Kai Krakow <[email protected]> Cc: Eric Wheeler <[email protected]> Cc: Junhui Tang <[email protected]> Cc: [email protected] Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions