From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Kleikamp Subject: Re: files of size larger than fs size Date: Thu, 17 Mar 2005 15:29:49 -0600 Message-ID: <1111094989.8159.35.camel@localhost> References: <1111092712.8158.27.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: fsdevel , Phillip Lougher , Max Received: from e31.co.us.ibm.com ([32.97.110.129]:30193 "EHLO e31.co.us.ibm.com") by vger.kernel.org with ESMTP id S261199AbVCQV3w (ORCPT ); Thu, 17 Mar 2005 16:29:52 -0500 Received: from westrelay01.boulder.ibm.com (westrelay01.boulder.ibm.com [9.17.195.10]) by e31.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id j2HLTpua139628 for ; Thu, 17 Mar 2005 16:29:51 -0500 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by westrelay01.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j2HLTpPl159834 for ; Thu, 17 Mar 2005 14:29:51 -0700 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id j2HLToYw023865 for ; Thu, 17 Mar 2005 14:29:51 -0700 To: Bryan Henderson In-Reply-To: <1111092712.8158.27.camel@localhost> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, 2005-03-17 at 14:51 -0600, Dave Kleikamp wrote: > On Thu, 2005-03-17 at 12:06 -0800, Bryan Henderson wrote: > > >I found > > >that for larger values, your test program is returning -1, but unsigned > > >it appears as 18446744073709551615. > > > > You mean you ran it? Then what about the more interesting question of > > what your filesize ends up to be? You say JFS allows files up to 2**52 > > bytes, so I expect the test case would succeed up through the write at > > 2**48 and leave the filesize 2**48 + 8. But Max reports seeing 2**48 - > > 4080. > > Yeah, this is funny. I missed that part of the story. I'll try to > figure out what is going on here. The problem appears to be mixing calls to lseek64 with calls to fread and fwrite. fread & fwrite don't appear to honor the position set by lseek64. I assume replacing fread & fwrite with read & write will fix it. I haven't tried it yet, but I'm about to. -- David Kleikamp IBM Linux Technology Center