Initial commit
options: add upstream "--copy_devices" patch

Signed-off-by: Stanislav Kinsbursky <stanislav.kinsbursky@profitbricks.com>
recv_generator: do not make new device files in case on "--copy-devices"

Signed-off-by: Stanislav Kinsbursky <stanislav.kinsbursky@profitbricks.com>
recv_generator: do not remove existent device files in case on "--copy-devices"

Signed-off-by: Stanislav Kinsbursky <stanislav.kinsbursky@profitbricks.com>
received: do not truncate destination device if "--copy-devices" specified

Signed-off-by: Stanislav Kinsbursky <stanislav.kinsbursky@profitbricks.com>
xattrs: update block device size after *_stat()

Stat sycall returns 0 size for block devices.
Correct size is required to use checksumming - IOW transferring only changed
data, but not the whole device.

Signed-off-by: Stanislav Kinsbursky <stanislav.kinsbursky@profitbricks.com>
recv_files: update st.st_size for block devices

And don't close file descriptor in case of copy_devices is set.

Signed-off-by: Stanislav Kinsbursky <stanislav.kinsbursky@profitbricks.com>
rsync: rebase on version 3.1.1

Signed-off-by: Stanislav Kinsbursky <stanislav.kinsbursky@profitbricks.com>
rsync: "offset" option introduced

This option will be used to set offest in megabytes to seek from start for
both source and destination.

Signed-off-by: Stanislav Kinsbursky <stanislav.kinsbursky@profitbricks.com>
rsync: make map and hash_search dependent on offset_in_mb

Also drop redundant seek back to the start of the source device

Signed-off-by: Stanislav Kinsbursky <stanislav.kinsbursky@profitbricks.com>
receiver: apply offset to destination only in case of "inplace" option is set

Signed-off-by: Stanislav Kinsbursky <stanislav.kinsbursky@profitbricks.com>
options: make --copy-devices dependant on --inplace option

Signed-off-by: Stanislav Kinsbursky <stanislav.kinsbursky@profitbricks.com>
options: make --offset-in-mb dependant on --copy-devices option

Signed-off-by: Stanislav Kinsbursky <stanislav.kinsbursky@profitbricks.com>
big patch

Signed-off-by: Stanislav Kinsbursky <stanislav.kinsbursky@profitbricks.com>
rsync: a lot of fixes and changes to make checksum matching work

Mostly regarding proper offset using, bacause transfer with an offset wasn't a
part of architectural design.

Signed-off-by: Stanislav Kinsbursky <stanislav.kinsbursky@profitbricks.com>
Merge branch 'master' of git+ssh://git/srv/git/ri/pb-rsync
match: fix silly buf with setting iterator to offset value

Signed-off-by: Stanislav Kinsbursky <stanislav.kinsbursky@profitbricks.com>
rsync: fix block device size calculation for proper data trasfer stats

Signed-off-by: Stanislav Kinsbursky <stanislav.kinsbursky@profitbricks.com>
io: generalize bandwith limiting function

Now it accepts the limit value

Signed-off-by: Stanislav Kinsbursky <stanislav.kinsbursky@profitbricks.com>
rsync: "--file_bwlimit" option introduced

This option allows to limit read and write bandtwith on both sides of rsync
transfer.

Signed-off-by: Stanislav Kinsbursky <stanislav.kinsbursky@profitbricks.com>