요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Object matrix
data-structure-v9.rst:19-42Volume과 connection 교차점, list·IDR indexing과 lifetime을 정리합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
================================
kernel data structure for DRBD-9
================================
This describes the in kernel data structure for DRBD-9. Starting with
Linux v3.14 we are reorganizing DRBD to use this data structure.
Basic Data Structure
====================
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.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
DRBD-9 기본 data structure
1-18이 문서는 DRBD-9의 in-kernel data structure를 설명합니다. Linux v3.14부터 DRBD를 이 구조로 재구성했습니다.
Node에는 여러 DRBD resource가 있습니다. Resource마다 device(volume) 여러 개와 다른 node(peer node)에 대한 connection 여러 개가 있습니다. 각 DRBD device는 local block device 하나로 표현됩니다.
DRBD object는 matrix를 이루며 `drbd_peer_device` object가 `drbd_device`와 `drbd_connection`의 각 교차점에 놓입니다.
DRBD resource·device·connection matrix
19-42 /--------------+---------------+.....+---------------\
| resource | device | | device |
+--------------+---------------+.....+---------------+
| connection | peer_device | | peer_device |
+--------------+---------------+.....+---------------+
: : : : :
: : : : :
+--------------+---------------+.....+---------------+
| connection | peer_device | | peer_device |
\--------------+---------------+.....+---------------/
Resource의 device column과 connection row가 만나는 곳마다 peer_device가 있습니다.
수평으로 resource에서 volume number로 device에 접근하고 connection에서도 volume number로 peer_device에 접근합니다. 수직 방향 object는 doubly linked list로 연결됩니다. Peer_device는 connection과 device를 가리키는 back pointer를 갖고, connection과 device는 resource를 가리킵니다.
모든 resource는 `drbd_resources` doubly-linked list에 있습니다. 모든 device는 minor device number를 key로 `drbd_devices` IDR에서도 접근할 수 있습니다.
`drbd_resource`, `drbd_connection`, `drbd_device` object는 reference-counted입니다. `peer_device`는 device와 connection 사이 link만 만들며 lifetime은 참조하는 device와 connection의 lifetime으로 결정됩니다.
Indexing, back pointer와 object lifetime 관계입니다.
Object model
data-structure-v9.rst:1-18Resource가 volume device와 peer-node connection을 소유합니다.