diff options
author | Dave Chinner <david@fromorbit.com> | 2016-10-03 00:56:28 +0200 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-10-03 00:56:28 +0200 |
commit | 155cd433b516506df065866f3d974661f6473572 (patch) | |
tree | c16fcc875b58c39818377226ba0e5c8e44e6d324 /fs/xfs/libxfs/xfs_alloc.h | |
parent | Merge branch 'iomap-4.9-dax' into for-next (diff) | |
parent | xfs: log recovery tracepoints to track current lsn and buffer submission (diff) | |
download | linux-155cd433b516506df065866f3d974661f6473572.tar.xz linux-155cd433b516506df065866f3d974661f6473572.zip |
Merge branch 'xfs-4.9-log-recovery-fixes' into for-next
Diffstat (limited to 'fs/xfs/libxfs/xfs_alloc.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_alloc.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_alloc.h b/fs/xfs/libxfs/xfs_alloc.h index f7c520193239..7c404a6b0ae3 100644 --- a/fs/xfs/libxfs/xfs_alloc.h +++ b/fs/xfs/libxfs/xfs_alloc.h @@ -85,20 +85,33 @@ typedef struct xfs_alloc_arg { xfs_extlen_t len; /* output: actual size of extent */ xfs_alloctype_t type; /* allocation type XFS_ALLOCTYPE_... */ xfs_alloctype_t otype; /* original allocation type */ + int datatype; /* mask defining data type treatment */ char wasdel; /* set if allocation was prev delayed */ char wasfromfl; /* set if allocation is from freelist */ - char userdata; /* mask defining userdata treatment */ xfs_fsblock_t firstblock; /* io first block allocated */ struct xfs_owner_info oinfo; /* owner of blocks being allocated */ enum xfs_ag_resv_type resv; /* block reservation to use */ } xfs_alloc_arg_t; /* - * Defines for userdata + * Defines for datatype */ #define XFS_ALLOC_USERDATA (1 << 0)/* allocation is for user data*/ #define XFS_ALLOC_INITIAL_USER_DATA (1 << 1)/* special case start of file */ #define XFS_ALLOC_USERDATA_ZERO (1 << 2)/* zero extent on allocation */ +#define XFS_ALLOC_NOBUSY (1 << 3)/* Busy extents not allowed */ + +static inline bool +xfs_alloc_is_userdata(int datatype) +{ + return (datatype & ~XFS_ALLOC_NOBUSY) != 0; +} + +static inline bool +xfs_alloc_allow_busy_reuse(int datatype) +{ + return (datatype & XFS_ALLOC_NOBUSY) == 0; +} /* freespace limit calculations */ #define XFS_ALLOC_AGFL_RESERVE 4 |