From: Vivien Bernet-Rollande <vivien.bernet-rollande@nexen.alterway.fr>
To: linux-kernel@vger.kernel.org
Subject: Flushing block-level read cache for a single (shared) device.
Date: Tue, 29 Nov 2011 11:18:28 +0100 [thread overview]
Message-ID: <4ED4B174.80300@nexen.alterway.fr> (raw)
Hi list.
I have two Xen hypervisors. Virtual machines use raw ISCSI devices for
storage.
I ran into a cache coherency issue with live migration.
Let's say VM "a" runs on hypervisor "x1", and I want to move it to "x2".
This works fine.
Now, I let "a" do some file system operations on "x2".
The problem arises when I move "a" back to "x1". What happens is x1
still has it's old caches for the iscsi LUN. After a few minutes, the
filesystem of the VM gets heavily corrupted, and is basically unrecoverable.
I'm currently working around this issue by running something like "sync;
echo 3 > /proc/sys/vm/drop_caches" on the destination before any
migration. This works, and I no longer have any data corruption. However
I feel dropping all caches is not a satisfying solution.
I'm looking for a way to invalidate the cache for a single block device.
I know of BLKFLSBUF to flush write buffers, but I couldn't find anything
related to read caches.
--
Vivien Bernet-Rollande
Systems& Networking Engineer
Alter Way Hosting
reply other threads:[~2011-11-29 10:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4ED4B174.80300@nexen.alterway.fr \
--to=vivien.bernet-rollande@nexen.alterway.fr \
--cc=linux-kernel@vger.kernel.org \
/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