OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_1-539-g22e8fa8

Gerrit Code Review gerrit@openafs.org
Wed, 9 Oct 2024 21:14:44 -0400


The following commit has been merged in the master branch:
commit 22e8fa88d1e1ea92bd89b7325c7cd68516f63295
Author: Michael Meffie <mmeffie@sinenomine.net>
Date:   Fri Jul 15 14:33:38 2022 -0400

    vos: Check end-of-dump magic before deleting volume
    
    When restoring a volume with a regular file, vos restore verifies the dump
    file is terminated with the end-of-dump magic number before sending the
    dump to the volume server.  Unfortunately, this check is done after the
    target volume is deleted (which happens when doing a full restore of a
    volume), in which case the target volume is unnecessarily removed.
    
    Currently, UV_RestoreVolume2() invokes the WriteData() function as
    callback to transmit the dump stream to the volume server. WriteData()
    opens the usd file handle, performs the end-of-dump magic check (if the
    file is seekable), sends the data using the SendFile() helper function,
    then closes the dump file handle.
    
    Instead, open and check the dump file magic before calling
    UV_RestoreVolume2().  Pass the usd file handle and a pointer to the
    SendFile() function to UV_RestoreVolume2() to send the dump data to the
    volume server.
    
    Move the code to perform the dump file magic check to the new
    CheckDumpFile() helper function and remove the now unneeded WriteData()
    function.
    
    Change-Id: Ia04f378540b40c2e6360aa120592fbd793c33cae
    Reviewed-on: https://gerrit.openafs.org/14710
    Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>

 src/volser/vos.c | 53 +++++++++++++++++++++++++----------------------------
 1 file changed, 25 insertions(+), 28 deletions(-)

-- 
OpenAFS Master Repository