The Samba-Bugzilla – Attachment 1344 Details for
Bug 2933
regression with hardlinked devices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Make hard-linking work with symlinks and devices
hard-linking.patch (text/plain), 3.45 KB, created by
Wayne Davison
on 2005-07-31 16:20:07 UTC
(
hide
)
Description:
Make hard-linking work with symlinks and devices
Filename:
MIME Type:
Creator:
Wayne Davison
Created:
2005-07-31 16:20:07 UTC
Size:
3.45 KB
patch
obsolete
>--- generator.c 28 Jul 2005 01:46:12 -0000 1.219 >+++ generator.c 31 Jul 2005 22:41:14 -0000 >@@ -731,6 +731,11 @@ static void recv_generator(char *fname, > return; > } > >+ if (preserve_hard_links && file->link_u.links >+ && hard_link_check(file, ndx, fname, statret, &st, >+ itemizing, code, HL_CHECK_MASTER)) >+ return; >+ > if (preserve_links && S_ISLNK(file->mode)) { > #ifdef SUPPORT_LINKS > if (safe_symlinks && unsafe_symlink(file->u.link, fname)) { >@@ -761,6 +766,12 @@ static void recv_generator(char *fname, > } > set_perms(fname, file, &st, > maybe_PERMS_REPORT); >+ if (preserve_hard_links >+ && file->link_u.links) { >+ hard_link_cluster(file, ndx, >+ itemizing, >+ code); >+ } > return; > } > } >@@ -771,6 +782,10 @@ static void recv_generator(char *fname, > if (!S_ISLNK(st.st_mode)) > statret = -1; > } >+ if (preserve_hard_links && file->link_u.links >+ && hard_link_check(file, ndx, fname, -1, &st, >+ itemizing, code, HL_SKIP)) >+ return; > if (do_symlink(file->u.link,fname) != 0) { > rsyserr(FERROR, errno, "symlink %s -> \"%s\" failed", > full_fname(fname), safe_fname(file->u.link)); >@@ -789,6 +804,8 @@ static void recv_generator(char *fname, > SIVAL(numbuf, 0, ndx); > send_msg(MSG_SUCCESS, numbuf, 4); > } >+ if (preserve_hard_links && file->link_u.links) >+ hard_link_cluster(file, ndx, itemizing, code); > } > #endif > return; >@@ -800,6 +817,10 @@ static void recv_generator(char *fname, > st.st_rdev != file->u.rdev) { > if (delete_item(fname, st.st_mode, DEL_TERSE) < 0) > return; >+ if (preserve_hard_links && file->link_u.links >+ && hard_link_check(file, ndx, fname, -1, &st, >+ itemizing, code, HL_SKIP)) >+ return; > if (!IS_DEVICE(st.st_mode)) > statret = -1; > if (verbose > 2) { >@@ -820,20 +841,21 @@ static void recv_generator(char *fname, > rprintf(code, "%s\n", > safe_fname(fname)); > } >+ if (preserve_hard_links && file->link_u.links) { >+ hard_link_cluster(file, ndx, >+ itemizing, code); >+ } > } > } else { > if (itemizing) > itemize(file, ndx, statret, &st, 0, 0, NULL); > set_perms(fname, file, &st, maybe_PERMS_REPORT); >+ if (preserve_hard_links && file->link_u.links) >+ hard_link_cluster(file, ndx, itemizing, code); > } > return; > } > >- if (preserve_hard_links >- && hard_link_check(file, ndx, fname, statret, &st, >- itemizing, code, HL_CHECK_MASTER)) >- return; >- > if (!S_ISREG(file->mode)) { > if (the_file_list->count == 1) > fname = f_name(file); >@@ -1001,7 +1023,7 @@ static void recv_generator(char *fname, > } > > if (statret != 0) { >- if (preserve_hard_links >+ if (preserve_hard_links && file->link_u.links > && hard_link_check(file, ndx, fname, statret, &st, > itemizing, code, HL_SKIP)) > return; >@@ -1064,7 +1086,7 @@ prepare_to_open: > full_fname(fnamecmp)); > pretend_missing: > /* pretend the file didn't exist */ >- if (preserve_hard_links >+ if (preserve_hard_links && file->link_u.links > && hard_link_check(file, ndx, fname, statret, &st, > itemizing, code, HL_SKIP)) > return; >--- hlink.c 9 Jun 2005 21:56:11 -0000 1.53 >+++ hlink.c 31 Jul 2005 22:41:14 -0000 >@@ -173,8 +173,6 @@ int hard_link_check(struct file_struct * > { > #ifdef SUPPORT_HARD_LINKS > int head; >- if (!file->link_u.links) >- return 0; > if (skip && !(file->flags & FLAG_HLINK_EOL)) > head = hlink_list[file->F_HLINDEX] = file->F_NEXT; > else
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 2933
: 1344 |
1345