fs/lockd/nlm3xdr_gen.c
Source file repositories/reference/linux-study-clean/fs/lockd/nlm3xdr_gen.c
File Facts
- System
- Linux kernel
- Corpus path
fs/lockd/nlm3xdr_gen.c- Extension
.c- Size
- 18327 bytes
- Lines
- 715
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/sunrpc/svc.hnlm3xdr_gen.h
Detected Declarations
function xdrgen_decode_netobjfunction xdrgen_decode_nlm_statsfunction xdrgen_decode_nlm_statfunction xdrgen_decode_nlm_resfunction xdrgen_decode_nlm_holderfunction xdrgen_decode_nlm_testrplyfunction xdrgen_decode_nlm_testresfunction xdrgen_decode_nlm_lockfunction xdrgen_decode_nlm_lockargsfunction xdrgen_decode_nlm_cancargsfunction xdrgen_decode_nlm_testargsfunction xdrgen_decode_nlm_unlockargsfunction xdrgen_decode_fsh_modefunction xdrgen_decode_fsh_accessfunction xdrgen_decode_nlm_sharefunction xdrgen_decode_nlm_shareargsfunction xdrgen_decode_nlm_shareresfunction xdrgen_decode_nlm_notifyfunction xdrgen_decode_nlm_notifyargsfunction nlm_svc_decode_voidfunction nlm_svc_decode_nlm_testargsfunction nlm_svc_decode_nlm_lockargsfunction nlm_svc_decode_nlm_cancargsfunction nlm_svc_decode_nlm_unlockargsfunction nlm_svc_decode_nlm_testresfunction nlm_svc_decode_nlm_resfunction nlm_svc_decode_nlm_notifyargsfunction nlm_svc_decode_nlm_shareargsfunction nlm_svc_decode_nlm_notifyfunction xdrgen_encode_netobjfunction xdrgen_encode_nlm_statsfunction xdrgen_encode_nlm_statfunction xdrgen_encode_nlm_resfunction xdrgen_encode_nlm_holderfunction xdrgen_encode_nlm_testrplyfunction xdrgen_encode_nlm_testresfunction xdrgen_encode_nlm_lockfunction xdrgen_encode_nlm_lockargsfunction xdrgen_encode_nlm_cancargsfunction xdrgen_encode_nlm_testargsfunction xdrgen_encode_nlm_unlockargsfunction xdrgen_encode_fsh_modefunction xdrgen_encode_fsh_accessfunction xdrgen_encode_nlm_sharefunction xdrgen_encode_nlm_shareargsfunction xdrgen_encode_nlm_shareresfunction xdrgen_encode_nlm_notifyfunction xdrgen_encode_nlm_notifyargs
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
// Generated by xdrgen. Manual edits will be lost.
// XDR specification file: ../../Documentation/sunrpc/xdr/nlm3.x
// XDR specification modification time: Thu Apr 23 10:56:34 2026
#include <linux/sunrpc/svc.h>
#include "nlm3xdr_gen.h"
static bool __maybe_unused
xdrgen_decode_netobj(struct xdr_stream *xdr, netobj *ptr)
{
return xdrgen_decode_opaque(xdr, ptr, MAXNETOBJ_SZ);
}
static bool __maybe_unused
xdrgen_decode_nlm_stats(struct xdr_stream *xdr, nlm_stats *ptr)
{
__be32 raw;
u32 val;
if (xdr_stream_decode_be32(xdr, &raw) < 0)
return false;
val = be32_to_cpu(raw);
/* Compiler may optimize to a range check for dense enums */
switch (val) {
case LCK_GRANTED:
case LCK_DENIED:
case LCK_DENIED_NOLOCKS:
case LCK_BLOCKED:
case LCK_DENIED_GRACE_PERIOD:
break;
default:
return false;
}
*ptr = raw;
return true;
}
static bool __maybe_unused
xdrgen_decode_nlm_stat(struct xdr_stream *xdr, struct nlm_stat *ptr)
{
if (!xdrgen_decode_nlm_stats(xdr, &ptr->stat))
return false;
return true;
}
static bool __maybe_unused
xdrgen_decode_nlm_res(struct xdr_stream *xdr, struct nlm_res *ptr)
{
if (!xdrgen_decode_netobj(xdr, &ptr->cookie))
return false;
if (!xdrgen_decode_nlm_stat(xdr, &ptr->stat))
return false;
return true;
}
static bool __maybe_unused
xdrgen_decode_nlm_holder(struct xdr_stream *xdr, struct nlm_holder *ptr)
{
if (!xdrgen_decode_bool(xdr, &ptr->exclusive))
return false;
if (!xdrgen_decode_int(xdr, &ptr->uppid))
return false;
if (!xdrgen_decode_netobj(xdr, &ptr->oh))
return false;
if (!xdrgen_decode_unsigned_int(xdr, &ptr->l_offset))
return false;
if (!xdrgen_decode_unsigned_int(xdr, &ptr->l_len))
return false;
return true;
}
static bool __maybe_unused
xdrgen_decode_nlm_testrply(struct xdr_stream *xdr, struct nlm_testrply *ptr)
{
if (!xdrgen_decode_nlm_stats(xdr, &ptr->stat))
return false;
switch (ptr->stat) {
case __constant_cpu_to_be32(LCK_DENIED):
if (!xdrgen_decode_nlm_holder(xdr, &ptr->u.holder))
return false;
break;
default:
break;
}
return true;
}
static bool __maybe_unused
Annotation
- Immediate include surface: `linux/sunrpc/svc.h`, `nlm3xdr_gen.h`.
- Detected declarations: `function xdrgen_decode_netobj`, `function xdrgen_decode_nlm_stats`, `function xdrgen_decode_nlm_stat`, `function xdrgen_decode_nlm_res`, `function xdrgen_decode_nlm_holder`, `function xdrgen_decode_nlm_testrply`, `function xdrgen_decode_nlm_testres`, `function xdrgen_decode_nlm_lock`, `function xdrgen_decode_nlm_lockargs`, `function xdrgen_decode_nlm_cancargs`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- 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.