search for: hard_link_one

Displaying 4 results from an estimated 4 matches for "hard_link_one".

2012 Mar 25
1
link(2) EMLINK error behavior with --link-dest and --hard-links
..."exact copy" happens, which is more desirable than creating a copy at whatever point the hard link limit is reached and then hardlinking from that point forward -- if that's what the git head code really does.) Glancing over the code, it seems to me the way to do this is to have the hard_link_one() return value indicate when failure is EMLINK. This can then be tested for during the execution of finish_hard_link(). When link exhaustion is detected in finish_hard_link(), && link_dest, then report an error but also copy the source file and re-run finish_hard_link() to undo/fix-up the...
2005 Apr 23
1
--link-dest / --hard-links problem
I've looked around for a bug report on this problem and haven't seen one, so I apologize if this has already been discussed. I have a homegrown script which uses rsync to maintain daily backups of roughly twenty Redhat Linux systems running RH 7.2, 7.3, AS 3, and AS 4. As there are files with multiple links on the source systems, it is necessary to call rsync using the -H (--hard-links)
2008 Feb 15
4
Revised flags patch
...(uid_ndx) F_OWNER(file) = st.st_uid; if (gid_ndx) diff -brpu rsync-3.0.0pre9/hlink.c rsync-3.0.0pre9-flags/hlink.c --- rsync-3.0.0pre9/hlink.c Thu Feb 7 01:06:33 2008 +++ rsync-3.0.0pre9-flags/hlink.c Fri Feb 15 19:35:16 2008 @@ -389,6 +389,12 @@ int hard_link_check(struct file_struct * int hard_link_one(struct file_struct *file, const char *fname, const char *oldname, int terse) { +#if SUPPORT_FLAGS + STRUCT_STAT st2; + + link_stat(oldname, &st2, 0); + make_mutable(oldname, st2.st_mode, st2.st_flags); +#endif if (do_link(oldname, fname) < 0) { enum logcode code; if (terse) {...
2004 Jan 25
2
scan for first existing hard-link file
...gt;F_HEAD = head; - hlink_list[from]->F_NEXT = NULL; + hlink_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++) {...