8009632: (fs) FileStore.supportsFileAttributeView does not detect user_xattr enabled on ext4

Alan Bateman Alan.Bateman at oracle.com
Thu Apr 12 18:27:53 UTC 2018


On 12/04/2018 18:39, Brian Burkhalter wrote:
> :
>
> Update:
>
> --- a/src/java.base/linux/classes/sun/nio/fs/LinuxFileStore.java
> +++ b/src/java.base/linux/classes/sun/nio/fs/LinuxFileStore.java
> @@ -140,10 +140,12 @@
>              if ((entry().hasOption("user_xattr")))
>                  return true;
> -            // user_xattr option not present but we special-case 
> ext3/4 as we
> -            // know that extended attributes are not enabled by default.
> -            if (entry().fstype().equals("ext3") || 
> entry().fstype().equals("ext4"))
> -                return false;
> +            // for ext3 and ext4 user_xattr option is enabled by 
> default so
> +            // check for explicit disabling of this option
> +            if (entry().fstype().equals("ext3") ||
> +                entry().fstype().equals("ext4")) {
> +                return !entry().hasOption("nouser_xattr");
> +            }
>
This looks good to me.

-Alan


More information about the nio-dev mailing list