Re: [BUG] nfs: readv/writev with O_DIRECT fails on 2.6.24-rc1

Previous thread: [PATCH] INPUT: fix hidinput_connect ignoring retval from input_register_device by Dirk Hohndel on Monday, October 29, 2007 - 2:51 am. (14 messages)

Next thread: kernel BUG at mm/slab.c:597! by marco gaddoni on Monday, October 29, 2007 - 3:50 am. (2 messages)
To: lkml <linux-kernel@...>
Date: Monday, October 29, 2007 - 3:30 am

Hi,

While running olt kit on 2.6.24-rc1 over nfs , Oracle reported I/O
errors. I debugged little more and found that readv/writev are failing
with O_DIRECT on nfs ( netapp's filer).

I am able to re-produce same error using ltp/diotest5.

./diotest5 -f /storage/nas/testfile -v 5

diotest05 1953719669 FAIL : readv failed: Invalid argument
diotest05 1953719670 FAIL : Read with Direct IO, Write without
diotest05 1953719671 FAIL : writev failed: Invalid argument
diotest05 1953719672 FAIL : Write with Direct IO, Read without
diotest05 1953719673 FAIL : writev failed: Invalid argument
diotest05 1953719674 FAIL : Read, Write with Direct IO
diotest05 0 INFO : 3/3 testblocks failed

>strace -e readv,writev ./diotest5 -f /storage/nas/testfile -v 5
writev(3, [{"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096}, {"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096}, {"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096}, {"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096}, {"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096}], 5) = 20480
readv(4, 0x8051000, 5) = -1 EINVAL (Invalid argument)
diotest05 1953719669 FAIL : readv failed: Invalid argument
diotest05 1953719670 FAIL : Read with Direct IO, Write without
writev(3, [{"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096}, {"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096}, {"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096}, {"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096}, {"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096}], 5) = -1 EINVAL(Invalid argument)
diotest05 1953719671 FAIL : writev failed: Invalid argument
diotest05 1953719672 FAIL : Write with Direct IO, Read without
writev(3, [{"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096}, {"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\...

To: gurudas pai <gurudas.pai@...>
Cc: lkml <linux-kernel@...>
Date: Monday, October 29, 2007 - 3:59 pm

Nobody has yet added support for nvec>1.

Trond

-

To: Trond Myklebust <trond.myklebust@...>
Cc: lkml <linux-kernel@...>
Date: Tuesday, October 30, 2007 - 2:52 am

Tried with old kernel 2.6.18-8 (RHEL5), test passed with nvec=5.

>strace -fff -e readv,writev,open ./diotest5 -f /storage/nas/testfile -v 5
open("/etc/ld.so.cache", O_RDONLY) = 3
open("/lib/libc.so.6", O_RDONLY) = 3
open("/storage/nas/ca-ostest184.us.oracle.com/testfile",
O_RDONLY|O_CREAT|O_DIRECT, 0666) = 3
open("/storage/nas/testfile", O_WRONLY|O_CREAT, 0666) = 3
open("/storage/nas//testfile", O_RDONLY|O_CREAT|O_DIRECT|O_LARGEFILE,
0666) = 4
writev(3, [{"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096}, {"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096}, {"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096}, {"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096}, {"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096}], 5) = 20480
readv(4, [{"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096}, {"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096}, {"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096}, {"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096}, {"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096}], 5) = 20480
writev(3, [{"\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1"...,
4096}, {"\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1"...,
4096}, {"\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1"...,
4096}, {"\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1"...,
4096}, {"\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1"...,
4096}], 5) = 20480
readv(4, [{"\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1"...,
4096}, {"\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1"...,
4096}, {"\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1"...,
4096}, {"\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1"...,
4096}, {"\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1"...,
4096}], 5) = 20480
writev(3, [{"\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\...

Previous thread: [PATCH] INPUT: fix hidinput_connect ignoring retval from input_register_device by Dirk Hohndel on Monday, October 29, 2007 - 2:51 am. (14 messages)

Next thread: kernel BUG at mm/slab.c:597! by marco gaddoni on Monday, October 29, 2007 - 3:50 am. (2 messages)