Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932627Ab2K2EQG (ORCPT ); Wed, 28 Nov 2012 23:16:06 -0500 Received: from smtp5-g21.free.fr ([212.27.42.5]:49043 "EHLO smtp5-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753758Ab2K2EQB (ORCPT ); Wed, 28 Nov 2012 23:16:01 -0500 From: Jim Meyering To: Hugh Dickins Cc: Jaegeuk Hanse , Andrew Morton , "Theodore Ts'o" , Zheng Liu , Jeff liu , Paul Eggert , Christoph Hellwig , Josef Bacik , Andi Kleen , Andreas Dilger , Dave Chinner , Marco Stornelli , Chris Mason , Sunil Mushran , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] tmpfs: support SEEK_DATA and SEEK_HOLE (reprise) In-Reply-To: (Hugh Dickins's message of "Wed, 28 Nov 2012 18:02:21 -0800 (PST)") References: <20121129012933.GA9112@kernel> Date: Thu, 29 Nov 2012 05:15:50 +0100 Message-ID: <87lidlxcw9.fsf@rho.meyering.net> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1684 Lines: 33 Hugh Dickins wrote: > On Thu, 29 Nov 2012, Jaegeuk Hanse wrote: ... >> But this time in which scenario will use it? > > I was not very convinced by the grep argument from Jim and Paul: > that seemed to be grep holding on to a no-arbitrary-limits dogma, > at the expense of its users, causing an absurd line-length issue, > which use of SEEK_DATA happens to avoid in some cases. > > The cp of sparse files from Jeff and Dave was more convincing; > but I still didn't see why little old tmpfs needed to be ahead > of the pack. > > But at LinuxCon/Plumbers in San Diego in August, a more convincing > case was made: I was hoping you would not ask, because I did not take > notes, and cannot pass on the details - was it rpm building on tmpfs? > I was convinced enough to promise support on tmpfs when support on > ext4 goes in. Re the cp-vs-sparse-file case, the current FIEMAP-based code in GNU cp is ugly and complicated enough that until recently it harbored a hard-to-reproduce data-corrupting bug[*]. Now that SEEK_DATA/SEEK_HOLE support work will work also for tmpfs and ext4, we can plan to remove the FIEMAP-based code in favor of a simpler SEEK_DATA/SEEK_HOLE-based implementation. With the rise of virtualization, copying sparse images efficiently (probably searching, too) is becoming more and more important. So, yes, GNU cp will soon use this feature. [*] https://plus.google.com/u/0/114228401647637059102/posts/FDV3JEaYsKD -- 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/