xfs: remove XFS_BMAP_MAX_SHIFT_EXTENTS
The define was always set to 1, which means looping until we reach is was dead code from the start. Also remove an initialization of next_fsb for the done case that doesn't fit the new code flow - it was never checked by the caller in the done case to start with. 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>
This commit is contained in:

committed by
Darrick J. Wong

parent
4ed36c6b09
commit
6b18af0dfd
@@ -183,15 +183,6 @@ static inline bool xfs_bmap_is_real_extent(struct xfs_bmbt_irec *irec)
|
||||
!isnullstartblock(irec->br_startblock);
|
||||
}
|
||||
|
||||
/*
|
||||
* This macro is used to determine how many extents will be shifted
|
||||
* in one write transaction. We could require two splits,
|
||||
* an extent move on the first and an extent merge on the second,
|
||||
* So it is proper that one extent is shifted inside write transaction
|
||||
* at a time.
|
||||
*/
|
||||
#define XFS_BMAP_MAX_SHIFT_EXTENTS 1
|
||||
|
||||
enum shift_direction {
|
||||
SHIFT_LEFT = 0,
|
||||
SHIFT_RIGHT,
|
||||
@@ -240,8 +231,7 @@ uint xfs_default_attroffset(struct xfs_inode *ip);
|
||||
int xfs_bmap_shift_extents(struct xfs_trans *tp, struct xfs_inode *ip,
|
||||
xfs_fileoff_t *next_fsb, xfs_fileoff_t offset_shift_fsb,
|
||||
int *done, xfs_fileoff_t stop_fsb, xfs_fsblock_t *firstblock,
|
||||
struct xfs_defer_ops *dfops, enum shift_direction direction,
|
||||
int num_exts);
|
||||
struct xfs_defer_ops *dfops, enum shift_direction direction);
|
||||
int xfs_bmap_split_extent(struct xfs_inode *ip, xfs_fileoff_t split_offset);
|
||||
int xfs_bmapi_reserve_delalloc(struct xfs_inode *ip, int whichfork,
|
||||
xfs_fileoff_t off, xfs_filblks_t len, xfs_filblks_t prealloc,
|
||||
|
Reference in New Issue
Block a user