Re: [PATCH] xfsprogs: remove the libxfs_* API redirections

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

 



On 5/12/20 6:40 PM, Dave Chinner wrote:
> On Tue, May 12, 2020 at 12:06:46PM -0500, Eric Sandeen wrote:
>> On 5/12/20 12:03 PM, Christoph Hellwig wrote:
>>> For historical reasons xfsprogs tries to renamed xfs_* symbols used
>>> by tools (but not those used inside libxfs) to libxfs_.  Remove this
>>> indirection to make it clear what function is being called, and to
>>> avoid having to keep the renaming header uptodate.
>>>
>>> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
>>
>> I'm fine with this.  I'll wait a bit to see if Dave has a strong argument
>> against it, but TBH I have never understood the point of the renaming.
> 
> It was done so there was a clear delineation between the functions
> that return negative errors (from the libxfs core) and anything else
> that was named "xfs_<foo>" in xfsprogs that returned positive
> errors. This was needed back when I had to bring xfsprogs up to date
> with the kernel after years of neglect and the kernel had moved to
> negative errnos....
> 
> If that's no longer a useful distinction, then it doesn't bother me
> if we get rid of it.

hm ok.

Maybe another audit pass to make sure that every single xfs_* function
(whether shared via kernel files or not) returns negative, and every local
explicit libxfs_* function returns positive, would be wise?  With some 
renaming as needed?  I'd need to take another look I guess.

-Eric



[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