The following commit has been merged in the openafs-stable-1_8_x branch:
commit 9947625a1d67b4ffdc0582e9081000e34be2b46b
Author: Michael Meffie <[email protected]>
Date:   Fri May 15 12:01:44 2020 -0400

    vos: avoid CreateVolume when restoring over an existing volume
    
    Currently, the UV_RestoreVolume2 function always attempts to create a
    new volume, even when doing a incremental restore over an existing
    volume.  When the volume already exists, the volume creation operation
    fails on the volume server with a VVOLEXISTS error. The client will then
    attempt to obtain a transaction on the existing volume. If a transaction
    is obtained, the incremental restore operation will proceed. If a full
    restore is being done, the existing volume is removed and a new empty
    volume is created.
    
    Unfortunately, the failed volume creation is logged to by the volume
    server, and so litters the log file with:
    
        Volser: CreateVolume: Unable to create the volume; aborted, error code 
104
    
    To avoid polluting the volume server log with these messages, reverse
    the logic in UV_RestoreVolume2. Assume the volume already exists and try
    to get the transaction first when doing an incremental restore. Create a
    new volume if the transaction cannot be obtained because the volume is
    not present.  When doing a full restore, remove the existing volume, if
    one exists, and then create a new empty volume.
    
    Reviewed-on: https://gerrit.openafs.org/14208
    Tested-by: BuildBot <[email protected]>
    Reviewed-by: Marcio Brito Barbosa <[email protected]>
    Tested-by: Marcio Brito Barbosa <[email protected]>
    Reviewed-by: Andrew Deason <[email protected]>
    Reviewed-by: Benjamin Kaduk <[email protected]>
    (cherry picked from commit f5051b87a56b3a4f7fd7188cbd16a663eee8abbf)
    
    Change-Id: I422b81e0c800ff655ac8851b2872f4d7160d79a8
    Reviewed-on: https://gerrit.openafs.org/14326
    Tested-by: BuildBot <[email protected]>
    Reviewed-by: Cheyenne Wills <[email protected]>
    Reviewed-by: Michael Meffie <[email protected]>
    Reviewed-by: Stephan Wiesand <[email protected]>

 src/volser/vsprocs.c |   59 ++++++++++++++++++++++++-------------------------
 1 files changed, 29 insertions(+), 30 deletions(-)

-- 
OpenAFS Master Repository
_______________________________________________
OpenAFS-cvs mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-cvs

Reply via email to