8030048: (fs) Support UserDefinedFileAttributeView/extended attributes on OS X / HFS+

Alan Bateman Alan.Bateman at oracle.com
Sun Jan 10 16:51:40 UTC 2021


On 10/01/2021 15:13, Sebastian Stenzel wrote:
> :
> I agree that in order to easily follow what has changed, we should do two separate patches:
>
> 1. add macOS support and accept the fact that this is 90% duplicated code from Linux
> 2. deduplicate and modernize
That's fine. You can use JDK-8030048 for the PR to add the 
implementation for macOS. We can create a second issue to merge the 
implementations.


> Regarding the BSD confusion: MacOSXFileSystemProvider extends BsdFileSystemProvider. We have four system calls (fgetxattr, fsetxattr, fremovexattr, flistxattr), all of them not being macOS-specific, but rather inherited from the BSD-based XNU kernel. If you look up the man pages for any of them on macOS, you'll get the BSD man page.
Sure, there is a bit of history issue from JDK 7u4 then the macOS port 
was added. It was initially based on the BSD port although the BSD port 
was still maintained in down stream projects.


> That is why we thought it would be best to put the added code to the most generic place possible, which is (currently) the BsdFileSystemProvider. After dedup it will probably be UnixFileSystemProvider, however some distinctions will be required.
Yes, I'm sure there will be subtle differences and some conditional 
inclusion by the build too.

-Alan.


More information about the nio-dev mailing list