include/linux/nfs.h
Source file repositories/reference/linux-study-clean/include/linux/nfs.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/nfs.h- Extension
.h- Size
- 1746 bytes
- Lines
- 70
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- 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/cred.hlinux/sunrpc/auth.hlinux/sunrpc/msg_prot.hlinux/string.hlinux/crc32.huapi/linux/nfs.h
Detected Declarations
struct nfs_fhenum nfs3_stable_howfunction nfs_compare_fhfunction nfs_copy_fhfunction nfs_fhandle_hash
Annotated Snippet
struct nfs_fh {
unsigned short size;
unsigned char data[NFS_MAXFHSIZE];
};
/*
* Returns a zero iff the size and data fields match.
* Checks only "size" bytes in the data field.
*/
static inline int nfs_compare_fh(const struct nfs_fh *a, const struct nfs_fh *b)
{
return a->size != b->size || memcmp(a->data, b->data, a->size) != 0;
}
static inline void nfs_copy_fh(struct nfs_fh *target, const struct nfs_fh *source)
{
target->size = source->size;
memcpy(target->data, source->data, source->size);
}
enum nfs3_stable_how {
NFS_UNSTABLE = 0,
NFS_DATA_SYNC = 1,
NFS_FILE_SYNC = 2,
/* used by direct.c to mark verf as invalid */
NFS_INVALID_STABLE_HOW = -1
};
/**
* nfs_fhandle_hash - calculate the crc32 hash for the filehandle
* @fh - pointer to filehandle
*
* returns a crc32 hash for the filehandle that is compatible with
* the one displayed by "wireshark".
*/
static inline u32 nfs_fhandle_hash(const struct nfs_fh *fh)
{
return ~crc32_le(0xFFFFFFFF, &fh->data[0], fh->size);
}
#endif /* _LINUX_NFS_H */
Annotation
- Immediate include surface: `linux/cred.h`, `linux/sunrpc/auth.h`, `linux/sunrpc/msg_prot.h`, `linux/string.h`, `linux/crc32.h`, `uapi/linux/nfs.h`.
- Detected declarations: `struct nfs_fh`, `enum nfs3_stable_how`, `function nfs_compare_fh`, `function nfs_copy_fh`, `function nfs_fhandle_hash`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.