From: Philipp Reisner <philipp.reisner@linbit.com>
To: linux-kernel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Cc: drbd-dev@lists.linbit.com
Subject: [PATCH 00/26] DRBD code reorganization
Date: Fri, 20 Dec 2013 13:28:57 +0100 [thread overview]
Message-ID: <1387542563-6833-1-git-send-email-philipp.reisner@linbit.com> (raw)
Hi,
we are preparing DRBD for the ability to have multiple connections,
in other words the ability to mirror a single block device to multiple
peers concurrently.
This patch set is the first half of a preparation step. With part 2
it introduces a new in memory object (struct drbd_resource),
and renames the current in memory objects for clarity.
This patch set does not introduce any new functionality. The first
patch of the set is one minor bugfix. The second patch introduces
a new function for IDRs, outside of the drbd tree.
I will post the second part on Monday.
The following paragraphs describe the data structures that are set in
place by this patch set.
A node has a number of DRBD resources. Each such resource has a number of
devices (aka volumes) and connections to other nodes ("peer nodes"). Each DRBD
device is represented by a block device locally.
The DRBD objects are interconnected to form a matrix as depicted below; a
drbd_peer_device object sits at each intersection between a drbd_device and a
drbd_connection:
/--------------+---------------+.....+---------------\
| resource | device | | device |
+--------------+---------------+.....+---------------+
| connection | peer_device | | peer_device |
+--------------+---------------+.....+---------------+
: : : : :
: : : : :
+--------------+---------------+.....+---------------+
| connection | peer_device | | peer_device |
\--------------+---------------+.....+---------------/
In this table, horizontally, devices can be accessed from resources by their
volume number. Likewise, peer_devices can be accessed from connections by
their volume number. Objects in the vertical direction are connected by double
linked lists. There are back pointers from peer_devices to their connections a
devices, and from connections and devices to their resource.
All resources are in the drbd_resources double-linked list. In addition, all
devices can be accessed by their minor device number via the drbd_devices idr.
The drbd_resource, drbd_connection, and drbd_device objects are reference
counted. The peer_device objects only serve to establish the links between
devices and connections; their lifetime is determined by the lifetime of the
device and connection which they reference.
Andreas Gruenbacher (25):
idr: Add new function idr_is_empty()
drbd: Describe the future high-level structure of DRBD
drbd: Split off on-the-wire protocol definitions
drbd: Rename struct drbd_conf -> struct drbd_device
drbd: Rename "mdev" to "device"
drbd: Rename drbd_tconn -> drbd_connection
drbd: Introduce "peer_device" object between "device" and
"connection"
drbd: Improve some function and variable naming
drbd: Add struct drbd_resource
drbd: drbd_adm_down(): Move valid resource name check to
drbd_adm_prepare()
drbd: Add struct drbd_device->resource
drbd: Minor cleanup in conn_new_minor()
drbd: Add struct drbd_resource->devices
drbd: Replace conn_get_by_name() with drbd_find_resource()
drbd: conn_try_disconnect(): Use parameter instead of the global
variable
drbd: Move resource options from connection to resource
drbd: Turn connection->volumes into connection->peer_devices
drbd: Remove the terrible DEV hack
drbd: Turn drbd_printk() into a polymorphic macro
drbd: Replace and remove the obsolete conn_() macros
drbd: Add explicit device parameter to D_ASSERT
drbd: Rename drbd_{create,delete}_minor ->
drbd_{create,delete}_device
drbd: get_one_status(): Iterate over resource->devices instead of
connection->peer_devices
drbd: drbd_adm_new_resource(): Check if resource exists, not if it
has any connections
drbd: drbd_create_device(): Take a resource instead of a connection
argument
Philipp Reisner (1):
drbd: Add missing error goto
Documentation/blockdev/drbd/data-structure-v9.txt | 38 +
drivers/block/drbd/drbd_actlog.c | 624 +++---
drivers/block/drbd/drbd_bitmap.c | 360 +--
drivers/block/drbd/drbd_int.h | 1087 ++++-----
drivers/block/drbd/drbd_main.c | 1897 ++++++++--------
drivers/block/drbd/drbd_nl.c | 1539 ++++++-------
drivers/block/drbd/drbd_proc.c | 138 +-
drivers/block/drbd/drbd_protocol.h | 295 +++
drivers/block/drbd/drbd_receiver.c | 2435 +++++++++++----------
drivers/block/drbd/drbd_req.c | 455 ++--
drivers/block/drbd/drbd_req.h | 20 +-
drivers/block/drbd/drbd_state.c | 852 +++----
drivers/block/drbd/drbd_state.h | 40 +-
drivers/block/drbd/drbd_worker.c | 878 ++++----
drivers/block/drbd/drbd_wrappers.h | 14 +-
include/linux/drbd_genl.h | 4 +-
include/linux/idr.h | 1 +
lib/idr.c | 10 +
18 files changed, 5514 insertions(+), 5173 deletions(-)
create mode 100644 Documentation/blockdev/drbd/data-structure-v9.txt
create mode 100644 drivers/block/drbd/drbd_protocol.h
--
1.7.9.5
next reply other threads:[~2013-12-20 12:39 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-20 12:28 Philipp Reisner [this message]
2013-12-20 12:28 ` [PATCH 01/26] drbd: Add missing error goto Philipp Reisner
2013-12-20 12:28 ` [PATCH 02/26] idr: Add new function idr_is_empty() Philipp Reisner
2013-12-20 12:29 ` [PATCH 03/26] drbd: Describe the future high-level structure of DRBD Philipp Reisner
2013-12-20 12:29 ` [PATCH 04/26] drbd: Split off on-the-wire protocol definitions Philipp Reisner
2013-12-20 12:29 ` [PATCH 05/26] drbd: Rename struct drbd_conf -> struct drbd_device Philipp Reisner
2013-12-20 12:29 ` [PATCH 06/26] drbd: Rename "mdev" to "device" Philipp Reisner
2013-12-20 12:29 ` [PATCH 07/26] drbd: Rename drbd_tconn -> drbd_connection Philipp Reisner
2013-12-20 12:29 ` [PATCH 08/26] drbd: Introduce "peer_device" object between "device" and "connection" Philipp Reisner
2013-12-20 12:29 ` [PATCH 09/26] drbd: Improve some function and variable naming Philipp Reisner
2013-12-20 12:29 ` [PATCH 10/26] drbd: Add struct drbd_resource Philipp Reisner
2013-12-20 12:29 ` [PATCH 11/26] drbd: drbd_adm_down(): Move valid resource name check to drbd_adm_prepare() Philipp Reisner
2013-12-20 12:29 ` [PATCH 12/26] drbd: Add struct drbd_device->resource Philipp Reisner
2013-12-20 12:29 ` [PATCH 13/26] drbd: Minor cleanup in conn_new_minor() Philipp Reisner
2013-12-20 12:29 ` [PATCH 14/26] drbd: Add struct drbd_resource->devices Philipp Reisner
2013-12-20 12:29 ` [PATCH 15/26] drbd: Replace conn_get_by_name() with drbd_find_resource() Philipp Reisner
2013-12-20 12:29 ` [PATCH 16/26] drbd: conn_try_disconnect(): Use parameter instead of the global variable Philipp Reisner
2013-12-20 12:29 ` [PATCH 17/26] drbd: Move resource options from connection to resource Philipp Reisner
2013-12-20 12:29 ` [PATCH 18/26] drbd: Turn connection->volumes into connection->peer_devices Philipp Reisner
2013-12-20 12:29 ` [PATCH 19/26] drbd: Remove the terrible DEV hack Philipp Reisner
2013-12-20 12:29 ` [PATCH 20/26] drbd: Turn drbd_printk() into a polymorphic macro Philipp Reisner
2013-12-20 12:29 ` [PATCH 21/26] drbd: Replace and remove the obsolete conn_() macros Philipp Reisner
2013-12-20 12:29 ` [PATCH 22/26] drbd: Add explicit device parameter to D_ASSERT Philipp Reisner
2013-12-20 12:29 ` [PATCH 23/26] drbd: Rename drbd_{create,delete}_minor -> drbd_{create,delete}_device Philipp Reisner
2013-12-20 12:29 ` [PATCH 24/26] drbd: get_one_status(): Iterate over resource->devices instead of connection->peer_devices Philipp Reisner
2013-12-20 12:29 ` [PATCH 25/26] drbd: drbd_adm_new_resource(): Check if resource exists, not if it has any connections Philipp Reisner
2013-12-20 12:29 ` [PATCH 26/26] drbd: drbd_create_device(): Take a resource instead of a connection argument Philipp Reisner
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=1387542563-6833-1-git-send-email-philipp.reisner@linbit.com \
--to=philipp.reisner@linbit.com \
--cc=axboe@kernel.dk \
--cc=drbd-dev@lists.linbit.com \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®