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.

Dependency Surface

Detected Declarations

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

Implementation Notes