aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_fs.h')
-rw-r--r--fs/xfs/xfs_fs.h38
1 files changed, 36 insertions, 2 deletions
diff --git a/fs/xfs/xfs_fs.h b/fs/xfs/xfs_fs.h
index d04695545397..1edb5cc3e5f4 100644
--- a/fs/xfs/xfs_fs.h
+++ b/fs/xfs/xfs_fs.h
@@ -240,7 +240,9 @@ typedef struct xfs_fsop_resblks {
240 240
241 241
242/* 242/*
243 * Minimum and maximum sizes need for growth checks 243 * Minimum and maximum sizes need for growth checks.
244 *
245 * Block counts are in units of filesystem blocks, not basic blocks.
244 */ 246 */
245#define XFS_MIN_AG_BLOCKS 64 247#define XFS_MIN_AG_BLOCKS 64
246#define XFS_MIN_LOG_BLOCKS 512ULL 248#define XFS_MIN_LOG_BLOCKS 512ULL
@@ -311,6 +313,17 @@ typedef struct xfs_bstat {
311} xfs_bstat_t; 313} xfs_bstat_t;
312 314
313/* 315/*
316 * Project quota id helpers (previously projid was 16bit only
317 * and using two 16bit values to hold new 32bit projid was choosen
318 * to retain compatibility with "old" filesystems).
319 */
320static inline __uint32_t
321bstat_get_projid(struct xfs_bstat *bs)
322{
323 return (__uint32_t)bs->bs_projid_hi << 16 | bs->bs_projid_lo;
324}
325
326/*
314 * The user-level BulkStat Request interface structure. 327 * The user-level BulkStat Request interface structure.
315 */ 328 */
316typedef struct xfs_fsop_bulkreq { 329typedef struct xfs_fsop_bulkreq {
@@ -344,7 +357,7 @@ typedef struct xfs_error_injection {
344 * Speculative preallocation trimming. 357 * Speculative preallocation trimming.
345 */ 358 */
346#define XFS_EOFBLOCKS_VERSION 1 359#define XFS_EOFBLOCKS_VERSION 1
347struct xfs_eofblocks { 360struct xfs_fs_eofblocks {
348 __u32 eof_version; 361 __u32 eof_version;
349 __u32 eof_flags; 362 __u32 eof_flags;
350 uid_t eof_uid; 363 uid_t eof_uid;
@@ -450,6 +463,21 @@ typedef struct xfs_handle {
450 + (handle).ha_fid.fid_len) 463 + (handle).ha_fid.fid_len)
451 464
452/* 465/*
466 * Structure passed to XFS_IOC_SWAPEXT
467 */
468typedef struct xfs_swapext
469{
470 __int64_t sx_version; /* version */
471#define XFS_SX_VERSION 0
472 __int64_t sx_fdtarget; /* fd of target file */
473 __int64_t sx_fdtmp; /* fd of tmp file */
474 xfs_off_t sx_offset; /* offset into file */
475 xfs_off_t sx_length; /* leng from offset */
476 char sx_pad[16]; /* pad space, unused */
477 xfs_bstat_t sx_stat; /* stat of target b4 copy */
478} xfs_swapext_t;
479
480/*
453 * Flags for going down operation 481 * Flags for going down operation
454 */ 482 */
455#define XFS_FSOP_GOING_FLAGS_DEFAULT 0x0 /* going down */ 483#define XFS_FSOP_GOING_FLAGS_DEFAULT 0x0 /* going down */
@@ -511,8 +539,14 @@ typedef struct xfs_handle {
511#define XFS_IOC_ERROR_INJECTION _IOW ('X', 116, struct xfs_error_injection) 539#define XFS_IOC_ERROR_INJECTION _IOW ('X', 116, struct xfs_error_injection)
512#define XFS_IOC_ERROR_CLEARALL _IOW ('X', 117, struct xfs_error_injection) 540#define XFS_IOC_ERROR_CLEARALL _IOW ('X', 117, struct xfs_error_injection)
513/* XFS_IOC_ATTRCTL_BY_HANDLE -- deprecated 118 */ 541/* XFS_IOC_ATTRCTL_BY_HANDLE -- deprecated 118 */
542
514/* XFS_IOC_FREEZE -- FIFREEZE 119 */ 543/* XFS_IOC_FREEZE -- FIFREEZE 119 */
515/* XFS_IOC_THAW -- FITHAW 120 */ 544/* XFS_IOC_THAW -- FITHAW 120 */
545#ifndef FIFREEZE
546#define XFS_IOC_FREEZE _IOWR('X', 119, int)
547#define XFS_IOC_THAW _IOWR('X', 120, int)
548#endif
549
516#define XFS_IOC_FSSETDM_BY_HANDLE _IOW ('X', 121, struct xfs_fsop_setdm_handlereq) 550#define XFS_IOC_FSSETDM_BY_HANDLE _IOW ('X', 121, struct xfs_fsop_setdm_handlereq)
517#define XFS_IOC_ATTRLIST_BY_HANDLE _IOW ('X', 122, struct xfs_fsop_attrlist_handlereq) 551#define XFS_IOC_ATTRLIST_BY_HANDLE _IOW ('X', 122, struct xfs_fsop_attrlist_handlereq)
518#define XFS_IOC_ATTRMULTI_BY_HANDLE _IOW ('X', 123, struct xfs_fsop_attrmulti_handlereq) 552#define XFS_IOC_ATTRMULTI_BY_HANDLE _IOW ('X', 123, struct xfs_fsop_attrmulti_handlereq)