DRBD code reorganization
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest26 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/26 | drbd: Add missing error gotodrivers/ | +1 | 0 replies | |
| 2/26 | idr: Add new function idr_is_empty()include/ lib/ | +11 | 0 replies | |
| 3/26 | drbd: Describe the future high-level structure of DRBDDocumentation/ | +38 | 0 replies | |
| 4/26 | drbd: Split off on-the-wire protocol definitionsdrivers/ drivers/ drivers/ +4 more | +301 | 0 replies | |
| 5/26 | drbd: Rename struct drbd_conf -> struct drbd_devicedrivers/ drivers/ drivers/ +10 more | +562 | 0 replies | |
| 6/26 | drbd: Rename "mdev" to "device"drivers/ drivers/ drivers/ +10 more | +3404 | 0 replies | |
| 7/26 | drbd: Rename drbd_tconn -> drbd_connectiondrivers/ drivers/ drivers/ +9 more | +1447 | 0 replies | |
| 8/26 | drbd: Introduce "peer_device" object between "device" and "connection"drivers/ drivers/ drivers/ +8 more | +416 | 0 replies | |
| 9/26 | drbd: Improve some function and variable namingdrivers/ drivers/ drivers/ +5 more | +49 | 0 replies | |
| 10/26 | drbd: Add struct drbd_resourcedrivers/ drivers/ drivers/ | +180 | 0 replies | |
| 11/26 | drbd: drbd_adm_down(): Move valid resource name check to drbd_adm_prepare()drivers/ | +3 | 0 replies | |
| 12/26 | drbd: Add struct drbd_device->resourcedrivers/ drivers/ drivers/ | +4 | 0 replies | |
| 13/26 | drbd: Minor cleanup in conn_new_minor()drivers/ | +9 | 0 replies | |
| 14/26 | drbd: Add struct drbd_resource->devicesdrivers/ drivers/ drivers/ | +51 | 0 replies | |
| 15/26 | drbd: Replace conn_get_by_name() with drbd_find_resource()drivers/ drivers/ drivers/ | +30 | 0 replies | |
| 16/26 | drbd: conn_try_disconnect(): Use parameter instead of the global variabledrivers/ | +1 | 0 replies | |
| 17/26 | drbd: Move resource options from connection to resourcedrivers/ drivers/ drivers/ +1 more | +25 | 0 replies | |
| 18/26 | drbd: Turn connection->volumes into connection->peer_devicesdrivers/ drivers/ drivers/ +3 more | +136 | 0 replies | |
| 19/26 | drbd: Remove the terrible DEV hackdrivers/ drivers/ drivers/ +6 more | +298 | 0 replies | |
| 20/26 | drbd: Turn drbd_printk() into a polymorphic macrodrivers/ | +43 | 0 replies | |
| 21/26 | drbd: Replace and remove the obsolete conn_() macrosdrivers/ drivers/ drivers/ +3 more | +99 | 0 replies | |
| 22/26 | drbd: Add explicit device parameter to D_ASSERTdrivers/ drivers/ drivers/ +6 more | +109 | 0 replies | |
| 23/26 | drbd: Rename drbd_{create,delete}_minor -> drbd_{create,delete}_devicedrivers/ drivers/ drivers/ | +7 | 0 replies | |
| 24/26 | drbd: get_one_status(): Iterate over resource->devices instead of connection->peer_devicesdrivers/ | +45 | 0 replies | |
| 25/26 | drbd: drbd_adm_new_resource(): Check if resource exists, not if it has any connectionsdrivers/ | +1 | 0 replies | |
| 26/26 | drbd: drbd_create_device(): Take a resource instead of a connection argumentdrivers/ drivers/ drivers/ | +4 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/26] DRBD code reorganization
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
Signature · 1 line
1.7.9.5