All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: device-mapper development <dm-devel@redhat.com>,
	Alasdair G Kergon <agk@redhat.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Subject: Re: commit 6d2a78e783416ba99e36beb1d4395b785b34e867 avoids dm integrity support
Date: Tue, 31 Mar 2009 01:21:49 -0400	[thread overview]
Message-ID: <yq1bpriw9le.fsf@sermon.lab.mkp.net> (raw)
In-Reply-To: <20090330185945.GA5178@kernel.dk> (Jens Axboe's message of "Mon\, 30 Mar 2009 20\:59\:45 +0200")

>>>>> "Jens" == Jens Axboe <jens.axboe@oracle.com> writes:

Jens> The forward progress reference failed to take stacked drivers into
Jens> account, I didn't realize that they need to allocate integrity
Jens> data again as well.

Yup.  We need a bio integrity struct as well as a vector to describe the
integrity pages.

Ideally I'd like to avoid cloning the integrity bio_vec altogether.  The
only reason I do it now is because I have to keep the integrity vector
in sync with the data vector when that gets sliced and diced.  Plus
there's the suck of partial completion.

If we never changed bio_vecs this wouldn't be an issue.  One option
would be to add an offset parameter to the bio.  That way we could
completely avoid cloning bio_vecs.  That would mean a bit more
complexity in building scatterlists at the bottom of the pile but we'd
do fewer memory allocations.

I've been tinkering with that approach this evening.  I almost have it
working for the integrity vector.  Doing it for bios is obviously a much
bigger task.


Jens> Perhaps it would be cleaner to make the integrity allocation more
Jens> explicit in the supported paths, instead of hiding it in bio_set?
Jens> Dunno, haven't thought much about it, just an alternative approach

DM is the only subsystem that manually clones things.  MD uses bio_clone
and has no idea that the integrity fluff is there.  In any case I really
think the bio_set approach is a nicer interface than making every
stacking driver special-case integrity allocations.

-- 
Martin K. Petersen	Oracle Linux Engineering

      reply	other threads:[~2009-03-31  5:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-30  6:23 commit 6d2a78e783416ba99e36beb1d4395b785b34e867 avoids dm integrity support Kiyoshi Ueda
2009-03-30 18:39 ` Martin K. Petersen
2009-03-30 18:59   ` Jens Axboe
2009-03-31  5:21     ` Martin K. Petersen [this message]

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=yq1bpriw9le.fsf@sermon.lab.mkp.net \
    --to=martin.petersen@oracle.com \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=jens.axboe@oracle.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.