All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Riches Jr, RobertX M" <robertx.m.riches.jr@intel.com>
To: "Dm-Devel Mailing List Send-To Address (dm-devel@redhat.com)"
	<dm-devel@redhat.com>
Subject: any known problems when doing bio_clone() over an LVM snapshot?
Date: Wed, 7 Jul 2010 13:39:21 -0700	[thread overview]
Message-ID: <4BD43A85686FC34D819098DB1C3999D99E777071@orsmsx502.amr.corp.intel.com> (raw)


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

Are there any known problems with using bio_clone() in a DM target module when the underlying block device is an LVM logical volume and a snapshot has been created on said logical volume while the DM target module is active?

I'm developing a DM target module to do block-based change tracking.  It includes code from dm-linear, Alberto Bertogli's dm-csum, dm-delay, and some original code, and it appears to be fairly functional.  With the underlying device (the one in the table entry) being an LVM logical volume.  I have created an ext2/3 filesystem, copied all ~775MB of /usr/lib to it, and diff'ed the original /usr/lib with the copy.  My module includes the parts of dm-csum that call bio_clone() to clone the original bio into one or more pieces to convert 'evil' bios into 'nice' ones and then to convert an original 'nice' bio into the one that will be used in a bio_submit() call.

However, if I create an LVM snapshot of the underlying LV while my module is active, and then I write to the device created by my module, after my module has called bio_submit() for a metadata write to sector 256 and a data write to a higher-numbered sector, some portions of my write requests do not complete, and I see the following error messages in /var/log/syslog:

            __ratelimit: 33 callbacks suppressed
            Buffer I/O error on device dm-1, logical block 256
            lost page write due to I/O error on dm-1

If I use dm-linear, dm-delay, or dm-crypt instead of my module, there are no errors reported, and the writes appear to go through.  The main difference appears to be my use (from dm-csum) of bio_clone().  However, my module, even with bio_clone(), appears to work fine except when an LVM snapshot is created underneath it.

Any ideas on whether bio_clone() and LVM snapshots don't play well together?

Thank you,

Robert Riches
Azad Consultant at Intel



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

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



                 reply	other threads:[~2010-07-07 20:39 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=4BD43A85686FC34D819098DB1C3999D99E777071@orsmsx502.amr.corp.intel.com \
    --to=robertx.m.riches.jr@intel.com \
    --cc=dm-devel@redhat.com \
    /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 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.