Better NewIO2 file system implementation for AIX platform

Volker Simonis volker.simonis at gmail.com
Tue Dec 2 08:39:13 UTC 2014


Hi Deven,

I've just realized that you still use the Linux functions fgetxattr,
fsetxattr, ... I don't think this will ever work on AIX. Please use
the corresponding functions from <sys/ea.h> (i.e. getea, setea,
removeea).

Thanks,
Volker


On Mon, Dec 1, 2014 at 7:38 PM, Volker Simonis <volker.simonis at gmail.com> wrote:
> On Mon, Dec 1, 2014 at 9:42 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
>> On 01/12/2014 08:06, deven you wrote:
>>>
>>> Hi All,
>>>
>
> Hi Deven,
>
> thank you for your contribution. Please find my comments inline:
>
>>> Our current NIO2 file system support to AIX is very limited, hence I took
>>> some time to try to complete it. Openjdk bug[1] tracks this bug and here
>>> is
>>> my patch[2] which enhances the AIX file system especially by adding the
>>> support by Implementing AixDosFileAttributeView.java and
>>> AixUserDefinedFileAttributeView.java.
>>>.
>>> Could anyone take a look?
>>>
>> Does SAMBA or other CIFS servers running on AIX store the DOS attributes as
>> extended attributes? I'm just wondering if the DOS file attribute view makes
>> sense or not.
>>
>
> I'm by no means an expert in this area and just started to experiment
> a little bit. While looking at tests like
> 'java/nio/file/attribute/DosFileAttributeView/Basic.java' I was
> surprised to see that DosFileAttributeView can also be used on Linux.
> While this makes sense for DOS file systems mounted into Linux which
> map the DOS attributes to extended attributes on Unix it is probably
> academic for file systems like ext2/3/4 which support extended
> attributes as well. Unfortunately, tests like
> DosFileAttributeView/Basic.java mostly test extended attributes on a
> Linux files system because they only create and change files in /tmp
> which is hardly ever a mounted DOS file system.
>
> All that said, on AIX the JFS2 file system also supports extended
> attributes (see
> http://en.wikipedia.org/wiki/Extended_file_attributes). Hopefully the
> CIFS client correctly maps the DOS attributes to extended user
> attributes but I couldn't check that today because I couldn't find a
> AIX box with CIFS client today. I'll try to find one tomorrow, but
> perhaps Deven can already confirm this?
>
> Following some more comments:
>
> AixDosFileAttributeView.java
>  - please replace "ext3" by "JFS2" in the comment as I'm not aware of
> any ext3 support in AIX
>
> AixFileStore.java
>  - the detection if extended attributes are supported doesn't seem to
> work. It seems like supportsFileAttributeView() has been just copied
> from the corresponding Linux implementation but that won't work on
> AIX. Please remove the ext3/4 stuff and do a real check (i.e. check if
> the file system is JFS2 and if extended attributes have been enabled
> on on the corresponding file system. See 'chfs -a ea=v2', 'man 2
> getea', setea, ...).
>  - the test DosFileAttributeView/Basic.java should succeed without
> saying "DOS file attribute not supported."
>
> AixNativeDispatcher.java
> AixNativeDispatcher.c
>  - you define 'getAixMountEntries()', 'queryMountEntrySize()' and the
> corresponding native implementations but they don't seemed to be used
> anywhere. Please remove this dead code. If you need to get a list of
> all mounted file systems you could use 'getmntctl()' which is already
> there and does exactly that.
>
>> I suspect you will need to update a number of tests to (like
>> FileSystem/Basic.java) and Files/CopyAndMove.java) to ensure that this new
>> code is exercised by the tests.
>>
>
> Yes, could you please elaborate how you have tested your
> implementation until now?
>
> Thank you and best regards,
> Volker
>
>> A minor comment but we usually use 4-space indentation in the library native
>> code.
>>
>> -Alan


More information about the nio-dev mailing list