The Samba-Bugzilla – Attachment 14019 Details for
Bug 13317
rsync returns success when target filesystem is full
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Test patch to see whether fdatasync() or fsync() detects a write failure
patch.eml (text/plain), 987 bytes, created by
Dave Gordon
on 2018-03-06 19:57:55 UTC
(
hide
)
Description:
Test patch to see whether fdatasync() or fsync() detects a write failure
Filename:
MIME Type:
Creator:
Dave Gordon
Created:
2018-03-06 19:57:55 UTC
Size:
987 bytes
patch
obsolete
>From 1a10ca78f6ad5a06b138fa7bd692f799322066ee Mon Sep 17 00:00:00 2001 >From: Dave Gordon <dg32768@zoho.eu> >Date: Tue, 6 Mar 2018 19:52:48 +0000 >Subject: [PATCH] Add fdatasync() and fsync() before close of target file > >Just to see whether there's an issue with delayed write >failures on ZFS with quotas enabled. >--- > receiver.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > >diff --git a/receiver.c b/receiver.c >index d6a48f1..601e765 100644 >--- a/receiver.c >+++ b/receiver.c >@@ -847,6 +847,16 @@ int recv_files(int f_in, int f_out, char *local_name) > > if (fd1 != -1) > close(fd1); >+ if (fdatasync(fd2) < 0) { >+ rsyserr(FERROR, errno, "fdatasync failed on %s", >+ full_fname(fnametmp)); >+ exit_cleanup(RERR_FILEIO); >+ } >+ if (fsync(fd2) < 0) { >+ rsyserr(FERROR, errno, "fsync failed on %s", >+ full_fname(fnametmp)); >+ exit_cleanup(RERR_FILEIO); >+ } > if (close(fd2) < 0) { > rsyserr(FERROR, errno, "close failed on %s", > full_fname(fnametmp)); >-- >2.7.4 >
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 13317
: 14019