Re: [PATCH] xfs_io: Avoid using __kernel_rwf_t for older kernels

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

 



On 11/25/24 17:22, Darrick J. Wong wrote:
On Mon, Nov 25, 2024 at 02:26:18PM -0800, Florian Fainelli wrote:
__kernel_rwf_t was defined with upstream Linux commit
ddef7ed2b5cbafae692d1d580bb5a07808926a9c ("annotate RWF_... flags")
which has been included in Linux v4.14 and newer. When building xfsprogs

/methinks you should upgrade your kernel, 4.14 is quite dead now, and
you're not even running something /that/ new.

For sure, we happen to build a root filesystem against old (4.9) kernel headers and this is how we caught it. It was good to see that thought had been put into defining RWF_ATOMIC is not already defined, not having a type for __kernel_rwf_t was the next thing.


against older kernel headers, this type is not defined, leading to the
following build error:

pwrite.c: In function 'pwrite_f':
../include/xfs/linux.h:236:22: error: '__kernel_rwf_t' undeclared (first use in this function); did you mean '__kernel_off_t'?
  #define RWF_ATOMIC ((__kernel_rwf_t)0x00000040)
                       ^~~~~~~~~~~~~~
pwrite.c:329:22: note: in expansion of macro 'RWF_ATOMIC'
     pwritev2_flags |= RWF_ATOMIC;

Fixes: ee6c5941352a ("xfs_io: add RWF_ATOMIC support to pwrite")
Signed-off-by: Florian Fainelli <florian.fainelli@xxxxxxxxxxxx>

That said, if this doesn't break anything with a ~2020s distro then I
don't have any objections to this, so:

Reviewed-by: "Darrick J. Wong" <djwong@xxxxxxxxxx>

Thanks!
--
Florian




[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