All of lore.kernel.org
 help / color / mirror / Atom feed
* Is there a way to see updated contents of a DM target's underlying device while the DM target is in use?
@ 2010-06-30 22:54 Riches Jr, RobertX M
  2010-06-30 23:08 ` Alasdair G Kergon
  2010-07-01  0:22 ` Neil Brown
  0 siblings, 2 replies; 13+ messages in thread
From: Riches Jr, RobertX M @ 2010-06-30 22:54 UTC (permalink / raw)
  To: Dm-Devel Mailing List Send-To Address (dm-devel@redhat.com)


[-- Attachment #1.1: Type: text/plain, Size: 2213 bytes --]

(New list member, just subscribed.  Apologies if this is not the right list for this question.)

Is there a way to see the updated contents of a DM target's underlying device while the DM target is in use?  I Googled and searched in documentation and existing code for an answer but was not able to find it.

Background:

I'm debugging a DM target that does change-tracking.  It's a combination of code from dm-linear, Alberto Bertogli's dm-csum, dm-delay, and some original code.  (The project architect does intend to properly release it under GPL per the license of the incorporated GPL pieces.)  The target reserves an early portion of the underlying device and exposes/creates/supports a device that is a linear mapping of the rest of the underlying device.  The idea is each write to the exposed device sets a corresponding bit in the reserved portion, using the write barrier trick from dm-csum's 'same' mode, to indicate which parts of the exposed device have been modified and which have not.  (I had earlier tried to use the userspace dirty-logging facility but found it to not meet our needs.)

The target is intended to be used with LVM snapshots to do block-device-level backups.  (I'm aware of filesystem-level issues with that, but the requirement is the requirement.)  The underlying device for the DM target will be an LVM logical volume.  The backup manager will send a dmsetup message to the DM target to hold all writes (and maybe reads) on indefinite delay, create an LVM snapshot of the DM target's underlying device, then flush the held bios and resume normal operation.

Problem:

The current problem I have is many updates are not visible in the DM target's underlying device until I do a 'dmsetup remove'.  When I look at the underlying device (an LVM LV) prior to 'dmsetup remove', it's not reliable whether I see what has been written by the DM target.  I have verified that the bios go out and the callbacks are called.

Any suggestions toward being able to reliably see (as in copy out) data from the underlying device or making an LVM snapshot of it while my change-tracking DM target module is still in use?

Thanks,

Robert Riches
Azad Consultant at Intel



[-- Attachment #1.2: Type: text/html, Size: 6155 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-07-02 14:52 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-30 22:54 Is there a way to see updated contents of a DM target's underlying device while the DM target is in use? Riches Jr, RobertX M
2010-06-30 23:08 ` Alasdair G Kergon
2010-06-30 23:53   ` Riches Jr, RobertX M
2010-07-01  0:51     ` Alasdair G Kergon
2010-07-01  1:01       ` Alasdair G Kergon
2010-07-01  1:03       ` Malahal Naineni
2010-07-01  1:49         ` Alasdair G Kergon
2010-07-01 16:46       ` Riches Jr, RobertX M
2010-07-01 19:00         ` Malahal Naineni
2010-07-02 14:52           ` Hannes Reinecke
2010-07-01  0:54     ` Malahal Naineni
2010-07-01  0:22 ` Neil Brown
2010-07-01  0:58   ` Malahal Naineni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.