fs/lockd/svcproc.c
Source file repositories/reference/linux-study-clean/fs/lockd/svcproc.c
File Facts
- System
- Linux kernel
- Corpus path
fs/lockd/svcproc.c- Extension
.c- Size
- 40178 bytes
- Lines
- 1458
- 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/types.hlinux/time.hlinux/sunrpc/svc_xprt.hlockd.hshare.hnlm3xdr_gen.h
Detected Declarations
struct nlm_testargs_wrapperstruct nlm_testres_wrapperstruct nlm_lockargs_wrapperstruct nlm_res_wrapperstruct nlm_cancargs_wrapperstruct nlm_unlockargs_wrapperstruct nlm_notifyargs_wrapperstruct nlm_shareargs_wrapperstruct nlm_shareres_wrapperstruct nlm_notify_wrapperfunction nlm_netobj_to_cookiefunction nlm_lock_to_lockd_lockfunction nlm3svc_lookup_hostfunction nlm3svc_lookup_filefunction cast_statusfunction nlmsvc_proc_nullfunction nlmsvc_proc_testfunction nlmsvc_do_lockfunction nlmsvc_proc_lockfunction nlmsvc_proc_cancelfunction nlmsvc_proc_unlockfunction nlmsvc_proc_grantedfunction nlmsvc_callback_exitfunction nlmsvc_callback_releasefunction nlmsvc_callbackfunction __nlmsvc_proc_test_msgfunction nlmsvc_proc_test_msgfunction __nlmsvc_proc_lock_msgfunction nlmsvc_proc_lock_msgfunction __nlmsvc_proc_cancel_msgfunction nlmsvc_proc_cancel_msgfunction __nlmsvc_proc_unlock_msgfunction nlmsvc_proc_unlock_msgfunction __nlmsvc_proc_granted_msgfunction nlmsvc_proc_granted_msgfunction nlmsvc_proc_granted_resfunction nlmsvc_proc_sm_notifyfunction nlmsvc_proc_unusedfunction nlmsvc_proc_sharefunction nlmsvc_proc_unsharefunction nlmsvc_proc_nm_lockfunction nlmsvc_proc_free_all
Annotated Snippet
struct nlm_testargs_wrapper {
struct nlm_testargs xdrgen;
struct lockd_lock lock;
};
static_assert(offsetof(struct nlm_testargs_wrapper, xdrgen) == 0);
struct nlm_testres_wrapper {
struct nlm_testres xdrgen;
struct lockd_lock lock;
};
static_assert(offsetof(struct nlm_testres_wrapper, xdrgen) == 0);
struct nlm_lockargs_wrapper {
struct nlm_lockargs xdrgen;
struct lockd_cookie cookie;
struct lockd_lock lock;
};
static_assert(offsetof(struct nlm_lockargs_wrapper, xdrgen) == 0);
struct nlm_res_wrapper {
struct nlm_res xdrgen;
struct lockd_cookie cookie;
};
static_assert(offsetof(struct nlm_res_wrapper, xdrgen) == 0);
struct nlm_cancargs_wrapper {
struct nlm_cancargs xdrgen;
struct lockd_lock lock;
};
static_assert(offsetof(struct nlm_cancargs_wrapper, xdrgen) == 0);
struct nlm_unlockargs_wrapper {
struct nlm_unlockargs xdrgen;
struct lockd_lock lock;
};
static_assert(offsetof(struct nlm_unlockargs_wrapper, xdrgen) == 0);
struct nlm_notifyargs_wrapper {
struct nlm_notifyargs xdrgen;
struct lockd_reboot reboot;
};
static_assert(offsetof(struct nlm_notifyargs_wrapper, xdrgen) == 0);
struct nlm_shareargs_wrapper {
struct nlm_shareargs xdrgen;
struct lockd_lock lock;
};
static_assert(offsetof(struct nlm_shareargs_wrapper, xdrgen) == 0);
struct nlm_shareres_wrapper {
struct nlm_shareres xdrgen;
};
static_assert(offsetof(struct nlm_shareres_wrapper, xdrgen) == 0);
struct nlm_notify_wrapper {
struct nlm_notify xdrgen;
};
static_assert(offsetof(struct nlm_notify_wrapper, xdrgen) == 0);
static __be32
nlm_netobj_to_cookie(struct lockd_cookie *cookie, netobj *object)
{
if (object->len > NLM_MAXCOOKIELEN)
return nlm_lck_denied_nolocks;
cookie->len = object->len;
memcpy(cookie->data, object->data, object->len);
return nlm_granted;
}
static __be32
nlm_lock_to_lockd_lock(struct lockd_lock *lock, struct nlm_lock *alock)
{
if (alock->fh.len != NLM3_FHSIZE)
return nlm_lck_denied;
lock->fh.size = alock->fh.len;
memcpy(lock->fh.data, alock->fh.data, alock->fh.len);
lock->oh.len = alock->oh.len;
lock->oh.data = alock->oh.data;
lock->svid = alock->uppid;
lockd_set_file_lock_range3(&lock->fl, alock->l_offset, alock->l_len);
Annotation
- Immediate include surface: `linux/types.h`, `linux/time.h`, `linux/sunrpc/svc_xprt.h`, `lockd.h`, `share.h`, `nlm3xdr_gen.h`.
- Detected declarations: `struct nlm_testargs_wrapper`, `struct nlm_testres_wrapper`, `struct nlm_lockargs_wrapper`, `struct nlm_res_wrapper`, `struct nlm_cancargs_wrapper`, `struct nlm_unlockargs_wrapper`, `struct nlm_notifyargs_wrapper`, `struct nlm_shareargs_wrapper`, `struct nlm_shareres_wrapper`, `struct nlm_notify_wrapper`.
- 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.