OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_1-463-g4baeaf1

Gerrit Code Review gerrit@openafs.org
Thu, 8 Aug 2024 02:40:17 -0400


The following commit has been merged in the master branch:
commit 4baeaf1d9fd630653e047f043feb3a2eb6d7d3c2
Author: Andrew Deason <adeason@sinenomine.net>
Date:   Fri Sep 29 16:57:22 2023 -0500

    fs: Report errors more consistently from GetCell()
    
    Errors from GetCell() are reported a bit oddly in its three callers:
    
    - In WhichCellCmd() (and GetFidCmd() before change
      Idd4727304061e1ec4eeddd98bd9eaab5de96e2b6), we print an odd "no such
      cell" error for ENOENT, and a more normal message for all other
      errors.
    
    - In BadName() (and GetFidCmd() after change
      Idd4727304061e1ec4eeddd98bd9eaab5de96e2b6), we don't print an error
      at all, sometimes making it not obvious that an error has occurred.
      (BadName() is called from 'fs cleanacl'.)
    
    The ENOENT message can be confusing to users, since ENOENT is the
    error code we get if the given path doesn't exist. This is easy to see
    with 'fs whichcell':
    
        $ fs whichcell notexist
        fs: no such cell as 'notexist'
    
    The VIOC_FILE_CELL_NAME pioctl also never returns ENOENT itself, so
    this only happens if the given file doesn't exist. This behavior goes
    back to OpenAFS 1.0.
    
    To improve this, change GetCell() to report errors itself. So now
    errors are reported from it consistently, and are printed for all
    callers. For example:
    
        $ fs whichcell notexist
        fs: Failed to get cell for 'notexist'
        fs: File 'notexist' doesn't exist
    
    The message is a little redundant, but this lets us use the existing
    error reporting from Die() while still providing context for what is
    failing, since it may not be obvious for 'fs cleanacl' or 'fs getfid'.
    
    Change-Id: Ib4a84288a9c2d94b2b0d3c4c360fc5c014e98b30
    Reviewed-on: https://gerrit.openafs.org/15586
    Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
    Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
    Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>

 src/venus/fs.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

-- 
OpenAFS Master Repository