Re: [PATCH v3 2/4] io: Assert we have a sensible off_t

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 15, 2023 at 01:36:41AM +0000, Sam James wrote:
> Suggested by Darrick during review of the first LFSization patch. Assert
> we have an off_t capable of handling >=4GiB as a failsafe against the macros
> not doing the right thing.
> 
> This is not the first time we've been on this adventure in XFS:
> * 5c0599b721d1d232d2e400f357abdf2736f24a97 ('Fix building xfsprogs on 32-bit platforms')
> * 65b4f302b7a1ddc14684ffbf8690227a67362586 ('platform: remove use of off64_t')
> * 7fda99a0c2970f7da2661118b438e64dec1751b4 ('xfs.h: require transparent LFS for all users')
> * ebe750ed747cbc59a5675193cdcbc3459ebda107 ('configure: error out when LFS does not work')
> * 69268aaec5fb39ad71674336c0f6f75ca9f57999 ('configure: use AC_SYS_LARGEFILE')
> 
> Cc: Felix Janda <felix.janda@xxxxxxxxx>
> Signed-off-by: Sam James <sam@xxxxxxxxxx>

Looks ok,
Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx>

--D

> ---
>  io/init.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/io/init.c b/io/init.c
> index 104cd2c1..2fb598ac 100644
> --- a/io/init.c
> +++ b/io/init.c
> @@ -44,6 +44,9 @@ init_cvtnum(
>  static void
>  init_commands(void)
>  {
> +	/* We're only interested in supporting an off_t which can handle >=4GiB. */
> +	BUILD_BUG_ON(sizeof(off_t) < 8);
> +
>  	attr_init();
>  	bmap_init();
>  	bulkstat_init();
> -- 
> 2.43.0
> 
> 




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux