From owner-freebsd-fs@FreeBSD.ORG Wed Apr 4 12:42:04 2012 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 99A741065672; Wed, 4 Apr 2012 12:42:04 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from people.fsn.hu (people.fsn.hu [195.228.252.137]) by mx1.freebsd.org (Postfix) with ESMTP id 1C1B58FC0C; Wed, 4 Apr 2012 12:42:03 +0000 (UTC) Received: by people.fsn.hu (Postfix, from userid 1001) id 1405FCA5879; Wed, 4 Apr 2012 14:42:03 +0200 (CEST) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MF-ACE0E1EA [pR: 18.6707] X-CRM114-CacheID: sfid-20120404_14420_9458915E X-CRM114-Status: Good ( pR: 18.6707 ) X-DSPAM-Result: Whitelisted X-DSPAM-Processed: Wed Apr 4 14:42:03 2012 X-DSPAM-Confidence: 0.9949 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 4f7c419b451723344715381 X-DSPAM-Factors: 27, From*Attila Nagy , 0.00010, FreeBSD, 0.00048, FreeBSD, 0.00048, wrote+>, 0.00179, )+>, 0.00248, not+>, 0.00356, Url*pr, 0.00438, Url*org/cgi/query, 0.00438, >>+>>, 0.00450, the+patch, 0.00475, the+patch, 0.00475, wrote, 0.00508, wrote, 0.00508, >>+On, 0.00518, References*fsn.hu>, 0.00518, References*fsn.hu>, 0.00518, this?, 0.00569, wrote+>>>, 0.00632, you+mean, 0.00632, 10+38, 0.00710, a+patch, 0.00710, Sorry, 0.00767, python, 0.00811, >+on, 0.00811, User-Agent*i686, 0.00896, above+the, 0.00945, X-Spambayes-Classification: ham; 0.00 Received: from japan.t-online.private (japan.t-online.co.hu [195.228.243.99]) by people.fsn.hu (Postfix) with ESMTPSA id 9ADEBCA5869; Wed, 4 Apr 2012 14:42:02 +0200 (CEST) Message-ID: <4F7C419A.4050607@fsn.hu> Date: Wed, 04 Apr 2012 14:42:02 +0200 From: Attila Nagy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.23) Gecko/20090817 Thunderbird/2.0.0.23 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: Andriy Gapon References: <4F7BFDD4.6080703@fsn.hu> <4F7C088D.4070803@FreeBSD.org> <4F7C0B41.20702@fsn.hu> <4F7C0CE4.2030408@FreeBSD.org> <4F7C129B.9010206@fsn.hu> <4F7C14B3.3040705@FreeBSD.org> In-Reply-To: <4F7C14B3.3040705@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-fs@FreeBSD.org Subject: Re: SEEK_HOLE and SEEK_DATA does not work on zfs (with test case) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Apr 2012 12:42:04 -0000 On 04/04/12 11:30, Andriy Gapon wrote: > on 04/04/2012 12:21 Attila Nagy said the following: >> On 04/04/12 10:57, Andriy Gapon wrote: >>> on 04/04/2012 11:50 Attila Nagy said the following: >>>> On 04/04/12 10:38, Andriy Gapon wrote: >>>>> on 04/04/2012 10:52 Attila Nagy said the following: >>>>>> Hi, >>>>>> >>>>>> I've started to experiment with SEEK_HOLE and SEEK_DATA in python on a recent >>>>>> FreeBSD 9-STABLE/amd64 box and it quickly became evident that the program that >>>>>> works on Solaris doesn't work on FreeBSD. >>>>>> Python itself couldn't cause this, because it correctly issues the lseek, but >>>>>> taking the C test program from here: >>>>>> https://lkml.org/lkml/2011/4/22/79 >>>>>> gives the same result (failure). >>>>> Please see this PR: http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/164445 >>>>> If you can't figure out a patch from its contents, then I'll try to provide it >>>>> some time later today. >>>>> >>>> I will try it, but the e-mail above the patch is somewhat scary... >>> Sorry, I could not understand what you mean. >>> >> "The patch does the copy of the offset passed from the application >> correctly, and allows lseek(2) with SEEK_DATA/SEEK_HOLE to be used on >> ZFS, but it is not a solution. I couldn't see a problem in the >> assembler of the copyin and copyout functions in >> sys/amd64/amd64/support.S, but I might be wrong, I'm no assembler >> expert." >> >> This is scary. :) > Did you see my comment in the PR trail? It explains why that approach is not > scary but entirely correct. > Due to some mailing issues it is re-ordered with the patch. > No, thanks for the clarification. I've tried that patch and the C test program runs fine. Will you commit this? And I think a regression test case would also be good. :) Thanks,