OpenAFS Master Repository branch, openafs-stable-1_8_x, updated. openafs-stable-1_8_13_2-123-ga31b416

Gerrit Code Review gerrit@openafs.org
Wed, 20 Aug 2025 12:31:11 -0400


The following commit has been merged in the openafs-stable-1_8_x branch:
commit a31b416054f7e5de2188ecfb1e59fe7223921197
Author: Cheyenne Wills <cwills@sinenomine.net>
Date:   Thu Jul 31 11:27:53 2025 -0600

    linux: convert aops->writepage to writepages
    
    As part of the transition from pages to folios, the Linux 6.16 commit:
    'fs: Remove aops->writepage' (6b0dfabb35550)
    
    removes the writepage member from the address space operations and now
    requires the writepages member.
    
    An earlier Linux commit converted the underlying support of writepages
    to use folios. The Linux 6.3 commit:
    'fs: convert writepage_t callback to pass a folio' (d585bdbeb79aa)
    
    requires the callback function passed to write_cache_pages() to expect a
    folio instead of a page.
    
    Since the aops->writepages member predates Linux 2.6.18, testing for
    its presence is not an accurate check. Instead, we check to see if the
    write_cache_pages() function takes a callback that uses folios (the
    d585bdbeb79aa commit).
    
    To implement this, afs_linux_write_pages() is added for
    afs_file_aops.writepages. This function calls write_cache_pages(), which
    uses the new afs_linux_writefolio_cb() callback to process the folios.
    The callback's implementation is based on the logic from
    afs_linux_writepage() but is updated to operate directly on folios. This
    ensures that multi-page folios are handled correctly, rather than only
    processing the head page of a folio.
    
    Note, this change is retroactive back to linux 6.3.
    
    Note, According to the Linux documentation for write_cache_pages, the
    return value from the writepages should either be 0, or a negative error
    code.  However the existing writepage code can return a positive value
    (the residual for a partial write). For this commit, the existing
    behavior of returning a residual is preserved.
    
    Reviewed-on: https://gerrit.openafs.org/16437
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>
    (cherry picked from commit b2c039541d66e0760e7afe8b60539a00778fbfe2)
    
    Change-Id: I98d9e4f49fb881a3c076f2caad54649750aca7a6
    Reviewed-on: https://gerrit.openafs.org/16502
    Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
    Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>
    Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>

 src/afs/LINUX/osi_vnodeops.c    | 102 ++++++++++++++++++++++++++++++++++++++--
 src/cf/linux-kernel-assorted.m4 |   1 +
 src/cf/linux-test4.m4           |  22 ++++++++-
 3 files changed, 120 insertions(+), 5 deletions(-)

-- 
OpenAFS Master Repository