From: Andrew Deason Date: Wed, 7 Mar 2018 17:32:43 +0000 (-0600) Subject: ubik: Log sync site for SDISK_SendFile USYNC error X-Git-Tag: upstream/1.8.1_pre2^2~83 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=72b2da46bb0f997d70cca3cca7abc4a135d3d500;p=packages%2Fo%2Fopenafs.git ubik: Log sync site for SDISK_SendFile USYNC error In SDISK_SendFile, we return a USYNC error if the caller is not the sync site. Say who the sync site is when we do this, to possibly help post-mortem debugging. Reviewed-on: https://gerrit.openafs.org/12943 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Benjamin Kaduk (cherry picked from commit c44f6f7a8052bdd1fb021e07bb6ae142b61e6b5b) Change-Id: I398780c98ee5eade75e06a42d54637c169bc250a Reviewed-on: https://gerrit.openafs.org/12948 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk --- diff --git a/src/ubik/remote.c b/src/ubik/remote.c index 9f88aaff0..2fca3b15b 100644 --- a/src/ubik/remote.c +++ b/src/ubik/remote.c @@ -482,9 +482,11 @@ SDISK_SendFile(struct rx_call *rxcall, afs_int32 file, otherHost = ubikGetPrimaryInterfaceAddr(rx_HostOf(tpeer)); if (offset && offset != otherHost) { /* we *know* this is the wrong guy */ + char sync_hoststr[16]; ubik_print - ("Ubik: Refusing synchronization with server %s since it is not the sync-site.\n", - afs_inet_ntoa_r(otherHost, hoststr)); + ("Ubik: Refusing synchronization with server %s since it is not the sync-site (%s).\n", + afs_inet_ntoa_r(otherHost, hoststr), + afs_inet_ntoa_r(offset, sync_hoststr)); return USYNC; }