Commit Graph

159 Commits

Author SHA1 Message Date
Andrew Tridgell
e8f5b936ad move include of compat.h after other includes. 1998-06-18 09:37:21 +00:00
Andrew Tridgell
a800434a82 added --stats option for verbose stats on the file transfer 1998-06-01 03:42:14 +00:00
Andrew Tridgell
e3fe383aaa reduce IO_BUFFER_SIZE by 4 bytes so when then length word gets added
it is a power of 2.
1998-05-27 13:47:34 +00:00
Andrew Tridgell
4c36ddbeec heaps of cleanup in the io code.
we no longer use non-blocking IO, instead it uses select a lot more,
being careful to always allow for reading whenever a valid read fd is
available and chcking timeouts.

also split the file io calls into fileio.c
1998-05-27 12:37:22 +00:00
Andrew Tridgell
2b6b4d539b added support for --include, --include-from and the +/- syntax 1998-05-27 11:02:33 +00:00
Andrew Tridgell
7b1ce0d746 fixed a race condition in the --delete handling code. The bug led to
spurious error messages about not be able to delete some files.

this fix also makes --delete processing more efficient
1998-05-27 06:30:50 +00:00
Andrew Tridgell
bb0f7089fe check for munmap as well as mmap. NextStep only has mmap in standard
libs
1998-05-26 14:18:59 +00:00
Andrew Tridgell
2f326946a1 now that we slide the mmap window we can use a smaller MAX_MAP_SIZE
and thus consume less virtual memory on the sending side.
1998-05-21 05:55:33 +00:00
Andrew Tridgell
8d9dc9f99d this is a large commit which adds io multiplexing, thus giving error
messages from the server when using the socket code.

I've doen a fair bit of testing and I don't seem to have broken
anything, but it is a very complex change. More testing needed!
1998-05-18 08:20:26 +00:00
Andrew Tridgell
5dd7e03167 put a limit (default 1MB) on the read buffer size. This stops it
growing too much if the sender is much faster than the receiver
1998-05-17 05:56:32 +00:00
Andrew Tridgell
d6dead6bb1 added write buffering during the file list sending. This makes things
a bit more efficient (less system calls)
1998-05-15 07:34:19 +00:00
Andrew Tridgell
874895d51a added globbing support in the rsync daemon. This will allow you to
specify wildcards when grabbing files from a anon rsync daemon.
1998-05-13 15:44:04 +00:00
Andrew Tridgell
0473e2a14a define INADDR_NONE if necessary 1998-05-13 13:22:26 +00:00
Andrew Tridgell
6c8f537302 need sys/file.h for flock() 1998-05-13 09:01:11 +00:00
Andrew Tridgell
ff8b29b8c6 use syslog instead of /var/adm/rsyncd.log 1998-05-10 08:24:38 +00:00
Andrew Tridgell
3591c0660c cleanup code a bit 1998-05-10 01:46:06 +00:00
Andrew Tridgell
f0fca04e4e first vesrion of working socket based rsync. It still needs a lot of
work, but at least it works :-)
1998-05-09 13:58:54 +00:00
Andrew Tridgell
9486289ce4 some large systematic changes to make socket conversion easier. The
biggest one is the use of rprintf() instead of fprintf()
1998-05-07 14:50:22 +00:00
Andrew Tridgell
d6e6ecbdbf handle broken readdir() on Solaris 2.6 (it returns the name offset by
2 characters!)
1998-05-06 07:00:38 +00:00
Andrew Tridgell
debb45054a Solaris 2.6 doesn't support "signed char". What a broken system! 1998-05-06 06:21:35 +00:00
Andrew Tridgell
bcacc18bdf added support for 64 bit file offsets under Solaris 2.6. Not tested
yet.
1998-05-06 05:43:36 +00:00
Andrew Tridgell
3bee67337d fix up the int64 handling a little. It should work on a few more
systems now (tested on OSF1)
1998-05-06 05:05:00 +00:00
Andrew Tridgell
a0b65b1805 added support for sockets and fifos 1998-04-28 05:53:18 +00:00
Andrew Tridgell
3333ffbd43 revamped the -delete code. The last few bugs with it revealed that it
had a fundamental flaw in the way it detected duplicate deletion
scanning (which is very important when -R is used). I now store
inode/device numbers and use those to do the detection. This should be
a much less fragile method.
1998-04-17 06:07:23 +00:00
Andrew Tridgell
d867229ba0 handle sparse files more efficiently 1998-04-05 06:43:38 +00:00
Andrew Tridgell
6ba9279fb2 - added an internal io_error flag. Whenever an io error occurs (such
as not being able to open a directory) this flag is set and propogated
to the other end. When this flag is set the --delete code is
disabled. This prevents the problem that io or permission errors could
cause files to be incorrectly deleted on the destination.

- added a --timeout option. This allows you to set an IO timeout in
seconds. If no io occurs in that time then rsync exits with a timeout
error.

- changed some FERROR fds to FINFO
1998-03-26 04:18:47 +00:00
Andrew Tridgell
71c4617611 - on systems (such as intel linux) where off_t is 32 bits but "long long"
is 64 bits use long long to get the totals right when transferring
  more than 2^32 bytes of data.

- use inline on flist_up if the compiler supports it
1998-03-25 11:08:32 +00:00
Andrew Tridgell
3a6a366fc5 finished 64 bit file offset support. Hopefully rsync can now transfer
files up to 2^64 bytes in size. Now I just need to find enough disk
space to test this :-)

The 64 bit offset code only works if off_t is 64 bits (or bigger!) on
both ends of the link. If one end tries to send a file greater than
2^31 in size and the other end doesn't support it then rsync will
abort.

This commit also cleans up some static declarations so they are in a
unitinitialised segment to save load time.
1998-03-23 12:52:57 +00:00
Andrew Tridgell
0b91056090 started to add some 64 bit file offset support - not complete yet 1998-03-23 08:49:48 +00:00
Andrew Tridgell
2d0bb8eb0f save some more memory by only allocating the checksum when needed 1998-03-23 07:25:21 +00:00
Andrew Tridgell
3ec4dd9781 a large change to make rsync much more memory efficient. This is done
in 3 ways:

1) the realloc is done on a list of pointers, not a list of structures
2) only the basename of the file is now kept in the file struct an a
   util function f_name() is now used to access the full name when
   required.
3) pointers to directory names are re-used

hopefully I haven't broken anything. This will need lots of testing.
1998-03-23 03:45:02 +00:00
Andrew Tridgell
1e9f155ade *** empty log message *** 1998-01-27 17:51:37 +00:00
Andrew Tridgell
f6c347425a *** empty log message *** 1998-01-13 15:57:26 +00:00
Andrew Tridgell
3b3a2fbcf0 *** empty log message *** 1998-01-06 16:53:52 +00:00
Andrew Tridgell
82306bf6d6 *** empty log message *** 1997-12-17 11:07:17 +00:00
Andrew Tridgell
cbbe489208 handle things more grecefully when one machine supports hard links and
the other doesn't or one machine supports soft links and the other
doesn't.
1997-12-16 23:09:22 +00:00
rsync-bugs
05a6556d06 only include sys/mod.h if S_ISLNK is not already defined. This allows
things to work on aix without causing broken sgi headers files to spew
lots of complaints
1997-12-15 18:36:21 +00:00
Andrew Tridgell
fdd71e177d include sys/socket.h if possible (this should make rsync compile
cleanly on SCO)
1997-12-15 16:27:04 +00:00
Andrew Tridgell
773f2bd47f minor updates 1997-07-10 01:12:36 +00:00
Andrew Tridgell
24d95c034f move check for remsh after config.h 1996-10-01 12:04:47 +00:00
Andrew Tridgell
8bf737494f - check for sys/select.h
- check for and use lchown if possible

- fix problem with root directory on source and destination
1996-10-01 06:40:36 +00:00
Andrew Tridgell
7b8356d0bc - detect presence of remsh and use it instead of rsh
- handle directory ownership and permissions much better.

- fix bug where links caused the permissions of files to be
set incorrectly

- override the default umask in setting file permissions

- better handling -o and -D being passed to non-root users

- handle rsync to a destination of /

- fix the handling of mismatched file types at either end of the
link. For example, if the destination is a link and the source is not.
1996-10-01 04:12:30 +00:00
Andrew Tridgell
1b01b295c9 added CHAR_OFFSET 1996-07-04 13:08:07 +00:00
Andrew Tridgell
ebb0a6f618 *** empty log message *** 1996-07-04 10:16:56 +00:00
Andrew Tridgell
9e31c4824c added resend logic
added checksum on all files
1996-07-02 03:19:58 +00:00
Andrew Tridgell
c6e7fcb42b *** empty log message *** 1996-07-01 23:27:19 +00:00
Andrew Tridgell
d7b305fd91 new header tests for sunos 1996-06-30 04:42:04 +00:00
Andrew Tridgell
aae43eb38f added checksum seed 1996-06-30 04:29:46 +00:00
Andrew Tridgell
dc5ddbccac - hard links
- better sparse handling
- FERROR and FINFO
1996-06-30 03:57:22 +00:00
Andrew Tridgell
34ccb63e71 new exit/cleanup code 1996-06-28 13:55:41 +00:00