bug#6131: [PATCH]: fiemap support for efficient sparse file copy (original) (raw)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
From: | jeff.liu |
---|---|
Subject: | bug#6131: [PATCH]: fiemap support for efficient sparse file copy |
Date: | Wed, 16 Jun 2010 14:57:01 +0800 |
User-agent: | Thunderbird 2.0.0.14 (X11/20080505) |
Paul Eggert wrote:
I looked at the proposed fiemap patch for cp and see another issue with it, which needs to be thought through more carefully.
The proposed fiemap code tries to copy the physical holes in the source file. But currently cp copies the logical holes: that is, it skips over writing (and thus attempts to create physical holes) whenever the source file contains a block of zeros, regardless of whether that block of zeros is physically stored in the file system. The current cp behavior is often the desired behavior (particularly for cp --sparse=always) and the fiemap code shouldn't alter that.
For example, if a fiemapextent has the FIEMAPEXTENTUNWRITTEN flag set, cp should treat that as a hole, because the extent is all zeros. (This will greatly help performance in some cases.) Also, if an input extent is read and a block of it is found to be zeros, cp should skip over that block when writing. If FIEMAP_EXTENT_UNWRITTEN flag is set, we can call fallocate(2) against the dest file directly for the performance boost.
Thanks, -Jeff
If the proposed fiemap code was intended to copy the physical holes, then the code wasn't successful in implementing the intent, as there's no guarantee that the extents of the destination are the same as the extents of the source. If it is useful to have 'cp' copy the physical holes, this could be supported via a new cp option or options, but surely the default should continue to be to copy logical holes.
-- With Windows 7, Microsoft is asserting legal control over your computer and is using this power to abuse computer users.
- bug#6131: [PATCH]: fiemap support for efficient sparse file copy, (continued)
* bug#6131: [PATCH]: fiemap support for efficient sparse file copy, Paul Eggert, 2010/06/15
* bug#6131: [PATCH]: fiemap support for efficient sparse file copy, Sunil Mushran, 2010/06/15
* bug#6131: [PATCH]: fiemap support for efficient sparse file copy, Joel Becker, 2010/06/15
* bug#6131: [PATCH]: fiemap support for efficient sparse file copy, Pádraig Brady, 2010/06/15
* bug#6131: [PATCH]: fiemap support for efficient sparse file copy, Jim Meyering, 2010/06/16
* bug#6131: [PATCH]: fiemap support for efficient sparse file copy, Pádraig Brady, 2010/06/16
* bug#6131: [PATCH]: fiemap support for efficient sparse file copy, Jim Meyering, 2010/06/16
* bug#6131: [PATCH]: fiemap support for efficient sparse file copy, Joel Becker, 2010/06/16
* bug#6131: [PATCH]: fiemap support for efficient sparse file copy, Pádraig Brady, 2010/06/16
* bug#6131: [PATCH]: fiemap support for efficient sparse file copy, Joel Becker, 2010/06/15
* bug#6131: [PATCH]: fiemap support for efficient sparse file copy,jeff.liu <=
* bug#6131: [PATCH]: fiemap support for efficient sparse file copy, Joel Becker, 2010/06/16
* bug#6131: [PATCH]: fiemap support for efficient sparse file copy, Tao Ma, 2010/06/16
* bug#6131: [PATCH]: fiemap support for efficient sparse file copy, Sunil Mushran, 2010/06/10
* bug#6131: [PATCH]: fiemap support for efficient sparse file copy, jeff.liu, 2010/06/11
* bug#6131: [PATCH]: fiemap support for efficient sparse file copy, Jim Meyering, 2010/06/11
* bug#6131: [PATCH]: fiemap support for efficient sparse file copy, Jim Meyering, 2010/06/13
* bug#6131: [PATCH]: fiemap support for efficient sparse file copy, Eric Sandeen, 2010/06/11
* bug#6131: [PATCH]: fiemap support for efficient sparse file copy, jeff.liu, 2010/06/12
* bug#6131: [PATCH]: fiemap support for efficient sparse file copy, Paul Eggert, 2010/06/15
* bug#6131: [PATCH]: fiemap support for efficient sparse file copy, Paul Eggert, 2010/06/15
- Prev by Date:bug#6131: [PATCH]: fiemap support for efficient sparse file copy
- Next by Date:bug#6131: [PATCH]: fiemap support for efficient sparse file copy
- Previous by thread:bug#6131: [PATCH]: fiemap support for efficient sparse file copy
- Next by thread:bug#6131: [PATCH]: fiemap support for efficient sparse file copy
- Index(es):