xfs
[Top] [All Lists]

Re: [PATCH] xfsprogs: guard fsxattr definition for newer kernels

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfsprogs: guard fsxattr definition for newer kernels
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Tue, 9 Feb 2016 15:45:50 -0600
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20160209214433.GD14668@dastard>
References: <56BA24A9.4090403@xxxxxxxxxx> <20160209195502.GR27429@dastard> <56BA4495.9060304@xxxxxxxxxx> <20160209211010.GA14668@dastard> <56BA59B6.3030803@xxxxxxxxxxx> <20160209214433.GD14668@dastard>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

On 2/9/16 3:44 PM, Dave Chinner wrote:
> On Tue, Feb 09, 2016 at 03:27:18PM -0600, Eric Sandeen wrote:
>>
>>
>> On 2/9/16 3:10 PM, Dave Chinner wrote:
>>> On Tue, Feb 09, 2016 at 01:57:09PM -0600, Eric Sandeen wrote:
>>>> On 2/9/16 1:55 PM, Dave Chinner wrote:
>>>>> On Tue, Feb 09, 2016 at 11:40:57AM -0600, Eric Sandeen wrote:
>>>>>> After 334e580,
>>>>>> fs: XFS_IOC_FS[SG]SETXATTR to FS_IOC_FS[SG]ETXATTR promotion
>>>>>>
>>>>>> the file include/linux/fs.h now defines struct fsxattr.
>>>>>>
>>>>>> It defines FS_IOC_FSGETXATTR as well, so use that to wrap
>>>>>> our local definition, and skip it if the kernel is providing
>>>>>> it so that we don't get multiple definitions.
>>>>>>
>>>>>> Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
>>>>>> ---
>>>>>>
>>>>>> Should the kernel also #define HAVE_FSXATTR to help existing
>>>>>> xfsprogs-devel installations?
>>>>>>
>>>>>> (And what if headers are included in the other order?  Should
>>>>>> we try to guard on the kernel side or no?)
>>>>>
>>>>> I've already sent a patch to fix this - it was with the foreign
>>>>> filesystem xfs_quota patch....
>>>>
>>>> Oh, sorry, spaced it.
>>>>
>>>> What do you think of the HAVE_FSXATTR definition in fs.h?
>>>
>>> Which fs.h? The include/linux/fs.h file does not have such
>>> guards...
>>
>> If include/linux/fs.h defined HAVE_FSXATTR, a subsequent inclusion
>> of xfs_fs.h would not redefine the structure, because it is
>> guarded with that (for irix!)
> 
> That's why I changed it to check if the ioctl is defined, rather
> than checking for HAVE_FSXATTR.

Right, but I'm talking about protecting older, existing versions of
xfsprogs headers which use HAVE_FSXATTR as the guard.

-Eric

<Prev in Thread] Current Thread [Next in Thread>