mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 00/26] DRBD code reorganization
@ 2013-12-20 12:28 Philipp Reisner
  2013-12-20 12:28 ` [PATCH 01/26] drbd: Add missing error goto Philipp Reisner
                   ` (25 more replies)
  0 siblings, 26 replies; 27+ messages in thread
From: Philipp Reisner @ 2013-12-20 12:28 UTC (permalink / raw)
  To: linux-kernel, Jens Axboe; +Cc: drbd-dev

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


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2013-12-20 12:47 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-20 12:28 [PATCH 00/26] DRBD code reorganization Philipp Reisner
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

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®