Displaying 18 results from an estimated 18 matches for "support_hard_links".
2008 May 08
1
Patch to not modify files in place unless "--inplace" option specified
...RT);
+ } else if (!unchanged_attrs(fname, file, &sx)) {
+ if (verbose > 2)
+ rprintf(FINFO, "recreating %s due to changed attributes\n", fname);
+ goto recreate_symlink;
+ }
if (itemizing)
itemize(fname, file, ndx, 0, &sx, 0, 0, NULL);
#if defined SUPPORT_HARD_LINKS && defined CAN_HARDLINK_SYMLINK
@@ -1538,7 +1547,9 @@
if (remove_source_files == 1)
goto return_with_success;
goto cleanup;
- }
+ } else
+ iflags = ITEM_REPORT_CHANGE;
+ recreate_symlink:
/* Not the right symlink (or not a symlink), so
* delete it. */
if...
2004 Feb 10
3
rsync 2.6.1cvs dumps core when preserve_hard_links and backup
I tried rsync 2.6.1cvs on my FreeBSD 4.X boxes.
It dumps core when preserve_hard_links and backup.
And SUPPORT_HARD_LINKS is true.
rsync -avH --delete --backup --backup-dir=/some/backup/dir \
srchost::dir/ dir/
The core says...
------------------------------------------------------------------------
Program terminated with signal 11, Segmentation fault.
#0 0x80536c0 in keep_backup (fname=0x808f060 "rsync...
2003 Jun 25
3
patch draft for extended attributes on linux
...edistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -422,6 +422,12 @@ static void send_file_entry(struct file_
}
#endif
+#if SUPPORT_XATTRS
+ if (opt_xattr) {
+ xalist_send(f, file->xattrs);
+ }
+#endif
+
#if SUPPORT_HARD_LINKS
if (preserve_hard_links && S_ISREG(file->mode)) {
if (remote_version < 26) {
@@ -457,7 +463,9 @@ static void send_file_entry(struct file_
}
-
+/**
+ * This matches up with send_file_entry()
+ **/
static void receive_file_entry(struct file_struct **fptr,
unsigned...
2008 Mar 19
0
[PATCH] Unsnarl missing_below/dry_run logic.
...!f_name_has_prefix(file, missing_dir))) {
- if (dry_run)
- dry_run--;
- missing_below = -1;
- } else if (!dry_run) {
- if (is_dir)
- file->flags |= FLAG_MISSING_DIR;
+ if (skip_dir && is_below(file, skip_dir)) {
+ if (is_dir)
+ file->flags |= FLAG_MISSING_DIR;
#ifdef SUPPORT_HARD_LINKS
- if (F_IS_HLINKED(file))
- handle_skipped_hlink(file, itemizing, code, f_out);
+ else if (F_IS_HLINKED(file))
+ handle_skipped_hlink(file, itemizing, code, f_out);
#endif
- return;
- }
- }
+ return;
+ } else
+ skip_dir = NULL;
if (server_filter_list.head) {
if (check_filter(&a...
2004 Feb 06
4
memory reduction
...ame_len + sum_len;
+ bp = pool_alloc(flist->file_pool, alloc_len, "receive_file_entry");
+
file = *fptr = (struct file_struct *)bp;
memset(bp, 0, min_file_struct_len);
bp += file_struct_len;
@@ -634,9 +634,9 @@ void receive_file_entry(struct file_stru
file->gid = gid;
#if SUPPORT_HARD_LINKS
- if (idev_len) {
- file->link_u.idev = (struct idev *)bp;
- bp += idev_len;
+ if (idev_len && flist->hlink_pool) {
+ file->link_u.idev = pool_talloc(flist->hlink_pool,
+ struct idev, 1, "inode_table");
}
#endif
@@ -668,15 +668,19 @@ void receive_file_entr...
2002 Jan 13
1
rsynd-2.5.1 / hlink.c patches
...t() function call is no
longer needed.
-John
wb8tyw@qsl.network
Personal Opinion Only
EAGLE> gdiff -u ref_src:hlink.c lcl_src:hlink.c_unix
--- ref_src:hlink.c Sat Jan 5 13:27:03 2002
+++ lcl_src:hlink.c_unix Sat Jan 12 19:28:00 2002
@@ -23,7 +23,8 @@
extern int verbose;
#if SUPPORT_HARD_LINKS
-static int hlink_compare(struct file_struct *f1,struct file_struct *f2)
+static int hlink_compare
+ (const struct file_struct *f1, const struct file_struct *f2)
{
if (!S_ISREG(f1->mode) && !S_ISREG(f2->mode)) return 0;
if (!S_ISREG(f1->mode)) return -1;
@@ -60,7 +61,7...
2008 Oct 09
1
DO NOT REPLY [Bug 5820] New: rsync does not replace symlink atomically
...ndx, statret, &sx,
+
ITEM_LOCAL_CHANGE|ITEM_REPORT_CHANGE, 0, NULL);
+ }
+ if (verbose)
+ rprintf(code, "%s -> %s\n", fname, sl);
+#ifdef SUPPORT_HARD_LINKS
+ if (preserve_hard_links && F_IS_HLINKED(file))
+ finish_hard_link(file, fname, ndx,
NULL, itemizing, code, -1);
+#endif
+ if (remove_source_files)
+ goto...
2003 Nov 29
1
bogus hardlinks bug?
dear rsyncists,
rsync is superb!
but did i actually find a bug?
i did:
$ rsync -vRHSPa rsync://rsync.mirror.ac.uk/updates.redhat.com/7.3/en/os/SRPMS .
into an empty local directory
the result was 140 bogus hardlinks of the same file:
-rw-rw-r-- 140 g g 6147582 2002/12/04 16:55:24 Canna-3.5b2-62.7.3.src.rpm
-rw-rw-r-- 140 g g 6147582 2002/12/04 16:55:24
2002 Jan 07
0
rsync-2.5.1 / updated syscall.c "const" patch
...name);
}
-int do_symlink(char *fname1, char *fname2)
+#if SUPPORT_LINKS
+int do_symlink(const char *fname1, const char *fname2)
{
if (dry_run) return 0;
CHECK_RO
return symlink(fname1, fname2);
}
+#endif
-#if HAVE_LINK
-int do_link(char *fname1, char *fname2)
+#if SUPPORT_HARD_LINKS
+int do_link(const char *fname1, const char *fname2)
{
if (dry_run) return 0;
CHECK_RO
@@ -58,8 +61,8 @@
return lchown(path, owner, group);
}
-#if HAVE_MKNOD
-int do_mknod(char *pathname, mode_t mode, dev_t dev)
+#ifdef HAVE_MKNOD
+int do_mknod(const char *pathname,...
2015 Nov 28
0
[PATCH] ignore-non-existing-directory: add variant of ignore-non-existing
...ore_non_existing > 0 || ignore_non_existing_dirs > 0) && statret == -1 && stat_errno == ENOENT) {
+ int actually_ignore = 0;
if (is_dir) {
if (is_dir < 0)
return;
+ actually_ignore = 1;
skip_dir = file;
file->flags |= FLAG_MISSING_DIR;
}
#ifdef SUPPORT_HARD_LINKS
- else if (F_IS_HLINKED(file))
+ else if (ignore_non_existing > 0 && F_IS_HLINKED(file)) {
+ actually_ignore = 1;
handle_skipped_hlink(file, itemizing, code, f_out);
+ }
#endif
- if (INFO_GTE(SKIP, 1)) {
- rprintf(FINFO, "not creating new %s \"%s\"\n",
-...
2016 Jan 16
0
[PATCH v2, resend] ignore-non-existing-directory: add variant of ignore-non-existing
...ore_non_existing > 0 || ignore_non_existing_dirs > 0) && statret == -1 && stat_errno == ENOENT) {
+ int actually_ignore = 0;
if (is_dir) {
if (is_dir < 0)
return;
+ actually_ignore = 1;
skip_dir = file;
file->flags |= FLAG_MISSING_DIR;
}
#ifdef SUPPORT_HARD_LINKS
- else if (F_IS_HLINKED(file))
+ else if (ignore_non_existing > 0 && F_IS_HLINKED(file)) {
+ actually_ignore = 1;
handle_skipped_hlink(file, itemizing, code, f_out);
+ }
#endif
- if (INFO_GTE(SKIP, 1)) {
- rprintf(FINFO, "not creating new %s \"%s\"\n",
-...
2015 Nov 28
0
[PATCH v2] ignore-non-existing-directory: add variant of ignore-non-existing
...ore_non_existing > 0 || ignore_non_existing_dirs > 0) && statret == -1 && stat_errno == ENOENT) {
+ int actually_ignore = 0;
if (is_dir) {
if (is_dir < 0)
return;
+ actually_ignore = 1;
skip_dir = file;
file->flags |= FLAG_MISSING_DIR;
}
#ifdef SUPPORT_HARD_LINKS
- else if (F_IS_HLINKED(file))
+ else if (ignore_non_existing > 0 && F_IS_HLINKED(file)) {
+ actually_ignore = 1;
handle_skipped_hlink(file, itemizing, code, f_out);
+ }
#endif
- if (INFO_GTE(SKIP, 1)) {
- rprintf(FINFO, "not creating new %s \"%s\"\n",
-...
2008 Feb 15
4
Revised flags patch
...extern int preserve_specials;
+extern int fileflags_ndx;
extern int uid_ndx;
extern int gid_ndx;
extern int eol_nulls;
@@ -344,6 +345,9 @@ static void send_file_entry(int f, struc
{
static time_t modtime;
static mode_t mode;
+#ifdef SUPPORT_FLAGS
+ static uint32 fileflags;
+#endif
#ifdef SUPPORT_HARD_LINKS
static int64 dev;
#endif
@@ -403,6 +407,12 @@ static void send_file_entry(int f, struc
xflags |= XMIT_SAME_MODE;
else
mode = file->mode;
+#ifdef SUPPORT_FLAGS
+ if (F_FFLAGS(file) == fileflags)
+ xflags |= XMIT_SAME_FLAGS;
+ else
+ fileflags = F_FFLAGS(file);
+#endif
if ((preser...
2004 Jan 25
2
scan for first existing hard-link file
...link_list[from]->F_INDEX = to;
+ hlink_list[from]->F_NEXT = head;
+ hlink_list[from]->flags |= FLAG_HLINK_LAST;
hlink_list[to++] = head;
} else {
free((char*)head->link_u.idev);
@@ -136,7 +137,7 @@ static void hard_link_one(char *hlink1,
void do_hard_links(void)
{
#if SUPPORT_HARD_LINKS
- struct file_struct *file;
+ struct file_struct *file, *first;
char hlink1[MAXPATHLEN];
char *hlink2;
STRUCT_STAT st1, st2;
@@ -146,10 +147,10 @@ void do_hard_links(void)
return;
for (i = 0; i < hlink_count; i++) {
- file = hlink_list[i];
- if (link_stat(f_name_to(file, hlink1),...
2004 Apr 10
0
patches for copying atimes
...,12 @@
flags |= XMIT_SAME_TIME;
else
modtime = file->modtime;
+ if (protocol_version > 28) {
+ if (file->atime == atime)
+ flags |= XMIT_SAME_ATIME;
+ else
+ atime = file->atime;
+ }
#if SUPPORT_HARD_LINKS
if (file->link_u.idev) {
@@ -439,6 +446,8 @@
write_longint(f, file->length);
if (!(flags & XMIT_SAME_TIME))
write_int(f, modtime);
+ if (protocol_version > 28 && !(flags & XMIT_SAME_ATIME))
+ write_int(f, atime);
if (!(flags & XMIT_SAME_MODE))
write_int(f...
2006 Jan 24
1
propagate atimes with rsync-2.6.6 (fwd)
...329,7 +331,7 @@
if (!file) {
write_byte(f, 0);
- modtime = 0, mode = 0;
+ modtime = 0, acctime = 0, mode = 0;
dev = 0, rdev = makedev(0, 0);
rdev_major = 0;
uid = 0, gid = 0;
@@ -379,6 +381,8 @@
else
modtime = file->modtime;
+ acctime = file->acctime;
+
#ifdef SUPPORT_HARD_LINKS
if (file->link_u.idev) {
if (file->F_DEV == dev) {
@@ -431,6 +435,8 @@
write_longint(f, file->length);
if (!(flags & XMIT_SAME_TIME))
write_int(f, modtime);
+ if (remote_protocol >= 30)
+ write_int(f, acctime);
if (!(flags & XMIT_SAME_MODE))
write_int(f, to_wir...
2004 Apr 20
1
improved atime patch
...,12 @@
flags |= XMIT_SAME_TIME;
else
modtime = file->modtime;
+ if (protocol_version > 28) {
+ if (file->atime == atime)
+ flags |= XMIT_SAME_ATIME;
+ else
+ atime = file->atime;
+ }
#if SUPPORT_HARD_LINKS
if (file->link_u.idev) {
@@ -443,6 +450,8 @@
write_longint(f, file->length);
if (!(flags & XMIT_SAME_TIME))
write_int(f, modtime);
+ if (protocol_version > 28 && !(flags & XMIT_SAME_ATIME))
+ write_int(f, atime);
if (!(flags & XMIT_SAME_MODE))
write_int(f...
2010 Jun 15
3
about rsyncing of block devices
...= lseek(fd, 0, SEEK_END);
+ if (off == (OFF_T) -1)
+ rsyserr(FERROR, errno, "failed to seek to end of %s to determine size", fname);
+ else {
+ sx.st.st_size = off;
+ }
+ close(fd);
+ }
+ }
+
if (append_mode > 0 && sx.st.st_size >= F_LENGTH(file)) {
#ifdef SUPPORT_HARD_LINKS
if (F_IS_HLINKED(file))
diff -pur rsync-3.0.7/options.c rsync-3.0.7.new/options.c
--- rsync-3.0.7/options.c 2009-12-21 22:40:41.000000000 +0000
+++ rsync-3.0.7.new/options.c 2010-06-14 10:24:49.329958121 +0100
@@ -48,6 +48,7 @@ int append_mode = 0;
int keep_dirlinks = 0;
int copy_dirlinks = 0;...