GNU bug report logs - #6131
[PATCH]: fiemap support for efficient sparse file copy

Previous Next

Package: coreutils;

Reported by: "jeff.liu" <jeff.liu <at> oracle.com>

Date: Fri, 7 May 2010 14:16:02 UTC

Severity: normal

Tags: patch

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Joel Becker <Joel.Becker <at> oracle.com>
To: Paul Eggert <eggert <at> CS.UCLA.EDU>
Cc: Sunil Mushran <sunil.mushran <at> oracle.com>, bug-coreutils <at> gnu.org, Jim Meyering <jim <at> meyering.net>, "jeff.liu" <jeff.liu <at> oracle.com>, Chris Mason <chris.mason <at> oracle.com>, Pádraig Brady <P <at> draigBrady.com>, Tao Ma <tao.ma <at> oracle.com>
Subject: bug#6131: [PATCH]: fiemap support for efficient sparse file copy
Date: Fri, 16 Jul 2010 14:33:17 -0700
On Fri, Jul 16, 2010 at 08:53:27AM -0700, Paul Eggert wrote:
> I haven't had time to look at it carefully, but here's a very brief
> review.  The code you sent, like what's in the fiemap branch, has
> a separate version of a chunk of copy.c that does both reading
> and writing and optimizes both reading and writing by invoking the fiemap ioctls
> at strategic locations.  Instead, it would be better to have
> a module that separates out the efficient-read stuff by telling
> copy.c where the next significant input extent is, and then modify copy.c
> to use that module.  On hosts that do not support fiemap, the module
> would simply report the entire input file as that file's only extent.

	Precisely.  The sparse-core.c or whatever it is called shouldn't
be doing the copy, it should just provide:

handle = init_extent_scan(fd);
while (get_next_extent(handle, &extent_start, &extent_len)) {
    ...
}
close_extent_scan(handle);

	Then copy.c just implements this loop and the '...' part.

Joel

-- 

"A narcissist is someone better looking than you are."  
         - Gore Vidal

Joel Becker
Consulting Software Developer
Oracle
E-mail: joel.becker <at> oracle.com
Phone: (650) 506-8127




This bug report was last modified 14 years and 119 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.