From: Mike Snitzer <snitzer@redhat.com>
To: hare@suse.de
Cc: Junichi Nomura <j-nomura@ce.jp.nec.com>, dm-devel@redhat.com
Subject: Re: [PATCH v2 2/2] dm: allow active and inactive tables to share dm_devs
Date: Thu, 18 Sep 2014 14:48:26 -0400 [thread overview]
Message-ID: <20140918184826.GA10829@redhat.com> (raw)
In-Reply-To: <1411056149-16418-3-git-send-email-snitzer@redhat.com>
I've revised the header for this patch:
https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=for-next&id=d379c2886c48b32d5f4cf70a27ba2409e127b6f7
dm: allow active and inactive tables to share dm_devs
Until this change, when loading a new DM table, DM core would re-open
all of the devices in the DM table. Now, DM core will avoid redundant
device opens (and closes when destroying the old table) if the old table
already has a device open using the same mode. This is achieved by
managing reference counts on the table_devices that DM core now stores
in the mapped_device structure (rather than in the dm_table
structure). So a mapped_device's active and inactive dm_tables' dm_dev
lists now just point to the dm_devs stored in the mapped_device's
table_devices list.
This improvement in DM core's device reference counting has the
side-effect of fixing a long-standing limitation of the multipath
target: a DM multipath table couldn't include any paths that were
unusable (failed). For example: if all paths have failed and you add a
new, working, path to the table; you can't use it since the table load
would fail due to it still containing failed paths. Now a re-load of a
multipath table can include failed devices and when those devices become
active again they can be used instantly.
The device list code in dm.c isn't a straight copy/paste from the code
in dm-table.c, but it's very close (aside from some variable
renames). One subtle difference is that find_table_device for the
tables_devices list will only match devices with the same name and
mode. This is because we don't want to upgrade a device's mode in the
active table when an inactive table is loaded. Access to the
mapped_device structure's tables_devices list requires a mutex
(tables_devices_lock), so that tables cannot be created and destroyed
concurrently.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
next prev parent reply other threads:[~2014-09-18 18:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-13 18:53 [PATCH 0/2] dm: alternate solution to reloading with failed paths Benjamin Marzinski
2014-08-13 18:53 ` [PATCH 1/2] dm-multipath: cleanup IO queueing after table load Benjamin Marzinski
2014-08-14 2:46 ` Mike Snitzer
2014-08-15 15:46 ` Benjamin Marzinski
2014-08-13 18:53 ` [PATCH 2/2] device-mapper: allow tables to share dm_devs Benjamin Marzinski
2014-09-15 21:44 ` [PATCH 0/2] dm: alternate solution to reloading with failed paths Mike Snitzer
2014-09-16 16:46 ` Benjamin Marzinski
2014-09-18 16:02 ` [PATCH v2 " Mike Snitzer
2014-09-18 16:02 ` [PATCH v2 1/2] dm mpath: stop queueing IO when no valid paths exist Mike Snitzer
2014-09-18 16:02 ` [PATCH v2 2/2] dm: allow active and inactive tables to share dm_devs Mike Snitzer
2014-09-18 18:48 ` Mike Snitzer [this message]
2014-09-18 18:50 ` [PATCH v2 0/2] dm: alternate solution to reloading with failed paths Mike Snitzer
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=20140918184826.GA10829@redhat.com \
--to=snitzer@redhat.com \
--cc=dm-devel@redhat.com \
--cc=hare@suse.de \
--cc=j-nomura@ce.jp.nec.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.