Bug 845614 - fuse directio fails with RHEL5.9-Server-20120729.1
fuse directio fails with RHEL5.9-Server-20120729.1
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: fuse (Show other bugs)
5.9
All Linux
high Severity high
: rc
: ---
Assigned To: Ric Wheeler
Red Hat Kernel QE team
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-03 11:11 EDT by John Brier
Modified: 2013-08-14 19:10 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-03 13:50:06 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Brier 2012-08-03 11:11:39 EDT
Description of problem:

This test fails on multiple machines.

Version-Release number of selected component (if applicable): 2.6.18-333 i386 and x86_64


How reproducible: 100%


Try to run 'echo '
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

int main(int argc, char * argv[])
{
        int fd;
        char buf[1024];
        ssize_t len;
        if ((fd = open(argv[1],O_RDWR|O_CREAT|O_DIRECT)) < 0)
        {
                perror("open failed:");
                exit(1);
        }
        if ((len = write(fd,buf,1024)) < 0)
        {
                perror("read() failed:");
                exit(1);
        }
        if (lseek(fd,0,SEEK_SET) < 0)
        {
                perror("lseek() failed:");
                exit(1);
        }
        sleep(2);
        if ((len = read(fd,buf,1024)) < 0)
        {
                perror("read() failed:");
                exit(1);
        }
        if (lseek(fd,0,SEEK_SET) < 0)
        {
                perror("lseek() failed:");
                exit(1);
        }
        sleep(2);
        if ((len = read(fd,buf,1024)) < 0)
        {
                perror("read() failed:");
                exit(1);
        }
        close(fd);
        return 0;
}
' > directio.c'... OK!
Try to run 'gcc -o fuse_test_direct directio.c -D_GNU_SOURCE'... OK!
Try to run 'sudo -u 'fuse_tester' /usr/local/bin/sshfs root@localhost:/root '/mnt/MP1' -o allow_root -d &>./debug.info &'... OK!
Try to run 'sleep 2'... OK!
Try to run 'mount |grep -q '/mnt/MP1''... OK!
Try to run './fuse_test_direct /mnt/MP1/tmp.Lh70Ok4MYZ'... open failed:: Invalid argument
Failed!
Comment 3 Ric Wheeler 2012-08-03 13:50:06 EDT
Support for O_DIRECT in FUSE went into upstream and then into RHEL6 recently (see https://bugzilla.redhat.com/show_bug.cgi?id=753798).

I don't know why your code seemed to work in 5.8, I would have expected failure there as well.

If I misunderstand, feel free to reopen the BZ and we will look for a developer to dig into this with you.

Note You need to log in before you can comment on or make changes to this bug.