drivers/block/drbd/drbd_nl_gen.c
Source file repositories/reference/linux-study-clean/drivers/block/drbd/drbd_nl_gen.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/block/drbd/drbd_nl_gen.c- Extension
.c- Size
- 81737 bytes
- Lines
- 2607
- Domain
- Driver Families
- Bucket
- drivers/block
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
net/netlink.hnet/genetlink.hlinux/kernel.hlinux/slab.hdrbd_nl_gen.huapi/linux/drbd_genl.hlinux/drbd.hlinux/drbd_limits.h
Detected Declarations
function __drbd_cfg_context_from_attrsfunction drbd_cfg_context_from_attrsfunction drbd_cfg_context_ntb_from_attrsfunction __disk_conf_from_attrsfunction disk_conf_from_attrsfunction disk_conf_ntb_from_attrsfunction __res_opts_from_attrsfunction res_opts_from_attrsfunction res_opts_ntb_from_attrsfunction __net_conf_from_attrsfunction net_conf_from_attrsfunction net_conf_ntb_from_attrsfunction __set_role_parms_from_attrsfunction set_role_parms_from_attrsfunction set_role_parms_ntb_from_attrsfunction __resize_parms_from_attrsfunction resize_parms_from_attrsfunction resize_parms_ntb_from_attrsfunction __start_ov_parms_from_attrsfunction start_ov_parms_from_attrsfunction start_ov_parms_ntb_from_attrsfunction __new_c_uuid_parms_from_attrsfunction new_c_uuid_parms_from_attrsfunction new_c_uuid_parms_ntb_from_attrsfunction __disconnect_parms_from_attrsfunction disconnect_parms_from_attrsfunction disconnect_parms_ntb_from_attrsfunction __detach_parms_from_attrsfunction detach_parms_from_attrsfunction detach_parms_ntb_from_attrsfunction __resource_info_from_attrsfunction resource_info_from_attrsfunction resource_info_ntb_from_attrsfunction __device_info_from_attrsfunction device_info_from_attrsfunction device_info_ntb_from_attrsfunction __connection_info_from_attrsfunction connection_info_from_attrsfunction connection_info_ntb_from_attrsfunction __peer_device_info_from_attrsfunction peer_device_info_from_attrsfunction peer_device_info_ntb_from_attrsfunction __resource_statistics_from_attrsfunction resource_statistics_from_attrsfunction resource_statistics_ntb_from_attrsfunction __device_statistics_from_attrsfunction device_statistics_from_attrsfunction device_statistics_ntb_from_attrs
Annotated Snippet
// SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
#include <net/netlink.h>
#include <net/genetlink.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include "drbd_nl_gen.h"
#include <uapi/linux/drbd_genl.h>
#include <linux/drbd.h>
#include <linux/drbd_limits.h>
/* Common nested types */
const struct nla_policy drbd_connection_info_nl_policy[DRBD_A_CONNECTION_INFO_CONN_ROLE + 1] = {
[DRBD_A_CONNECTION_INFO_CONN_CONNECTION_STATE] = { .type = NLA_U32, },
[DRBD_A_CONNECTION_INFO_CONN_ROLE] = { .type = NLA_U32, },
};
const struct nla_policy drbd_connection_statistics_nl_policy[DRBD_A_CONNECTION_STATISTICS_CONN_CONGESTED + 1] = {
[DRBD_A_CONNECTION_STATISTICS_CONN_CONGESTED] = { .type = NLA_U8, },
};
const struct nla_policy drbd_detach_parms_nl_policy[DRBD_A_DETACH_PARMS_FORCE_DETACH + 1] = {
[DRBD_A_DETACH_PARMS_FORCE_DETACH] = { .type = NLA_U8, },
};
const struct nla_policy drbd_device_info_nl_policy[DRBD_A_DEVICE_INFO_DEV_DISK_STATE + 1] = {
[DRBD_A_DEVICE_INFO_DEV_DISK_STATE] = { .type = NLA_U32, },
};
const struct nla_policy drbd_device_statistics_nl_policy[DRBD_A_DEVICE_STATISTICS_HISTORY_UUIDS + 1] = {
[DRBD_A_DEVICE_STATISTICS_DEV_SIZE] = { .type = NLA_U64, },
[DRBD_A_DEVICE_STATISTICS_DEV_READ] = { .type = NLA_U64, },
[DRBD_A_DEVICE_STATISTICS_DEV_WRITE] = { .type = NLA_U64, },
[DRBD_A_DEVICE_STATISTICS_DEV_AL_WRITES] = { .type = NLA_U64, },
[DRBD_A_DEVICE_STATISTICS_DEV_BM_WRITES] = { .type = NLA_U64, },
[DRBD_A_DEVICE_STATISTICS_DEV_UPPER_PENDING] = { .type = NLA_U32, },
[DRBD_A_DEVICE_STATISTICS_DEV_LOWER_PENDING] = { .type = NLA_U32, },
[DRBD_A_DEVICE_STATISTICS_DEV_UPPER_BLOCKED] = { .type = NLA_U8, },
[DRBD_A_DEVICE_STATISTICS_DEV_LOWER_BLOCKED] = { .type = NLA_U8, },
[DRBD_A_DEVICE_STATISTICS_DEV_AL_SUSPENDED] = { .type = NLA_U8, },
[DRBD_A_DEVICE_STATISTICS_DEV_EXPOSED_DATA_UUID] = { .type = NLA_U64, },
[DRBD_A_DEVICE_STATISTICS_DEV_CURRENT_UUID] = { .type = NLA_U64, },
[DRBD_A_DEVICE_STATISTICS_DEV_DISK_FLAGS] = { .type = NLA_U32, },
[DRBD_A_DEVICE_STATISTICS_HISTORY_UUIDS] = NLA_POLICY_MAX_LEN(DRBD_NL_HISTORY_UUIDS_SIZE),
};
const struct nla_policy drbd_disconnect_parms_nl_policy[DRBD_A_DISCONNECT_PARMS_FORCE_DISCONNECT + 1] = {
[DRBD_A_DISCONNECT_PARMS_FORCE_DISCONNECT] = { .type = NLA_U8, },
};
const struct nla_policy drbd_disk_conf_nl_policy[DRBD_A_DISK_CONF_DISABLE_WRITE_SAME + 1] = {
[DRBD_A_DISK_CONF_BACKING_DEV] = { .type = NLA_NUL_STRING, .len = 128, },
[DRBD_A_DISK_CONF_META_DEV] = { .type = NLA_NUL_STRING, .len = 128, },
[DRBD_A_DISK_CONF_META_DEV_IDX] = { .type = NLA_U32, },
[DRBD_A_DISK_CONF_DISK_SIZE] = { .type = NLA_U64, },
[DRBD_A_DISK_CONF_MAX_BIO_BVECS] = { .type = NLA_U32, },
[DRBD_A_DISK_CONF_ON_IO_ERROR] = { .type = NLA_U32, },
[DRBD_A_DISK_CONF_FENCING] = { .type = NLA_U32, },
[DRBD_A_DISK_CONF_RESYNC_RATE] = { .type = NLA_U32, },
[DRBD_A_DISK_CONF_RESYNC_AFTER] = { .type = NLA_U32, },
[DRBD_A_DISK_CONF_AL_EXTENTS] = { .type = NLA_U32, },
[DRBD_A_DISK_CONF_C_PLAN_AHEAD] = { .type = NLA_U32, },
[DRBD_A_DISK_CONF_C_DELAY_TARGET] = { .type = NLA_U32, },
[DRBD_A_DISK_CONF_C_FILL_TARGET] = { .type = NLA_U32, },
[DRBD_A_DISK_CONF_C_MAX_RATE] = { .type = NLA_U32, },
[DRBD_A_DISK_CONF_C_MIN_RATE] = { .type = NLA_U32, },
[DRBD_A_DISK_CONF_DISK_BARRIER] = { .type = NLA_U8, },
[DRBD_A_DISK_CONF_DISK_FLUSHES] = { .type = NLA_U8, },
[DRBD_A_DISK_CONF_DISK_DRAIN] = { .type = NLA_U8, },
[DRBD_A_DISK_CONF_MD_FLUSHES] = { .type = NLA_U8, },
[DRBD_A_DISK_CONF_DISK_TIMEOUT] = { .type = NLA_U32, },
[DRBD_A_DISK_CONF_READ_BALANCING] = { .type = NLA_U32, },
[DRBD_A_DISK_CONF_AL_UPDATES] = { .type = NLA_U8, },
[DRBD_A_DISK_CONF_DISCARD_ZEROES_IF_ALIGNED] = { .type = NLA_U8, },
[DRBD_A_DISK_CONF_RS_DISCARD_GRANULARITY] = { .type = NLA_U32, },
[DRBD_A_DISK_CONF_DISABLE_WRITE_SAME] = { .type = NLA_U8, },
};
const struct nla_policy drbd_drbd_cfg_context_nl_policy[DRBD_A_DRBD_CFG_CONTEXT_CTX_PEER_ADDR + 1] = {
[DRBD_A_DRBD_CFG_CONTEXT_CTX_VOLUME] = { .type = NLA_U32, },
[DRBD_A_DRBD_CFG_CONTEXT_CTX_RESOURCE_NAME] = { .type = NLA_NUL_STRING, .len = 128, },
[DRBD_A_DRBD_CFG_CONTEXT_CTX_MY_ADDR] = NLA_POLICY_MAX_LEN(128),
[DRBD_A_DRBD_CFG_CONTEXT_CTX_PEER_ADDR] = NLA_POLICY_MAX_LEN(128),
};
const struct nla_policy drbd_net_conf_nl_policy[DRBD_A_NET_CONF_SOCK_CHECK_TIMEO + 1] = {
[DRBD_A_NET_CONF_SHARED_SECRET] = { .type = NLA_NUL_STRING, .len = SHARED_SECRET_MAX, },
[DRBD_A_NET_CONF_CRAM_HMAC_ALG] = { .type = NLA_NUL_STRING, .len = SHARED_SECRET_MAX, },
Annotation
- Immediate include surface: `net/netlink.h`, `net/genetlink.h`, `linux/kernel.h`, `linux/slab.h`, `drbd_nl_gen.h`, `uapi/linux/drbd_genl.h`, `linux/drbd.h`, `linux/drbd_limits.h`.
- Detected declarations: `function __drbd_cfg_context_from_attrs`, `function drbd_cfg_context_from_attrs`, `function drbd_cfg_context_ntb_from_attrs`, `function __disk_conf_from_attrs`, `function disk_conf_from_attrs`, `function disk_conf_ntb_from_attrs`, `function __res_opts_from_attrs`, `function res_opts_from_attrs`, `function res_opts_ntb_from_attrs`, `function __net_conf_from_attrs`.
- Atlas domain: Driver Families / drivers/block.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.