fs/orangefs/orangefs-kernel.h
Source file repositories/reference/linux-study-clean/fs/orangefs/orangefs-kernel.h
File Facts
- System
- Linux kernel
- Corpus path
fs/orangefs/orangefs-kernel.h- Extension
.h- Size
- 13592 bytes
- Lines
- 485
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- Inferred role
- Core OS: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/moduleparam.hlinux/statfs.hlinux/backing-dev.hlinux/device.hlinux/mpage.hlinux/namei.hlinux/errno.hlinux/init.hlinux/module.hlinux/slab.hlinux/types.hlinux/fs.hlinux/fs_context.hlinux/fs_parser.hlinux/vmalloc.hlinux/aio.hlinux/posix_acl.hlinux/posix_acl_xattr.hlinux/compat.hlinux/mount.hlinux/uaccess.hlinux/atomic.hlinux/uio.hlinux/sched/signal.hlinux/mm.hlinux/wait.hlinux/dcache.hlinux/pagemap.hlinux/poll.hlinux/rwsem.hlinux/xattr.h
Detected Declarations
struct orangefs_kernel_op_sstruct orangefs_inode_sstruct orangefs_sb_info_sstruct orangefs_statsstruct orangefs_cached_xattrstruct orangefs_write_rangeenum orangefs_vfs_op_statesfunction set_op_state_servicedfunction put_cancelfunction set_op_state_purgedfunction orangefs_khandle_to_inofunction is_root_handlefunction match_handlefunction orangefs_set_timeout
Annotated Snippet
extern const struct file_operations orangefs_file_operations;
extern const struct inode_operations orangefs_symlink_inode_operations;
extern const struct inode_operations orangefs_dir_inode_operations;
extern const struct file_operations orangefs_dir_operations;
extern const struct dentry_operations orangefs_dentry_operations;
/*
* misc convenience macros
*/
#define ORANGEFS_OP_INTERRUPTIBLE 1 /* service_operation() is interruptible */
#define ORANGEFS_OP_PRIORITY 2 /* service_operation() is high priority */
#define ORANGEFS_OP_CANCELLATION 4 /* this is a cancellation */
#define ORANGEFS_OP_NO_MUTEX 8 /* don't acquire request_mutex */
#define ORANGEFS_OP_ASYNC 16 /* Queue it, but don't wait */
#define ORANGEFS_OP_WRITEBACK 32
int service_operation(struct orangefs_kernel_op_s *op,
const char *op_name,
int flags);
#define get_interruptible_flag(inode) \
((ORANGEFS_SB(inode->i_sb)->flags & ORANGEFS_OPT_INTR) ? \
ORANGEFS_OP_INTERRUPTIBLE : 0)
#define fill_default_sys_attrs(sys_attr, mode) \
do { \
sys_attr.owner = from_kuid(&init_user_ns, current_fsuid()); \
sys_attr.group = from_kgid(&init_user_ns, current_fsgid()); \
sys_attr.perms = ORANGEFS_util_translate_mode(mode); \
sys_attr.mtime = 0; \
sys_attr.atime = 0; \
sys_attr.ctime = 0; \
sys_attr.mask = ORANGEFS_ATTR_SYS_ALL_SETABLE; \
} while (0)
static inline void orangefs_set_timeout(struct dentry *dentry)
{
unsigned long time = jiffies + orangefs_dcache_timeout_msecs*HZ/1000;
dentry->d_fsdata = (void *) time;
}
#endif /* __ORANGEFSKERNEL_H */
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/moduleparam.h`, `linux/statfs.h`, `linux/backing-dev.h`, `linux/device.h`, `linux/mpage.h`, `linux/namei.h`, `linux/errno.h`.
- Detected declarations: `struct orangefs_kernel_op_s`, `struct orangefs_inode_s`, `struct orangefs_sb_info_s`, `struct orangefs_stats`, `struct orangefs_cached_xattr`, `struct orangefs_write_range`, `enum orangefs_vfs_op_states`, `function set_op_state_serviced`, `function put_cancel`, `function set_op_state_purged`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.