⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xfs_fs.h

📁 linux得一些常用命令,以及linux环境下的c编程
💻 H
📖 第 1 页 / 共 2 页
字号:
/* * Structures returned from ioctl XFS_IOC_FSBULKSTAT & XFS_IOC_FSBULKSTAT_SINGLE */typedef struct xfs_bstime {	time_t		tv_sec;		/* seconds		*/	__s32		tv_nsec;	/* and nanoseconds	*/} xfs_bstime_t;typedef struct xfs_bstat {	__u64		bs_ino;		/* inode number			*/	__u16		bs_mode;	/* type and mode		*/	__u16		bs_nlink;	/* number of links		*/	__u32		bs_uid;		/* user id			*/	__u32		bs_gid;		/* group id			*/	__u32		bs_rdev;	/* device value			*/	__s32		bs_blksize;	/* block size			*/	__s64		bs_size;	/* file size			*/	xfs_bstime_t	bs_atime;	/* access time			*/	xfs_bstime_t	bs_mtime;	/* modify time			*/	xfs_bstime_t	bs_ctime;	/* inode change time		*/	int64_t		bs_blocks;	/* number of blocks		*/	__u32		bs_xflags;	/* extended flags		*/	__s32		bs_extsize;	/* extent size			*/	__s32		bs_extents;	/* number of extents		*/	__u32		bs_gen;		/* generation count		*/	__u16		bs_projid;	/* project id			*/	unsigned char	bs_pad[14];	/* pad space, unused		*/	__u32		bs_dmevmask;	/* DMIG event mask		*/	__u16		bs_dmstate;	/* DMIG state info		*/	__u16		bs_aextents;	/* attribute number of extents	*/} xfs_bstat_t;/* * The user-level BulkStat Request interface structure. */typedef struct xfs_fsop_bulkreq {	__u64		*lastip;	/* last inode # pointer		*/	__s32		icount;		/* count of entries in buffer	*/	void		*ubuffer;	/* user buffer for inode desc.	*/	__s32		*ocount;	/* output count pointer		*/} xfs_fsop_bulkreq_t;/* * Structures returned from xfs_inumbers routine (XFS_IOC_FSINUMBERS). */typedef struct xfs_inogrp {	__u64		xi_startino;	/* starting inode number	*/	__s32		xi_alloccount;	/* # bits set in allocmask	*/	__u64		xi_allocmask;	/* mask of allocated inodes	*/} xfs_inogrp_t;/* * Error injection. */typedef struct xfs_error_injection {	__s32           fd;	__s32           errtag;} xfs_error_injection_t;/* * The user-level Handle Request interface structure. */typedef struct xfs_fsop_handlereq {	__u32		fd;		/* fd for FD_TO_HANDLE		*/	void		*path;		/* user pathname		*/	__u32		oflags;		/* open flags			*/	void		*ihandle;	/* user supplied handle		*/	__u32		ihandlen;	/* user supplied length		*/	void		*ohandle;	/* user buffer for handle	*/	__u32		*ohandlen;	/* user buffer length		*/} xfs_fsop_handlereq_t;/* * Compound structures for passing args through Handle Request interfaces * xfs_fssetdm_by_handle, xfs_attrlist_by_handle, xfs_attrmulti_by_handle * - ioctls: XFS_IOC_FSSETDM_BY_HANDLE, XFS_IOC_ATTRLIST_BY_HANDLE, and *           XFS_IOC_ATTRMULTI_BY_HANDLE */typedef struct xfs_fsop_setdm_handlereq {	struct xfs_fsop_handlereq hreq; /* handle interface structure */	struct fsdmidata *data;	        /* DMAPI data to set          */} xfs_fsop_setdm_handlereq_t;typedef struct xfs_attrlist_cursor {	__u32	opaque[4];} xfs_attrlist_cursor_t;typedef struct xfs_fsop_attrlist_handlereq {	struct xfs_fsop_handlereq hreq; /* handle interface structure */	struct xfs_attrlist_cursor pos; /* opaque cookie, list offset */	__u32 flags;                    /* flags, use ROOT/USER names */	__u32 buflen;                   /* length of buffer supplied  */	void *buffer;                   /* attrlist data to return    */} xfs_fsop_attrlist_handlereq_t;typedef struct xfs_attr_multiop {	__u32	am_opcode;	__s32	am_error;	void	*am_attrname;	void	*am_attrvalue;	__u32	am_length;	__u32	am_flags;} xfs_attr_multiop_t;typedef struct xfs_fsop_attrmulti_handlereq {	struct xfs_fsop_handlereq hreq; /* handle interface structure */	__u32 opcount;                  /* count of following multiop */	struct xfs_attr_multiop *ops;   /* attr_multi data to get/set */} xfs_fsop_attrmulti_handlereq_t;/* * File system identifier. Should be unique (at least per machine). */typedef struct {	__u32 val[2];			/* file system id type */} xfs_fsid_t;/* * File identifier.  Should be unique per filesystem on a single machine. * This is typically called by a stateless file server in order to generate * "file handles". */#define MAXFIDSZ        46typedef struct fid {	__u16		fid_len;		/* length of data in bytes */	unsigned char	fid_data[MAXFIDSZ];	/* data (variable length)  */} fid_t;typedef struct xfs_fid {	__u16	xfs_fid_len;		/* length of remainder	*/	__u16	xfs_fid_pad;	__u32	xfs_fid_gen;		/* generation number	*/	__u64	xfs_fid_ino;		/* 64 bits inode number	*/} xfs_fid_t;typedef struct xfs_fid2 {	__u16	fid_len;	/* length of remainder */	__u16	fid_pad;	/* padding, must be zero */	__u32	fid_gen;	/* generation number */	__u64	fid_ino;	/* inode number */} xfs_fid2_t;typedef struct xfs_handle {	union {		__s64	    align;	/* force alignment of ha_fid	 */		xfs_fsid_t  _ha_fsid;	/* unique file system identifier */	} ha_u;	xfs_fid_t	ha_fid;		/* file system specific file ID  */} xfs_handle_t;#define ha_fsid ha_u._ha_fsid#define	XFS_HSIZE(handle)	(((char *) &(handle).ha_fid.xfs_fid_pad  \				 - (char *) &(handle))			  \				 + (handle).ha_fid.xfs_fid_len)#define XFS_HANDLE_CMP(h1, h2)	bcmp(h1, h2, sizeof (xfs_handle_t))#define FSHSIZE		sizeof (fsid_t)/* * ioctl commands that replace IRIX fcntl()'s * For 'documentation' purposed more than anything else, * the "cmd #" field reflects the IRIX fcntl number. */#define	XFS_IOC_ALLOCSP		_IOW ('X', 10, struct xfs_flock64)#define	XFS_IOC_FREESP		_IOW ('X', 11, struct xfs_flock64)#define	XFS_IOC_DIOINFO		_IOR ('X', 30, struct dioattr)#define	XFS_IOC_FSGETXATTR	_IOR ('X', 31, struct fsxattr)#define	XFS_IOC_FSSETXATTR	_IOW ('X', 32, struct fsxattr)#define	XFS_IOC_ALLOCSP64	_IOW ('X', 36, struct xfs_flock64)#define	XFS_IOC_FREESP64	_IOW ('X', 37, struct xfs_flock64)#define	XFS_IOC_GETBMAP		_IOWR('X', 38, struct getbmap)#define	XFS_IOC_FSSETDM		_IOW ('X', 39, struct fsdmidata)#define	XFS_IOC_RESVSP		_IOW ('X', 40, struct xfs_flock64)#define	XFS_IOC_UNRESVSP	_IOW ('X', 41, struct xfs_flock64)#define	XFS_IOC_RESVSP64	_IOW ('X', 42, struct xfs_flock64)#define	XFS_IOC_UNRESVSP64	_IOW ('X', 43, struct xfs_flock64)#define	XFS_IOC_GETBMAPA	_IOWR('X', 44, struct getbmap)#define	XFS_IOC_FSGETXATTRA	_IOR ('X', 45, struct fsxattr)/*      XFS_IOC_SETBIOSIZE ---- deprecated 46      *//*      XFS_IOC_GETBIOSIZE ---- deprecated 47      */#define	XFS_IOC_GETBMAPX	_IOWR('X', 56, struct getbmap)/* * ioctl commands that replace IRIX syssgi()'s */#define	XFS_IOC_FSGEOMETRY	     _IOR ('X', 100, struct xfs_fsop_geom)#define	XFS_IOC_FSBULKSTAT	     _IOWR('X', 101, struct xfs_fsop_bulkreq)#define	XFS_IOC_FSBULKSTAT_SINGLE    _IOWR('X', 102, struct xfs_fsop_bulkreq)#define	XFS_IOC_FSINUMBERS	     _IOWR('X', 103, struct xfs_fsop_bulkreq)#define	XFS_IOC_PATH_TO_FSHANDLE     _IOWR('X', 104, struct xfs_fsop_handlereq)#define	XFS_IOC_PATH_TO_HANDLE	     _IOWR('X', 105, struct xfs_fsop_handlereq)#define	XFS_IOC_FD_TO_HANDLE	     _IOWR('X', 106, struct xfs_fsop_handlereq)#define	XFS_IOC_OPEN_BY_HANDLE	     _IOWR('X', 107, struct xfs_fsop_handlereq)#define	XFS_IOC_READLINK_BY_HANDLE   _IOWR('X', 108, struct xfs_fsop_handlereq)#define XFS_IOC_SWAPEXT		     _IOWR('X', 109, struct xfs_swapext)#define	XFS_IOC_FSGROWFSDATA	     _IOW ('X', 110, struct xfs_growfs_data)#define	XFS_IOC_FSGROWFSLOG	     _IOW ('X', 111, struct xfs_growfs_log)#define	XFS_IOC_FSGROWFSRT	     _IOW ('X', 112, struct xfs_growfs_rt)#define	XFS_IOC_FSCOUNTS	     _IOR ('X', 113, struct xfs_fsop_counts)#define	XFS_IOC_SET_RESBLKS	     _IOR ('X', 114, struct xfs_fsop_resblks)#define	XFS_IOC_GET_RESBLKS	     _IOR ('X', 115, struct xfs_fsop_resblks)#define XFS_IOC_ERROR_INJECTION      _IOW ('X', 116, struct xfs_error_injection)#define XFS_IOC_ERROR_CLEARALL       _IOW ('X', 117, struct xfs_error_injection)/*      XFS_IOC_ATTRCTL_BY_HANDLE -- deprecated 118      */#define XFS_IOC_FREEZE		     _IOWR('X', 119, int)#define XFS_IOC_THAW		     _IOWR('X', 120, int)#define	XFS_IOC_FSSETDM_BY_HANDLE    _IOW ('X', 121, struct xfs_fsop_setdm_handlereq)#define	XFS_IOC_ATTRLIST_BY_HANDLE   _IOW ('X', 122, struct xfs_fsop_attrlist_handlereq)#define	XFS_IOC_ATTRMULTI_BY_HANDLE  _IOW ('X', 123, struct xfs_fsop_attrmulti_handlereq)/*      XFS_IOC_GETFSUUID ---------- deprecated 140      *//* * Block I/O parameterization.  A basic block (BB) is the lowest size of * filesystem allocation, and must equal 512.  Length units given to bio * routines are in BB's. */#define	BBSHIFT		9#define	BBSIZE		(1<<BBSHIFT)#define	BBMASK		(BBSIZE-1)#define	BTOBB(bytes)	(((__u64)(bytes) + BBSIZE - 1) >> BBSHIFT)#define	BTOBBT(bytes)	((__u64)(bytes) >> BBSHIFT)#define	BBTOB(bbs)	((bbs) << BBSHIFT)#define OFFTOBB(bytes)	(((__u64)(bytes) + BBSIZE - 1) >> BBSHIFT)#define	OFFTOBBT(bytes)	((__u64)(bytes) >> BBSHIFT)#define	BBTOOFF(bbs)	((__u64)(bbs) << BBSHIFT)          #define SEEKLIMIT32	0x7fffffff#define BBSEEKLIMIT32	BTOBBT(SEEKLIMIT32)#define SEEKLIMIT	0x7fffffffffffffffLL#define BBSEEKLIMIT	OFFTOBBT(SEEKLIMIT)     #endif	/* _LINUX_XFS_FS_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -