From 199e9ba4e4a9927f5addb644c1a1e1002e68cc30 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 20 Nov 2019 10:18:50 -0800 Subject: 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 Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- fs/xfs/libxfs/xfs_da_btree.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'fs/xfs/libxfs/xfs_da_btree.h') 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); -- cgit v1.2.3