fs/ocfs2/dlmglue.h

Source file repositories/reference/linux-study-clean/fs/ocfs2/dlmglue.h

File Facts

System
Linux kernel
Corpus path
fs/ocfs2/dlmglue.h
Extension
.h
Size
6803 bytes
Lines
208
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct ocfs2_meta_lvb {
	__u8         lvb_version;
	__u8         lvb_reserved0;
	__be16       lvb_idynfeatures;
	__be32       lvb_iclusters;
	__be32       lvb_iuid;
	__be32       lvb_igid;
	__be64       lvb_iatime_packed;
	__be64       lvb_ictime_packed;
	__be64       lvb_imtime_packed;
	__be64       lvb_isize;
	__be16       lvb_imode;
	__be16       lvb_inlink;
	__be32       lvb_iattr;
	__be32       lvb_igeneration;
	__be32       lvb_reserved2;
};

#define OCFS2_QINFO_LVB_VERSION 1

struct ocfs2_qinfo_lvb {
	__u8	lvb_version;
	__u8	lvb_reserved[3];
	__be32	lvb_bgrace;
	__be32	lvb_igrace;
	__be32	lvb_syncms;
	__be32	lvb_blocks;
	__be32	lvb_free_blk;
	__be32	lvb_free_entry;
};

#define OCFS2_ORPHAN_LVB_VERSION 1

struct ocfs2_orphan_scan_lvb {
	__u8	lvb_version;
	__u8	lvb_reserved[3];
	__be32	lvb_os_seqno;
};

#define OCFS2_TRIMFS_LVB_VERSION 1

struct ocfs2_trim_fs_lvb {
	__u8	lvb_version;
	__u8	lvb_success;
	__u8	lvb_reserved[2];
	__be32	lvb_nodenum;
	__be64	lvb_start;
	__be64	lvb_len;
	__be64	lvb_minlen;
	__be64	lvb_trimlen;
};

struct ocfs2_trim_fs_info {
	u8	tf_valid;	/* lvb is valid, or not */
	u8	tf_success;	/* trim is successful, or not */
	u32	tf_nodenum;	/* osb node number */
	u64	tf_start;	/* trim start offset in clusters */
	u64	tf_len;		/* trim end offset in clusters */
	u64	tf_minlen;	/* trim minimum contiguous free clusters */
	u64	tf_trimlen;	/* trimmed length in bytes */
};

struct ocfs2_lock_holder {
	struct list_head oh_list;
	struct pid *oh_owner_pid;
	int oh_ex;
};

/* ocfs2_inode_lock_full() 'arg_flags' flags */
/* don't wait on recovery. */
#define OCFS2_META_LOCK_RECOVERY	(0x01)
/* Instruct the dlm not to queue ourselves on the other node. */
#define OCFS2_META_LOCK_NOQUEUE		(0x02)
/* don't block waiting for the downconvert thread, instead return -EAGAIN */
#define OCFS2_LOCK_NONBLOCK		(0x04)
/* just get back disk inode bh if we've got cluster lock. */
#define OCFS2_META_LOCK_GETBH		(0x08)

/* Locking subclasses of inode cluster lock */
enum {
	OI_LS_NORMAL = 0,
	OI_LS_PARENT,
	OI_LS_RENAME1,
	OI_LS_RENAME2,
	OI_LS_REFLINK_TARGET,
};

int ocfs2_dlm_init(struct ocfs2_super *osb);
void ocfs2_dlm_shutdown(struct ocfs2_super *osb, int hangup_pending);
void ocfs2_lock_res_init_once(struct ocfs2_lock_res *res);

Annotation

Implementation Notes