RFR: 8262844: (fs) FileStore.supportsFileAttributeView might return false negative in case of ext3

Christoph Langer clanger at openjdk.java.net
Wed Mar 3 14:52:40 UTC 2021


On Wed, 3 Mar 2021 11:31:23 GMT, Christoph Langer <clanger at openjdk.org> wrote:

>> I can add that RHEL 8.3 also has extended attributes as default mount option for ext3 and will not show up in /proc/mounts.
>> 
>> To me it seems that the default was changed some time ago, but it might not be so easy to find a kernel version that enabled it by default as it was in case of ext4.
>> 
>> And even if we could find a kernel version that started to use it as default, it might still be possible to disable it during build time or by setting default mount options on the ext3 filesystem with tune2fs. These will also not show up in /proc/mounts (just checked on RHEL 8.3):
>> 
>>> #tune2fs -l /dev/sdb1 | grep "Default mount"
>> Default mount options:    **user_xattr** acl
>> #cat /proc/mounts | grep /dev/sdb1
>> 
>> 
>> And this is the same for ext4.
>> 
>> I think the only save way to determine the support is to check on the filesystem. What do you think?
>
> I also think that if we were to do it right, we should go with always probing. @ArnoZeller, can you try that out in our test landscape? Alternatively, if there's a reason against always probing, maybe we could add an option to enable probing?

The latest changes remove the ext3/ext4 special handling and we should end up in probing. Let's see what the outcome of testing will be. If we were to do it like that, getKernelVersion() can be removed then as well.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2778


More information about the nio-dev mailing list