--===============0761840218==
Content-Type: multipart/signed; micalg=pgp-sha1;
protocol="application/pgp-signature";
boundary="=-s1f+DgDwILP/gU7QdHGu"


--=-s1f+DgDwILP/gU7QdHGu
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Thu, 2008-04-03 at 15:49 -0400, John Taylor wrote:
> What I would like to accomplish is the merging of the .preallocate patch
> and the .fuzzy option. When these 2 switches are used together (at least
> on Windows platforms), I want rsync to determine which fuzzy file to use
> (from the fuzzy_distance() function), but then go ahead and preallocate
> the new file, not with posix_fallocate(), but with the contents of the
> file matched from fuzzy_distance(). This would keep the destination
> file from being severely fragmented.
>=20
> What I see happening is rsync doing a local file copy first, but not
> block by block. When you copy a file on Windows, with the copy command,
> the entire file (size) is preallocated so that no fragmentation occurs.
> After this step, the copy command performs the actual transfer of data
> from the source file to the destination file. You could think of this
> almost as a local, non-fragmenting file copy operation, and then the
> rsync algorithm is used to update the new, destination file.


Do I understand correctly: you want rsync to copy the fuzzy basis file
to the new destination file (either by reading and writing or with some
special Windows system call) and then proceed with the file transfer? I
don't see how the extra step would reduce fragmentation compared to
rsync's current technique. Rsync currently preallocates the new
destination file to the length of the source file using posix_fallocate,
which (IIRC) maps to Windows's SetEndOfFile, and then fills in the data.
This is pretty much the same as what the Windows copy command does, and
Rob Bosch has found that it mostly eliminates fragmentation.

Matt

--=-s1f+DgDwILP/gU7QdHGu
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQBH9Xx5C+xSYN/RlfsRAkCcAJ9bLTyABoO5HKvGSp3RVzAL6105LQCfZv1T
9Tl8pl3TmVqmlHRnEnMmTuA=
=eK+/
-----END PGP SIGNATURE-----

--=-s1f+DgDwILP/gU7QdHGu--


--===============0761840218==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

--
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
--===============0761840218==--