Skip to content
Snippets Groups Projects
Forked from drm / msm
Source project has a limited visibility.
  • Christoph Hellwig's avatar
    646ddf0c
    xfs: clean up the xfs_reserve_blocks interface · 646ddf0c
    Christoph Hellwig authored
    
    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: default avatarChristoph Hellwig <hch@lst.de>
    Reviewed-by: default avatar"Darrick J. Wong" <djwong@kernel.org>
    Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>
    646ddf0c
    History
    xfs: clean up the xfs_reserve_blocks interface
    Christoph Hellwig authored
    
    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: default avatarChristoph Hellwig <hch@lst.de>
    Reviewed-by: default avatar"Darrick J. Wong" <djwong@kernel.org>
    Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>