[Bugs] [Bug 1360785] Direct io to sharded files fails when on zfs backend

bugzilla at redhat.com bugzilla at redhat.com
Fri Jul 29 16:59:32 UTC 2016


https://bugzilla.redhat.com/show_bug.cgi?id=1360785



--- Comment #10 from Krutika Dhananjay <kdhananj at redhat.com> ---
Thanks. That was very helpful.

<strace-output>
...
...
open("/gluster2/brick2/1/.glusterfs/13/fd/13fde185-8bcf-4747-bec9-a67f3495d65e",
O_RDWR) = 17
...
...
open("/gluster2/brick2/1/.glusterfs/13/fd/13fde185-8bcf-4747-bec9-a67f3495d65e",
O_RDWR|O_DIRECT) = -1 EINVAL (Invalid argument)
open("/gluster2/brick2/1/.glusterfs/unlink/13fde185-8bcf-4747-bec9-a67f3495d65e",
O_RDWR|O_DIRECT) = -1 ENOENT (No such file or directory)
...
...
</strace-output>


>From the above, it is clear that the open() is failing with EINVAL. But if you
notice, open() on the file with O_RDWR succeeded. But when the same file was
open()'d with O_DIRECT flag included, it failed with EINVAL.

I checked `man 2 open` to find out when the syscall returns EINVAL.

<man-page-excerpt>
...
...
       EINVAL The filesystem does not support the O_DIRECT flag.  See NOTES for
more information.

       EINVAL Invalid value in flags.

       EINVAL O_TMPFILE was specified in flags, but neither O_WRONLY nor O_RDWR
was specified.
...
...
</man-page-excerpt>

So it seems very likely that the EINVAL was due to O_DIRECT.

At this point I wanted to ask you this - does zfs (or the version of it you're
using) support O_DIRECT?

-Krutika

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are on the CC list for the bug.


More information about the Bugs mailing list