diff options
author | Christoph Hellwig <hch@lst.de> | 2023-12-04 18:40:56 +0100 |
---|---|---|
committer | Chandan Babu R <chandanbabu@kernel.org> | 2023-12-07 14:51:07 +0530 |
commit | 646ddf0c4df5181a7057ecccd29e535baaf034b2 (patch) | |
tree | e8cd6ffe4e34d364935e144c9b929288bad42a1f /fs/xfs/xfs_fsops.h | |
parent | c2c2620de7577db66a859b934715e98e4501e4f4 (diff) | |
download | linux-stable-646ddf0c4df5181a7057ecccd29e535baaf034b2.tar.gz linux-stable-646ddf0c4df5181a7057ecccd29e535baaf034b2.tar.bz2 linux-stable-646ddf0c4df5181a7057ecccd29e535baaf034b2.zip |
xfs: clean up the xfs_reserve_blocks interface
xfs_reserve_blocks has a very odd interface that can only be explained
by it directly deriving from the IRIX fcntl handler back in the day.
Split reporting out the reserved blocks out of xfs_reserve_blocks into
the only caller that cares. This means that the value reported from
XFS_IOC_SET_RESBLKS isn't atomically sampled in the same critical
section as when it was set anymore, but as the values could change
right after setting them anyway that does not matter. It does
provide atomic sampling of both values for XFS_IOC_GET_RESBLKS now,
though.
Also pass a normal scalar integer value for the requested value instead
of the pointless pointer.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_fsops.h')
-rw-r--r-- | fs/xfs/xfs_fsops.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/xfs/xfs_fsops.h b/fs/xfs/xfs_fsops.h index 45f0cb6e8059..7536f8a92746 100644 --- a/fs/xfs/xfs_fsops.h +++ b/fs/xfs/xfs_fsops.h @@ -8,8 +8,7 @@ extern int xfs_growfs_data(struct xfs_mount *mp, struct xfs_growfs_data *in); extern int xfs_growfs_log(struct xfs_mount *mp, struct xfs_growfs_log *in); -extern int xfs_reserve_blocks(xfs_mount_t *mp, uint64_t *inval, - xfs_fsop_resblks_t *outval); +int xfs_reserve_blocks(struct xfs_mount *mp, uint64_t request); extern int xfs_fs_goingdown(xfs_mount_t *mp, uint32_t inflags); extern int xfs_fs_reserve_ag_blocks(struct xfs_mount *mp); |