[dm-devel] Is there a way to see updated contents of a DM target's underlying device while the DM target is in use?

Malahal Naineni malahal at us.ibm.com
Thu Jul 1 19:00:17 UTC 2010


Riches Jr, RobertX M [robertx.m.riches.jr at intel.com] wrote:
> Many thanks to those who responded with helpful suggestions.  A couple of the suggestions were sufficient to make my test script behave as I expect--to liberate the data that had been stuck in the page cache twilight zone.  :-)
> 
> For the benefit of anyone who might come across the archives with a similar problem, here's what worked and what didn't, with all actions taken between writing and reading:
> 
>   - Using 'dd -iflag=direct' to read from /dev/vg1/lv1 (the underlying device) worked.
> 
>   - Doing 'blockdev --flushbufs /dev/vg1/lv1' (on the underlying device) worked.
> 
>   - Doing 'blockdev --flushbufs /dev/mapper/fred01' (on the device exposed by dm-linear or my module) did not solve the problem.

I wonder why flushing the underlying device worked but not the actual
device itself. I expected the opposite! :-(




More information about the dm-devel mailing list