Displaying 10 results from an estimated 10 matches for "do_lseek".
2005 Sep 20
2
Nulls instead of data
In short:
Platform: linux with 2.4 kernel
Version: rsync 2.6.6
Command line:
rsync266 -av -W --bwlimit=1 /mnt/somedir/rsync-2.6.6.tar.gz ./
Destination: local disk
Source: file on a smbfs mounted filesystem; share is exported on a NT 4.0
workstation over a very slow and unstable link
Result: Rsync completes operation with no special message, but the
resulting file is damaged, large
2004 Apr 27
1
[PATCH] Inplace option for rsync
...rprintf(FERROR, "write failed on %s: %s\n",
+ full_fname(fname), strerror(errno));
+ exit_cleanup(RERR_FILEIO);
+ }
+ } else {
+ flush_write_file(fd);
+ if (do_lseek(fd,(OFF_T)len,SEEK_CUR) != (offset+len)) {
+ rprintf(FERROR, "lseek failed on %s: %s, %lli,
%lli, %i\n",
+ full_fname(fname), strerror(errno),
do_lseek(fd,0,SEEK_CUR), (offset+len), i);
+ exit_cleanup(RERR_FILEIO)...
2005 Aug 17
0
[Bug 3009] New: build error on sinix: off64_t unknown
...s.com
QAContact: rsync-qa@samba.org
Hello,
I tried to build version 2.6.6 on one of my Sinix machines which resulted in
the following compile error:
syscall.c:247: identifier "off64_t" is undefined
<snip file="syscall.c" line-start="244">
OFF_T do_lseek(int fd, OFF_T offset, int whence)
{
#ifdef HAVE_LSEEK64
off64_t lseek64();
return lseek64(fd, offset, whence);
#else
return lseek(fd, offset, whence);
#endif
}
</snip>
<snip file="config.log">
This file contains any messages produced by compiler...
2010 Nov 23
0
[PATCH 1/3] Add fadvise interface wrapper
...rtions(+), 0 deletions(-)
diff --git a/syscall.c b/syscall.c
index cfabc3e..9f5b1c3 100644
--- a/syscall.c
+++ b/syscall.c
@@ -28,6 +28,7 @@
#ifdef HAVE_SYS_ATTR_H
#include <sys/attr.h>
#endif
+#include <fcntl.h>
extern int dry_run;
extern int am_root;
@@ -282,3 +283,13 @@ OFF_T do_lseek(int fd, OFF_T offset, int whence)
return lseek(fd, offset, whence);
#endif
}
+
+#if _XOPEN_SOURCE >= 600
+int do_fadvise(int fd, OFF_T offset, OFF_T len, int advise)
+{
+ return posix_fadvise(fd, offset, len, advise);
+}
+#else
+#define do_fadvise()
+#endif
+
--
1.7.1
2013 Sep 14
1
Rara data corruption with --sparse
...call only completes partially.
for (l1 = 0; l1 < len && buf[l1] == 0; l1++) {}
for (l2 = 0; l2 < len-l1 && buf[len-(l2+1)] == 0; l2++) {}
sparse_seek += l1;
if (l1 == len)
return len;
if (sparse_seek)
do_lseek(f, sparse_seek, SEEK_CUR);
sparse_seek = l2;
After first calculating l1 (zero-prefix len) and l2 (zero-suffic len),
the code adds l1 to sparse_seek, seeks l1 bytes and resets sparse_seek
to l2, ready for the next call.
while ((ret = write(f, buf + l1, len - (l1+l2))) <= 0) {...
2002 Jan 07
0
rsync-2.5.1 / updated syscall.c "const" patch
...def HAVE_OFF64_T
return lstat64(fname, st);
#else
return lstat(fname, st);
@@ -158,7 +161,7 @@
int do_fstat(int fd, STRUCT_STAT *st)
{
-#if HAVE_OFF64_T
+#ifdef HAVE_OFF64_T
return fstat64(fd, st);
#else
return fstat(fd, st);
@@ -167,7 +170,7 @@
OFF_T do_lseek(int fd, OFF_T offset, int whence)
{
-#if HAVE_OFF64_T
+#ifdef HAVE_OFF64_T
off64_t lseek64();
return lseek64(fd, offset, whence);
#else
@@ -178,7 +181,7 @@
#ifdef USE_MMAP
void *do_mmap(void *start, int len, int prot, int flags, int fd, OFF_T
offset)
{
-#if HAVE_OFF64_T...
2003 Oct 18
0
Added functionality --compare-file and --compare-auto
...out);
void generate_files(int f,struct file_list *flist,char *local_name,int f_recv);
+char * findcomparename(const char* fname, char* buf);
int main(int argc, char *argv[]);
void init_hard_links(struct file_list *flist);
int check_hard_link(struct file_struct *file);
@@ -224,7 +225,6 @@
OFF_T do_lseek(int fd, OFF_T offset, int whence);
void *do_mmap(void *start, int len, int prot, int flags, int fd, OFF_T offset);
char *d_name(struct dirent *di);
-int main(int argc, char **argv);
int main (int argc, char *argv[]);
void set_compression(char *fname);
void send_token(int f,int token,struct map...
2010 Jun 15
3
about rsyncing of block devices
Hiya,
I can see it's a regular subject on this list.
I, like others wanted to use rsync to synchronise two block
devices (as it happens one lvm volume and one nbd device served
by qemu-img on a remote host from a qcow2 disk image so that I
can keep the old versions)
As I couldn't find any report of it being done successfully,
I'm just sharing my findings as it might benefit others.
2011 May 29
22
[Bug 8177] New: Problems with big sparsed files
https://bugzilla.samba.org/show_bug.cgi?id=8177
Summary: Problems with big sparsed files
Product: rsync
Version: 3.0.8
Platform: x64
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P5
Component: core
AssignedTo: wayned at samba.org
ReportedBy: joluinfante at gmail.com
2002 Aug 05
5
[patch] read-devices
...havoc if streams are involved. */
} else {
- if (map->p_fd_offset != read_start) {
+ int nread = 0;
+ if (map->p_fd_offset != read_start) { /* seek */
+ rprintf(FINFO, "#ET# seeking; p_fd_offset=%.0f read_start=%.0f\n",(double)map->p_fd_offset,(double)read_start);
if (do_lseek(map->fd,read_start,SEEK_SET) != read_start) {
rprintf(FERROR,"lseek failed in map_ptr\n");
+ /* Specifically, this will always happen if we seek in FIFO
+ * streams. That should never happen. */
exit_cleanup(RERR_FILEIO);
}
map->p_fd_offset = read_start;...