Content-type: text/html; charset=UTF-8
Man page of IOCTL-XFS-FSOP-GEOMETRY
IOCTL-XFS-FSOP-GEOMETRY
Section: System Calls (2)
Updated: 2019-04-11
Index
Return to Main Contents
NAME
ioctl_xfs_fsop_geometry - report XFS filesystem shape
SYNOPSIS
#include <xfs/xfs_fs.h>
int ioctl(int fd, XFS_IOC_FSOP_GEOMETRY, struct xfs_fsop_geometry *arg);
int ioctl(int fd, XFS_IOC_FSOP_GEOMETRY_V4, struct xfs_fsop_geometry_v4 *arg);
int ioctl(int fd, XFS_IOC_FSOP_GEOMETRY_V1, struct xfs_fsop_geometry_v1 *arg);
DESCRIPTION
Report the storage space parameters that influence allocation decisions in
this XFS filesystem.
This information is conveyed in a structure of the following form:
struct xfs_fsop_geom {
__u32 blocksize;
__u32 rtextsize;
__u32 agblocks;
__u32 agcount;
__u32 logblocks;
__u32 sectsize;
__u32 inodesize;
__u32 imaxpct;
__u64 datablocks;
__u64 rtblocks;
__u64 rtextents;
__u64 logstart;
unsigned char uuid[16];
__u32 sunit;
__u32 swidth;
__s32 version;
__u32 flags;
__u32 logsectsize;
__u32 rtsectsize;
__u32 dirblocksize;
/* struct xfs_fsop_geom_v1 stops here. */
__u32 logsunit;
/* struct xfs_fsop_geom_v4 stops here. */
__u32 sick;
__u32 checked;
__u64 reserved[17];
};
blocksize
is the size of a fundamental filesystem block, in bytes.
rtextsize
is the size of an extent on the realtime volume, in bytes.
agblocks
is the size of an allocation group, in units of filesystem blocks.
agcount
is the number of allocation groups in the filesystem.
logblocks
is the size of the log, in units of filesystem blocks.
sectsize
is the smallest amount of data that can be written to the data device
atomically, in bytes.
inodesize
is the size of an inode record, in bytes.
imaxpct
is the maximum percentage of the filesystem that can be allocated to inode
record blocks.
datablocks
is the size of the data device, in units of filesystem blocks.
rtblocks
is the size of the realtime device, in units of filesystem blocks.
rtextents
is the number of extents that can be allocated on the realtime device.
This ought to be
( rtblocks * blocksize ) / rtextsize.
logstart
tells the start of the log, in units of filesystem blocks.
If the filesystem has an external log, this will be zero.
uuid
is the universal unique identifier of the filesystem.
sunit
is what the filesystem has been told is the size of a RAID stripe unit on the
underlying data device, in filesystem blocks.
swidth
is what the filesystem has been told is the width of a RAID stripe on the
underlying data device, in units of RAID stripe units.
version
is the version of this structure.
This value will be XFS_FSOP_GEOM_VERSION.
flags
tell us what features are enabled on the filesystem.
This field can be any combination of the following:
-
- XFS_FSOP_GEOM_FLAGS_ATTR
-
Extended attributes are present.
- XFS_FSOP_GEOM_FLAGS_NLINK
-
This filesystem supports up to 2^32 links.
- XFS_FSOP_GEOM_FLAGS_QUOTA
-
Quotas are enabled.
- XFS_FSOP_GEOM_FLAGS_IALIGN
-
Inodes are aligned for better performance.
- XFS_FSOP_GEOM_FLAGS_DALIGN
-
Data blocks are aligned for better performance.
- XFS_FSOP_GEOM_FLAGS_SHARED
-
Unused.
- XFS_FSOP_GEOM_FLAGS_EXTFLG
-
Filesystem supports unwritten extents.
- XFS_FSOP_GEOM_FLAGS_DIRV2
-
Directories maintain free space data for better performance.
- XFS_FSOP_GEOM_FLAGS_LOGV2
-
Log uses the V2 format.
- XFS_FSOP_GEOM_FLAGS_SECTOR
-
The log device has a sector size larger than 512 bytes.
- XFS_FSOP_GEOM_FLAGS_ATTR2
-
Filesystem contains V2 extended attributes.
- XFS_FSOP_GEOM_FLAGS_PROJID32
-
Project IDs can be as large as 2^32.
- XFS_FSOP_GEOM_FLAGS_DIRV2CI
-
Case-insensitive lookups are supported on directories.
- XFS_FSOP_GEOM_FLAGS_LAZYSB
-
On-disk superblock counters are updated only at unmount time.
- XFS_FSOP_GEOM_FLAGS_V5SB
-
Metadata blocks are self describing and contain checksums.
- XFS_FSOP_GEOM_FLAGS_FTYPE
-
Directories cache inode types in directory entries.
- XFS_FSOP_GEOM_FLAGS_FINOBT
-
Filesystem maintains an index of free inodes.
- XFS_FSOP_GEOM_FLAGS_SPINODES
-
Filesystem tries harder to allocate inodes when free space is fragmented.
- XFS_FSOP_GEOM_FLAGS_RMAPBT
-
Filesystem stores reverse mappings of blocks to owners.
- XFS_FSOP_GEOM_FLAGS_REFLINK
-
Filesystem supports sharing blocks.
logsectsize
is the smallest amount of data that can be written to the log device atomically,
in bytes.
rtsectsize
is the smallest amount of data that can be written to the realtime device
atomically, in bytes.
dirblocksize
is the size of directory blocks, in bytes.
logsunit
is what the filesystem has been told is the size of a RAID stripe unit on the
underlying log device, in filesystem blocks.
This field is meaningful only if the flag
XFS_FSOP_GEOM_FLAGS_LOGV2
is set.
The fields
sick and checked
indicate the relative health of various whole-filesystem metadata:
- •
-
If a given sick flag is set in
sick,
then that piece of metadata has been observed to be damaged.
The same bit should be set in
checked.
- •
-
If a given sick flag is set in
checked
but is not set in
sick,
then that piece of metadata has been checked and is not faulty.
- •
-
If a given sick flag is not set in
checked,
then no conclusion can be made.
The following flags apply to these fields:
-
- XFS_FSOP_GEOM_SICK_COUNTERS
-
Inode and space summary counters.
- XFS_FSOP_GEOM_SICK_UQUOTA
-
User quota information.
- XFS_FSOP_GEOM_SICK_GQUOTA
-
Group quota information.
- XFS_FSOP_GEOM_SICK_PQUOTA
-
Project quota information.
- XFS_FSOP_GEOM_SICK_RT_BITMAP
-
Free space bitmap for the realtime device.
- XFS_FSOP_GEOM_SICK_RT_SUMMARY
-
Free space summary for the realtime device.
reserved
is set to zero.
RETURN VALUE
On error, -1 is returned, and
errno
is set to indicate the error.
ERRORS
Error codes can be one of, but are not limited to, the following:
- EFAULT
-
The kernel was not able to copy into the userspace buffer.
- EFSBADCRC
-
Metadata checksum validation failed while performing the query.
- EFSCORRUPTED
-
Metadata corruption was encountered while performing the query.
- EIO
-
An I/O error was encountered while performing the query.
CONFORMING TO
This API is specific to XFS filesystem on the Linux kernel.
SEE ALSO
ioctl(2)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURN VALUE
-
- ERRORS
-
- CONFORMING TO
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 14:54:29 GMT, April 11, 2019