From 157a274b8b1f6c39751d876354e1d8453d66b864 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Wed, 21 Oct 2009 22:16:38 -0500 Subject: [PATCH] Break origin's callback for RXAFS_Rename target When we RXAFS_Rename something, the status of the renamed FID can sometimes change, and thus we break callbacks on it. Currently, however, we do not break the callback for the originating client, even though the status of the target changes and we do not return an AFSFetchStatus to the caller. Since the callback is not always broken for the target, it may not be immediately obvious to client implementations to implicitly break the target's callback. Since we do not have an explicit protocol specification saying that the callback is implicitly broken, break the callback for the origin client as well, to be safe. Change-Id: I97d90518a240f852013d1d63fccef663c8b0e998 Reviewed-on: http://gerrit.openafs.org/709 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/viced/afsfileprocs.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index 7352a93e3..97e41309f 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -4241,7 +4241,13 @@ SAFSS_Rename(struct rx_call *acall, struct AFSFid *OldDirFid, char *OldName, } if (updatefile) { /* if a dir moved, .. changed */ - BreakCallBack(client->host, &fileFid, 0); + /* we do not give an AFSFetchStatus structure back to the + * originating client, and the file's status has changed, so be + * sure to send a callback break. In theory the client knows + * enough to know that the callback could be broken implicitly, + * but that may not be clear, and some client implementations + * may not know to. */ + BreakCallBack(client->host, &fileFid, 1); } if (newfileptr) { /* Note: it is not necessary to break the callback */ -- 2.39.5