All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alasdair G Kergon <agk@redhat.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: device-mapper development <dm-devel@redhat.com>,
	Mike Snitzer <snitzer@redhat.com>,
	jens.axboe@oracle.com
Subject: Re: Re: [PATCH v2] dm: add topology support
Date: Thu, 11 Jun 2009 00:08:04 +0100	[thread overview]
Message-ID: <20090610230804.GR647@agk-dp.fab.redhat.com> (raw)
In-Reply-To: <yq1k53j68wj.fsf@sermon.lab.mkp.net>

On Wed, Jun 10, 2009 at 06:06:36PM -0400, Martin K. Petersen wrote:
> The default limits should all be set by the block layer when setting up
> the request queue.  So my reason for inquiring was to figure out whether
> check_for_valid_limits() actually makes any difference?
 
I renamed that badly-named function earlier to:
  init_valid_queue_limits()

It should also really be shared with block/.

What's going on is that LVM prepares the new tables it wants to
build up a device stack in advance, then if everything has worked,
makes them all go live.

The validation has to happen during the first phase - backing out
the change to the device stack upon a failure is easier then as
we have not yet reached the commit point of the transaction.
The operation making the new stack live if at all possible must not
fail, because that comes within the commit logic and would make recovery
much trickier.

In dm terms, this means we have two tables - called 'live' and
'inactive'.  The first phase sets up inactive tables on all the stacked
devices involved in the transaction and that is when all the memory
needed is allocated and the validation occurs.  The second phase then
makes the inactive table live and discards the previously-live table.
The two tables are independent: the old queue limits on the dm device
are discarded and replaced by the newly-calculated ones.

Currently those limits are calculated in phase one, but we should see
about delaying this limit combination code (which should alway succeed)
until phase two (which gives userspace code more freedom in its use of
the interface).

Alasdair

  reply	other threads:[~2009-06-10 23:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-09  5:14 [PATCH v2] dm: add topology support Mike Snitzer
2009-06-10  6:51 ` Martin K. Petersen
2009-06-10 14:00   ` Mike Snitzer
2009-06-10 14:36     ` Alasdair G Kergon
2009-06-10 17:58     ` Martin K. Petersen
2009-06-10 21:12       ` Mike Snitzer
2009-06-10 22:06         ` Martin K. Petersen
2009-06-10 23:08           ` Alasdair G Kergon [this message]
2009-06-11  2:21             ` Martin K. Petersen
2009-06-11  9:43               ` Alasdair G Kergon
2009-06-12  4:58                 ` block: Introduce helper to reset queue limits to default values Martin K. Petersen
2009-06-15 14:56                   ` Mike Snitzer
2009-06-15 18:44                     ` Jens Axboe
2009-06-12  4:17             ` [PATCH v2] dm: add topology support Mike Snitzer
2009-06-12  8:45               ` Alasdair G Kergon

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=20090610230804.GR647@agk-dp.fab.redhat.com \
    --to=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=jens.axboe@oracle.com \
    --cc=martin.petersen@oracle.com \
    --cc=snitzer@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.