Fwd: dm-cache possible race

55 views
Skip to first unread message

Ming Zhao

unread,
Oct 31, 2011, 9:27:08 PM10/31/11
to dm-c...@googlegroups.com
---------- Forwarded message ----------
From: Oded Horovitz <oded.h...@gmail.com>
Date: Mon, Oct 31, 2011 at 5:50 PM
Subject: dm-cache possible race
To: mi...@cs.fiu.edu


Hi Ming,
While using dm-cache in my project I have noticed recently (once
applying real pressure) that
the user of dm-cache see corrupted memory.
I now believe there is a race within dm-cache. (using the 2.6.29
version on 2.6.32 kernel)
In particular, I was wondering how are you protecting the cache-block
state variable?
Also, assume that a cache is populated with data, and a read request
comes. in case of cache_hit
dm-cache will reply with  1 (DM_MAPIO_REMAPPED) instead of submitting
the IO. Now assume that
a new request come which is a miss, and the same cache-block that now
have in-flight IO is selected
to be used as the cache for insertions. How does dm-cache verify that
the remapped IO from the previous
cache hit is finished? before reading the new data to the cache-block?
Thank in advance for your reply!
Oded H

Douglas Otstott

unread,
Nov 1, 2011, 2:18:51 PM11/1/11
to dm-c...@googlegroups.com
Hello Oded, 

We haven't seen an issue with race conditions before, and we have tested DM-cache extensively.  However, there was a suggestion made by another user about data corruption under a low memory environment.  Can you please be more specific about your workload and your hardware?

-Doug

Douglas Otstott

unread,
Nov 1, 2011, 3:02:06 PM11/1/11
to oded.h...@gmail.com, dm-c...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages