OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_2-525-gd3c94f5

Gerrit Code Review gerrit@openafs.org
Tue, 30 Jun 2026 17:03:34 -0400


The following commit has been merged in the master branch:
commit d3c94f5642af70dc6cf8951b7fc7fd481abd9eb3
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date:   Tue Jun 30 19:48:10 2026 +0000

    volser: Fix initialization of RW clone volumes
    
    Historically, OpenAFS only supported cloning read-write volumes.
    Subsequent changes generalized the cloning code to allow any volume
    type to be cloned into any other volume type:
    
    4e1a65ba7e remove check for disallowing clones of backup or ro volumes
    83c41c6941 allow cloning of any volume to any volume with same parent ID
    f1de04f3b3 volser: allow cloning non-rw volumes
    4b93c42513 vol: allow clones of readonly volumes
    
    However, RW clones are not initialized correctly. The cloned volume
    retains the source volume type instead of being marked RW, the cloneID
    is left unset, and directory vnodes are not marked as cloned, preventing
    copy-on-write from functioning properly.
    
    Fix these issues by properly initializing RW clones. Also update the
    creationDate and copyDate timestamps to match the behavior of the
    existing in-place conversion path, and bump the uniquifier using the
    same logic. Although the previous values were not strictly incorrect,
    using the same timestamp handling helps avoid unnecessary future full
    releases, while bumping the uniquifier tries to avoid conflicts with
    file copies that may still exist from a previous incarnation of the RW
    volume.
    
    Also, only update the 'filecount' and 'diskused' header fields in the
    source volume when it is read-write. These fields are recomputed as part
    of cloning, but updating them in a read-only source does not appear to
    be intentional, since read-only volume headers are normally updated only
    during a volume release.
    
    While here, also zero out the cloned volume name before copying the
    provided name into it. This is a small cleanup for consistency that
    avoids leaving leftover characters (such as '.readonly') after the null
    terminator, although it does not fix any functional issue because
    characters beyond the null terminator are ignored.
    
    Change-Id: I45eebf7ccc6b3774791941ff5d97dc36932727b2
    Reviewed-on: https://gerrit.openafs.org/16847
    Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
    Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>
    Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>

 src/vol/clone.c          | 41 +++++++++++++++++++++++++++------------
 src/vol/vol_prototypes.h |  2 +-
 src/volser/volprocs.c    | 50 +++++++++++++++++++++++++++++++++++++++++-------
 3 files changed, 73 insertions(+), 20 deletions(-)

-- 
OpenAFS Master Repository