aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_da_btree.h
diff options
context:
space:
mode:
authorChristoph Hellwig2019-11-20 10:18:50 -0800
committerDarrick J. Wong2019-11-22 08:17:09 -0800
commit199e9ba4e4a9927f5addb644c1a1e1002e68cc30 (patch)
treec9597500a8e4ffb1c621395a4d9deef6a9bfa4e1 /fs/xfs/libxfs/xfs_da_btree.h
parent45feef8f50b94d56d6a433ad5baf5cdf58e3db98 (diff)
xfs: improve the xfs_dabuf_map calling conventions
Use a flags argument with the XFS_DABUF_MAP_HOLE_OK flag to signal that a hole is okay and not corruption, and return 0 with *nmap set to 0 to signal that case in the return value instead of a nameless -1 return code. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_da_btree.h')
-rw-r--r--fs/xfs/libxfs/xfs_da_btree.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_da_btree.h b/fs/xfs/libxfs/xfs_da_btree.h
index ed3b558a9c1a..64624d5717c9 100644
--- a/fs/xfs/libxfs/xfs_da_btree.h
+++ b/fs/xfs/libxfs/xfs_da_btree.h
@@ -194,6 +194,9 @@ int xfs_da3_node_read(struct xfs_trans *tp, struct xfs_inode *dp,
/*
* Utility routines.
*/
+
+#define XFS_DABUF_MAP_HOLE_OK (1 << 0)
+
int xfs_da_grow_inode(xfs_da_args_t *args, xfs_dablk_t *new_blkno);
int xfs_da_grow_inode_int(struct xfs_da_args *args, xfs_fileoff_t *bno,
int count);