Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753892AbXJ3Gy2 (ORCPT ); Tue, 30 Oct 2007 02:54:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752655AbXJ3GyU (ORCPT ); Tue, 30 Oct 2007 02:54:20 -0400 Received: from rgminet01.oracle.com ([148.87.113.118]:48594 "EHLO rgminet01.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752527AbXJ3GyT (ORCPT ); Tue, 30 Oct 2007 02:54:19 -0400 Message-ID: <4726D4BA.9040304@oracle.com> Date: Tue, 30 Oct 2007 12:22:42 +0530 From: Gurudas Pai User-Agent: Thunderbird 2.0.0.6 (X11/20070728) MIME-Version: 1.0 To: Trond Myklebust CC: lkml Subject: Re: [BUG] nfs: readv/writev with O_DIRECT fails on 2.6.24-rc1 References: <47258C0A.2040603@oracle.com> <1193687977.7497.45.camel@heimdal.trondhjem.org> In-Reply-To: <1193687977.7497.45.camel@heimdal.trondhjem.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 7338 Lines: 139 Trond Myklebust wrote: > On Mon, 2007-10-29 at 13:00 +0530, gurudas pai wrote: >> 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\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 1953719673 FAIL : writev failed: Invalid argument >> diotest05 1953719674 FAIL : Read, Write with Direct IO >> diotest05 0 INFO : 3/3 testblocks failed >> Process 4749 detached >> >> >> mount options: >> rw,bg,nointr,hard,timeo=600,wsize=32768,rsize=32768,nfsvers=3,tcp,actimeo=0 >> >> >> Please let me know if I have to try test/debug patch. > > Nobody has yet added support for nvec>1. > 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\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3\3\3\3"..., 4096}], 5) = 20480 readv(4, [{"\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3"..., 4096}, {"\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3"..., 4096}, {"\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3"..., 4096}, {"\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3"..., 4096}, {"\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3"..., 4096}], 5) = 20480 writev(3, [{"\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4"..., 4096}, {"\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4"..., 4096}, {"\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4"..., 4096}, {"\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4"..., 4096}, {"\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4"..., 4096}], 5) = 20480 readv(4, [{"\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4"..., 4096}, {"\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4"..., 4096}, {"\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4"..., 4096}, {"\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4"..., 4096}, {"\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4"..., 4096}], 5) = 20480 Thanks, -Guru - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/