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

📄 xfs_fs.h

📁 linux 内核源代码
💻 H
📖 第 1 页 / 共 2 页
字号:
/* * Copyright (c) 1995-2005 Silicon Graphics, Inc. * All Rights Reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation. * * This program is distributed in the hope that it would be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write the Free Software Foundation, * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */#ifndef __XFS_FS_H__#define __XFS_FS_H__/* * SGI's XFS filesystem's major stuff (constants, structures) *//* * Direct I/O attribute record used with XFS_IOC_DIOINFO * d_miniosz is the min xfer size, xfer size multiple and file seek offset * alignment. */#ifndef HAVE_DIOATTRstruct dioattr {	__u32		d_mem;		/* data buffer memory alignment */	__u32		d_miniosz;	/* min xfer size		*/	__u32		d_maxiosz;	/* max xfer size		*/};#endif/* * Structure for XFS_IOC_FSGETXATTR[A] and XFS_IOC_FSSETXATTR. */#ifndef HAVE_FSXATTRstruct fsxattr {	__u32		fsx_xflags;	/* xflags field value (get/set) */	__u32		fsx_extsize;	/* extsize field value (get/set)*/	__u32		fsx_nextents;	/* nextents field value (get)	*/	__u32		fsx_projid;	/* project identifier (get/set) */	unsigned char	fsx_pad[12];};#endif/* * Flags for the bs_xflags/fsx_xflags field * There should be a one-to-one correspondence between these flags and the * XFS_DIFLAG_s. */#define XFS_XFLAG_REALTIME	0x00000001	/* data in realtime volume */#define XFS_XFLAG_PREALLOC	0x00000002	/* preallocated file extents */#define XFS_XFLAG_IMMUTABLE	0x00000008	/* file cannot be modified */#define XFS_XFLAG_APPEND	0x00000010	/* all writes append */#define XFS_XFLAG_SYNC		0x00000020	/* all writes synchronous */#define XFS_XFLAG_NOATIME	0x00000040	/* do not update access time */#define XFS_XFLAG_NODUMP	0x00000080	/* do not include in backups */#define XFS_XFLAG_RTINHERIT	0x00000100	/* create with rt bit set */#define XFS_XFLAG_PROJINHERIT	0x00000200	/* create with parents projid */#define XFS_XFLAG_NOSYMLINKS	0x00000400	/* disallow symlink creation */#define XFS_XFLAG_EXTSIZE	0x00000800	/* extent size allocator hint */#define XFS_XFLAG_EXTSZINHERIT	0x00001000	/* inherit inode extent size */#define XFS_XFLAG_NODEFRAG	0x00002000  	/* do not defragment */#define XFS_XFLAG_FILESTREAM	0x00004000	/* use filestream allocator */#define XFS_XFLAG_HASATTR	0x80000000	/* no DIFLAG for this	*//* * Structure for XFS_IOC_GETBMAP. * On input, fill in bmv_offset and bmv_length of the first structure * to indicate the area of interest in the file, and bmv_entries with * the number of array elements given back.  The first structure is * updated on return to give the offset and length for the next call. */#ifndef HAVE_GETBMAPstruct getbmap {	__s64		bmv_offset;	/* file offset of segment in blocks */	__s64		bmv_block;	/* starting block (64-bit daddr_t)  */	__s64		bmv_length;	/* length of segment, blocks	    */	__s32		bmv_count;	/* # of entries in array incl. 1st  */	__s32		bmv_entries;	/* # of entries filled in (output)  */};#endif/* *	Structure for XFS_IOC_GETBMAPX.	 Fields bmv_offset through bmv_entries *	are used exactly as in the getbmap structure.  The getbmapx structure *	has additional bmv_iflags and bmv_oflags fields. The bmv_iflags field *	is only used for the first structure.  It contains input flags *	specifying XFS_IOC_GETBMAPX actions.  The bmv_oflags field is filled *	in by the XFS_IOC_GETBMAPX command for each returned structure after *	the first. */#ifndef HAVE_GETBMAPXstruct getbmapx {	__s64		bmv_offset;	/* file offset of segment in blocks */	__s64		bmv_block;	/* starting block (64-bit daddr_t)  */	__s64		bmv_length;	/* length of segment, blocks	    */	__s32		bmv_count;	/* # of entries in array incl. 1st  */	__s32		bmv_entries;	/* # of entries filled in (output). */	__s32		bmv_iflags;	/* input flags (1st structure)	    */	__s32		bmv_oflags;	/* output flags (after 1st structure)*/	__s32		bmv_unused1;	/* future use			    */	__s32		bmv_unused2;	/* future use			    */};#endif/*	bmv_iflags values - set by XFS_IOC_GETBMAPX caller.	*/#define BMV_IF_ATTRFORK		0x1	/* return attr fork rather than data */#define BMV_IF_NO_DMAPI_READ	0x2	/* Do not generate DMAPI read event  */#define BMV_IF_PREALLOC		0x4	/* rtn status BMV_OF_PREALLOC if req */#define BMV_IF_VALID	(BMV_IF_ATTRFORK|BMV_IF_NO_DMAPI_READ|BMV_IF_PREALLOC)#ifdef __KERNEL__#define BMV_IF_EXTENDED 0x40000000	/* getpmapx if set */#endif/*	bmv_oflags values - returned for for each non-header segment */#define BMV_OF_PREALLOC		0x1	/* segment = unwritten pre-allocation *//*	Convert getbmap <-> getbmapx - move fields from p1 to p2. */#define GETBMAP_CONVERT(p1,p2) {	\	p2.bmv_offset = p1.bmv_offset;	\	p2.bmv_block = p1.bmv_block;	\	p2.bmv_length = p1.bmv_length;	\	p2.bmv_count = p1.bmv_count;	\	p2.bmv_entries = p1.bmv_entries;  }/* * Structure for XFS_IOC_FSSETDM. * For use by backup and restore programs to set the XFS on-disk inode * fields di_dmevmask and di_dmstate.  These must be set to exactly and * only values previously obtained via xfs_bulkstat!  (Specifically the * xfs_bstat_t fields bs_dmevmask and bs_dmstate.) */#ifndef HAVE_FSDMIDATAstruct fsdmidata {	__u32		fsd_dmevmask;	/* corresponds to di_dmevmask */	__u16		fsd_padding;	__u16		fsd_dmstate;	/* corresponds to di_dmstate  */};#endif/* * File segment locking set data type for 64 bit access. * Also used for all the RESV/FREE interfaces. */typedef struct xfs_flock64 {	__s16		l_type;	__s16		l_whence;	__s64		l_start;	__s64		l_len;		/* len == 0 means until end of file */	__s32		l_sysid;	__u32		l_pid;	__s32		l_pad[4];	/* reserve area			    */} xfs_flock64_t;/* * Output for XFS_IOC_FSGEOMETRY_V1 */typedef struct xfs_fsop_geom_v1 {	__u32		blocksize;	/* filesystem (data) block size */	__u32		rtextsize;	/* realtime extent size		*/	__u32		agblocks;	/* fsblocks in an AG		*/	__u32		agcount;	/* number of allocation groups	*/	__u32		logblocks;	/* fsblocks in the log		*/	__u32		sectsize;	/* (data) sector size, bytes	*/	__u32		inodesize;	/* inode size in bytes		*/	__u32		imaxpct;	/* max allowed inode space(%)	*/	__u64		datablocks;	/* fsblocks in data subvolume	*/	__u64		rtblocks;	/* fsblocks in realtime subvol	*/	__u64		rtextents;	/* rt extents in realtime subvol*/	__u64		logstart;	/* starting fsblock of the log	*/	unsigned char	uuid[16];	/* unique id of the filesystem	*/	__u32		sunit;		/* stripe unit, fsblocks	*/	__u32		swidth;		/* stripe width, fsblocks	*/	__s32		version;	/* structure version		*/	__u32		flags;		/* superblock version flags	*/	__u32		logsectsize;	/* log sector size, bytes	*/	__u32		rtsectsize;	/* realtime sector size, bytes	*/	__u32		dirblocksize;	/* directory block size, bytes	*/} xfs_fsop_geom_v1_t;/* * Output for XFS_IOC_FSGEOMETRY */typedef struct xfs_fsop_geom {	__u32		blocksize;	/* filesystem (data) block size */	__u32		rtextsize;	/* realtime extent size		*/	__u32		agblocks;	/* fsblocks in an AG		*/	__u32		agcount;	/* number of allocation groups	*/	__u32		logblocks;	/* fsblocks in the log		*/	__u32		sectsize;	/* (data) sector size, bytes	*/	__u32		inodesize;	/* inode size in bytes		*/	__u32		imaxpct;	/* max allowed inode space(%)	*/	__u64		datablocks;	/* fsblocks in data subvolume	*/	__u64		rtblocks;	/* fsblocks in realtime subvol	*/	__u64		rtextents;	/* rt extents in realtime subvol*/	__u64		logstart;	/* starting fsblock of the log	*/	unsigned char	uuid[16];	/* unique id of the filesystem	*/	__u32		sunit;		/* stripe unit, fsblocks	*/	__u32		swidth;		/* stripe width, fsblocks	*/	__s32		version;	/* structure version		*/	__u32		flags;		/* superblock version flags	*/	__u32		logsectsize;	/* log sector size, bytes	*/	__u32		rtsectsize;	/* realtime sector size, bytes	*/	__u32		dirblocksize;	/* directory block size, bytes	*/	__u32		logsunit;	/* log stripe unit, bytes */} xfs_fsop_geom_t;/* Output for XFS_FS_COUNTS */typedef struct xfs_fsop_counts {	__u64	freedata;	/* free data section blocks */	__u64	freertx;	/* free rt extents */	__u64	freeino;	/* free inodes */	__u64	allocino;	/* total allocated inodes */} xfs_fsop_counts_t;/* Input/Output for XFS_GET_RESBLKS and XFS_SET_RESBLKS */typedef struct xfs_fsop_resblks {	__u64  resblks;	__u64  resblks_avail;} xfs_fsop_resblks_t;#define XFS_FSOP_GEOM_VERSION	0#define XFS_FSOP_GEOM_FLAGS_ATTR	0x0001	/* attributes in use	*/#define XFS_FSOP_GEOM_FLAGS_NLINK	0x0002	/* 32-bit nlink values	*/#define XFS_FSOP_GEOM_FLAGS_QUOTA	0x0004	/* quotas enabled	*/#define XFS_FSOP_GEOM_FLAGS_IALIGN	0x0008	/* inode alignment	*/#define XFS_FSOP_GEOM_FLAGS_DALIGN	0x0010	/* large data alignment */#define XFS_FSOP_GEOM_FLAGS_SHARED	0x0020	/* read-only shared	*/#define XFS_FSOP_GEOM_FLAGS_EXTFLG	0x0040	/* special extent flag	*/#define XFS_FSOP_GEOM_FLAGS_DIRV2	0x0080	/* directory version 2	*/#define XFS_FSOP_GEOM_FLAGS_LOGV2	0x0100	/* log format version 2	*/#define XFS_FSOP_GEOM_FLAGS_SECTOR	0x0200	/* sector sizes >1BB	*/#define XFS_FSOP_GEOM_FLAGS_ATTR2	0x0400	/* inline attributes rework */#define XFS_FSOP_GEOM_FLAGS_LAZYSB	0x4000	/* lazy superblock counters *//* * Minimum and maximum sizes need for growth checks */#define XFS_MIN_AG_BLOCKS	64#define XFS_MIN_LOG_BLOCKS	512

⌨️ 快捷键说明

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