search for: sparse_files

Displaying 20 results from an estimated 25 matches for "sparse_files".

2010 Apr 08
3
DO NOT REPLY [Bug 7337] New: sparse files not equally sparse on destination
https://bugzilla.samba.org/show_bug.cgi?id=7337 Summary: sparse files not equally sparse on destination Product: rsync Version: 3.0.7 Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P3 Component: core AssignedTo: wayned at samba.org ReportedBy: brian at
2008 Mar 23
1
[PATCH] allow to change the block size used to handle sparse files
...size used to handle sparse files. fileio.c | 3 ++- options.c | 9 +++++++++ rsync.yo | 10 ++++++++++ 3 files changed, 21 insertions(+), 1 deletions(-) diff --git a/fileio.c b/fileio.c index f086494..39cae92 100644 --- a/fileio.c +++ b/fileio.c @@ -26,6 +26,7 @@ #endif extern int sparse_files; +extern long sparse_files_block_size; static char last_byte; static size_t sparse_seek = 0; @@ -115,7 +116,7 @@ int write_file(int f,char *buf,size_t len) while (len > 0) { int r1; if (sparse_files > 0) { - int len1 = MIN(len, SPARSE_WRITE_SIZE); + int len1 = MIN(len, (size_t...
2003 Apr 27
4
Bogus rsync "Success" message when out of disk space
...-----------------------------------8<------------------------------------- --- fileio.c.orig Fri Jan 25 15:07:34 2002 +++ fileio.c Sat Apr 26 12:16:25 2003 @@ -69,25 +69,28 @@ return len; } int write_file(int f,char *buf,size_t len) { int ret = 0; - if (!sparse_files) { - return write(f,buf,len); - } - while (len>0) { - int len1 = MIN(len, SPARSE_WRITE_SIZE); - int r1 = write_sparse(f, buf, len1); + int r1; + if (sparse_files) { + int len1 = MIN(len, SPA...
2024 Mar 18
0
[PATCH] add option to skip files based on age/mtime
...t;max-age", 0, POPT_ARG_INT, &max_age, 0, 0, 0 }, + {"min-age", 0, POPT_ARG_INT, &min_age, 0, 0, 0 }, {"max-alloc", 0, POPT_ARG_STRING, &max_alloc_arg, 0, 0, 0 }, {"sparse", 'S', POPT_ARG_VAL, &sparse_files, 1, 0, 0 }, {"no-sparse", 0, POPT_ARG_VAL, &sparse_files, 0, 0, 0 }, @@ -2815,6 +2819,16 @@ void server_options(char **args, int *argc_p) args[ac++] = safe_arg("--min-size", min_size_arg); if (max_size >= 0) args[ac++] = safe_arg("--max-s...
2009 Jul 28
2
[PATCH 9-10/10] Quota support for disabling sparse feature
Hi, I'm sending a patch for proper quota support when disabling sparse feature. The second patch fixes a minor problem in tunefs.ocfs2 when disabling the sparse feature. In a few days I plan to resend the whole "quota support" series with all the changes people request included... Honza
2020 Jan 15
4
[semi-OT] C7 Possible bug but I can't determine what tool has the problem
Hi all, I'm writing a script that uses rsync to sync 2 dirs on C7. I noticed a strange behaviour. I have 2 dir: src and dest. In src dir I generate a testfile with "dd if=/dev/zero of=testfile bs=1M count=100" and when I run "du -h testfile" I get the correct result. Then I sync src/ to dest/ using "rsync -avS? src/ dest/", all ok but when I run "du -h
2020 Jan 15
0
[semi-OT] C7 Possible bug but I can't determine what tool has the problem
...; (--sparse) from rsync command problem does not occour. > In another test, thinking about a problem on 0ed file, I tried file > generation using /dev/urandom then /dev/zero and running rsync -avS the > problem is disappeared. > https://wiki.archlinux.org/index.php/Sparse_file#Creating_sparse_files In short, rsync is being told to create sparse files with the -S flag, so it does. Could you share what you did with the urandom then zero test you mentioned? I'm curious what exact sequence of commands you used.
2002 Jun 21
1
small security-related rsync extension
...uot;, 's', POPT_ARG_NONE, &priv_backups}, X+#endif X {"backup", 'b', POPT_ARG_NONE, &make_backups}, X {"dry-run", 'n', POPT_ARG_NONE, &dry_run}, X {"sparse", 'S', POPT_ARG_NONE, &sparse_files}, SHAR_EOF $TOUCH -am 06210941102 options-priv-backups && chmod 0644 options-priv-backups || echo "restore of options-priv-backups failed" set `wc -c options-priv-backups`;Wc_c=$1 if test "$Wc_c" != "1339"; then echo original size 1339, current size $Wc_c fi e...
2019 Jun 26
2
Allow "--in-place" as an alternative option name for "--inplace"
...t;--in-place" as an alternative option name for "--inplace". diff --git a/options.c b/options.c index e5b0cb68..7ff0c51d 100644 --- a/options.c +++ b/options.c @@ -926,6 +926,7 @@ static struct poptOption long_options[] = { {"no-S", 0, POPT_ARG_VAL, &sparse_files, 0, 0, 0 }, {"preallocate", 0, POPT_ARG_NONE, &preallocate_files, 0, 0, 0}, {"inplace", 0, POPT_ARG_VAL, &inplace, 1, 0, 0 }, + {"in-place", 0, POPT_ARG_VAL, &inplace, 1, 0, 0 }, {"no-inplace", 0,...
2010 Feb 12
1
[RFC] add support for fallocate()
...UN([ #include <sys/types.h> diff --git a/receiver.c b/receiver.c index 6688dda..0fa8782 100644 --- a/receiver.c +++ b/receiver.c @@ -774,7 +774,14 @@ int recv_files(int f_in, int f_out, char *local_name) send_msg_int(MSG_NO_SEND, ndx); continue; } - +#ifdef HAVE_FALLOCATE + if (!sparse_files) + /* + * If this fails then either the filesystem does not + * support this feature or we run out of disk space. + */ + do_fallocate(fd2, FALLOC_FL_KEEP_SIZE, 0, F_LENGTH(file)); +#endif /* log the transfer */ if (log_before_transfer) log_item(FCLIENT, file, iflags, NULL); d...
2004 Apr 27
1
rsync-2.6.1 close() fixes
...b', POPT_ARG_NONE, &make_backups, 0, 0, 0 }, + {"fsync", 'f', POPT_ARG_NONE, &do_fsync, 0, 0, 0 }, {"dry-run", 'n', POPT_ARG_NONE, &dry_run, 0, 0, 0 }, {"sparse", 'S', POPT_ARG_NONE, &sparse_files, 0, 0, 0 }, {"cvs-exclude", 'C', POPT_ARG_NONE, &cvs_exclude, 0, 0, 0 }, @@ -798,6 +801,8 @@ void server_options(char **args,int *arg /* the -q option is intentionally left out */ if (make_backups) argstr[x++] = 'b'; + if (do_fsync) + argstr[x++] = ...
2004 Oct 05
0
new option implemented: --delete-mdays
....c Thu Sep 23 19:39:05 2004 *************** *** 52,62 **** int cvs_exclude = 0; int dry_run = 0; int local_server = 0; int ignore_times = 0; int delete_mode = 0; - int delete_mdays = -1; int delete_excluded = 0; int one_file_system = 0; int protocol_version = PROTOCOL_VERSION; int sparse_files = 0; int do_compression = 0; --- 52,61 ---- *************** *** 263,273 **** rprintf(F," -e, --rsh=COMMAND specify the remote shell\n"); rprintf(F," --rsync-path=PATH specify path to rsync on the remote machine\n"); rprintf(F," --existi...
2020 Jan 15
2
[semi-OT] C7 Possible bug but I can't determine what tool has the problem
...ync command problem does not occour. >> In another test, thinking about a problem on 0ed file, I tried file >> generation using /dev/urandom then /dev/zero and running rsync -avS the >> problem is disappeared. >> > https://wiki.archlinux.org/index.php/Sparse_file#Creating_sparse_files > > In short, rsync is being told to create sparse files with the -S flag, so > it does. Could you share what you did with the urandom then zero test you > mentioned? I'm curious what exact sequence of commands you used. > _______________________________________________ > Cen...
2003 Jan 14
3
.rsync-/.rsync+ patch and --link-dest example
...\n"); rprintf(F," --delete delete files that don't exist on the sending side\n"); @@ -324,6 +326,7 @@ {"dry-run", 'n', POPT_ARG_NONE, &dry_run , 0, 0, 0 }, {"sparse", 'S', POPT_ARG_NONE, &sparse_files , 0, 0, 0 }, {"cvs-exclude", 'C', POPT_ARG_NONE, &cvs_exclude , 0, 0, 0 }, + {"rsync-exclude", 'C', POPT_ARG_NONE, &rsync_exclude , 0, 0, 0 }, {"update", 'u', POPT_ARG_NONE, &update_only , 0, 0, 0 }, {&...
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 Aug 02
4
reducing memmoves
...=================================================================== RCS file: /cvsroot/rsync/fileio.c,v retrieving revision 1.15 diff -u -r1.15 fileio.c --- fileio.c 20 Jul 2004 21:35:52 -0000 1.15 +++ fileio.c 2 Aug 2004 02:31:02 -0000 @@ -23,6 +23,7 @@ #include "rsync.h" extern int sparse_files; +int total_bytes_memmoved=0; static char last_byte; static int last_sparse; @@ -182,8 +183,7 @@ /* nope, we are going to have to do a read. Work out our desired window */ if (offset > 2*CHUNK_SIZE) { - window_start = offset - 2*CHUNK_SIZE; - window_start &= ~((OFF_T)(CHUNK_SIZE-...
2007 Nov 16
8
[PATCH 0/6] Add online resize for ocfs2-tools,take 1
Add online resize in tunefs.ocfs2 so that user can increase the volume when it is mounted.
2003 Feb 16
1
rsync-exclude.patch.
...\n"); rprintf(F," --delete delete files that don't exist on the sending side\n"); @@ -320,6 +321,7 @@ {"dry-run", 'n', POPT_ARG_NONE, &dry_run , 0, 0, 0 }, {"sparse", 'S', POPT_ARG_NONE, &sparse_files , 0, 0, 0 }, {"cvs-exclude", 'C', POPT_ARG_NONE, &cvs_exclude , 0, 0, 0 }, + {"rsync-exclude", 0, POPT_ARG_STRING, &rsync_exclude , 0, 0, 0 }, {"update", 'u', POPT_ARG_NONE, &update_only , 0, 0, 0 }, {"lin...
2002 Dec 09
2
Rsync performance increase through buffering
...ry the patch at your own risk... Craig ########################################################################### diff -bur rsync/fileio.c rsync-craig/fileio.c --- rsync/fileio.c Fri Jan 25 15:07:34 2002 +++ rsync-craig/fileio.c Sat Dec 7 22:21:10 2002 @@ -76,7 +76,35 @@ int ret = 0; if (!sparse_files) { - return write(f,buf,len); + static char *writeBuf; + static size_t writeBufSize; + static size_t writeBufCnt; + + if ( !writeBuf ) { + writeBufSize = MAX_MAP_SIZE; + writeBufCnt = 0; + writeBuf = (char*)malloc(MAX_MAP_SIZE); + if (!writeBuf) out_of_memory("write_f...
2020 Feb 06
0
[PATCH] Add support for zstd compression
...--- a/options.c +++ b/options.c @@ -23,6 +23,9 @@ #include "itypes.h" #include <popt.h> #include <zlib.h> +#ifdef HAVE_LIBZSTD +#include <zstd.h> +#endif extern int module_id; extern int local_server; @@ -77,6 +80,7 @@ int protocol_version = PROTOCOL_VERSION; int sparse_files = 0; int preallocate_files = 0; int do_compression = 0; +int do_compression_zstd = 0; int def_compress_level = NOT_SPECIFIED; int am_root = 0; /* 0 = normal, 1 = root, 2 = --super, -1 = --fake-super */ int am_server = 0; @@ -764,6 +768,9 @@ void usage(enum logcode F) rprintf(F," --...