diff options
author | David S. Miller <davem@davemloft.net> | 2017-12-05 10:44:19 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-05 10:44:19 -0500 |
commit | 7cda4cee1366fae236678a5a6b124bab86b14973 (patch) | |
tree | 180bcb2d09e3db27050658afc36d5bac88593ed5 /drivers/md/bcache/request.c | |
parent | a3fde2addd5f0218b64102005a237ef727b0dc30 (diff) | |
parent | 2391f0b4808e3d5af348324d69f5f45c56a26836 (diff) | |
download | linux-7cda4cee1366fae236678a5a6b124bab86b14973.tar.bz2 |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Small overlapping change conflict ('net' changed a line,
'net-next' added a line right afterwards) in flexcan.c
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/md/bcache/request.c')
-rw-r--r-- | drivers/md/bcache/request.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c index 3a7aed7282b2..643c3021624f 100644 --- a/drivers/md/bcache/request.c +++ b/drivers/md/bcache/request.c @@ -708,16 +708,15 @@ static void cached_dev_read_error(struct closure *cl) { struct search *s = container_of(cl, struct search, cl); struct bio *bio = &s->bio.bio; - struct cached_dev *dc = container_of(s->d, struct cached_dev, disk); /* - * If cache device is dirty (dc->has_dirty is non-zero), then - * recovery a failed read request from cached device may get a - * stale data back. So read failure recovery is only permitted - * when cache device is clean. + * If read request hit dirty data (s->read_dirty_data is true), + * then recovery a failed read request from cached device may + * get a stale data back. So read failure recovery is only + * permitted when read request hit clean data in cache device, + * or when cache read race happened. */ - if (s->recoverable && - (dc && !atomic_read(&dc->has_dirty))) { + if (s->recoverable && !s->read_dirty_data) { /* Retry from the backing device: */ trace_bcache_read_retry(s->orig_bio); |