Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zfs-2.1.13 patchset #15268

Merged
merged 38 commits into from
Sep 27, 2023
Merged

Commits on Jun 9, 2023

  1. zfs-dkms rpm: simplify scriptlets, fix uninstall

    Two problems led to unexpected behaviour of the scriptlets:
    
    1) Newer DKMS versions change the formatting of "dkms status":
    
       (old) zfs, 2.1.2, 5.14.10-300.fc35.x86_64, x86_64: installed
       (new) zfs/2.1.2, 5.14.10-300.fc35.x86_64, x86_64: installed
    
       Which broke a conditional determining whether to uninstall.
    
    2) zfs_config.h not packaged properly, but was attempted to be read
       in the %preun scriptlet:
    
       CONFIG_H="/var/lib/dkms/zfs/2.1.2/*/*/zfs_config.h"
    
       Which broke the uninstallation of the module, which left behind a
       dangling symlink, which broke DKMS entirely with this error:
    
         Error! Could not locate dkms.conf file.
         File: /var/lib/dkms/zfs/2.1.1/source/dkms.conf does not exist.
    
    This change attempts to simplify life by:
    
    *  Avoiding parsing anything (less prone to future breakage)
    *  Uses %posttrans instead of %post for module installation, because
       %post happens before %preun, while %posttrans happens afterwards
    *  Unconditionally reinstall module on upgrade, which is less
       efficient but the trade-off is that it's more reliable
    
    Alternative approaches could involve fixing the existing parsing bugs
    or improving the logic, but this comes at the cost of complexity and
    possible future bugs.
    
    Reviewed-by: Tony Hutter <[email protected]>
    Reviewed-by: Brian Behlendorf <[email protected]>
    Signed-off-by: Jeremy Visser <[email protected]>
    Closes openzfs#10463
    Closes openzfs#13182
    jeremyvisser authored and behlendorf committed Jun 9, 2023
    Configuration menu
    Copy the full SHA
    c5bbd80 View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2023

  1. tests: zts-report: issue numbers are numbers

    Reviewed-by: Brian Behlendorf <[email protected]>
    Reviewed-by: John Kennedy <[email protected]>
    Reviewed-by: Ryan Moeller <[email protected]>
    Signed-off-by: Ahelenia Ziemiańska <[email protected]>
    Closes openzfs#13259
    nabijaczleweli authored and behlendorf committed Jun 13, 2023
    Configuration menu
    Copy the full SHA
    6af79c9 View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2023

  1. contrib/bash_completion.d: fix error spew from __zfs_match_snapshot()

    Given:
      /sbin/zfs list filling/a-zvol<TAB> -o space,refratio
    The rest of the cmdline gets vored by:
      /sbin/zfs list filling/a-zvolcannot open 'filling/a-zvol':
      operation not applicable to datasets of this type
    
    With -x (fragment):
      + COMPREPLY=($(compgen -W "$(__zfs_match_snapshot)" -- "$cur"))
      +++ __zfs_match_snapshot
      +++ local base_dataset=filling/dziadtop-nowe-duchy
      +++ [[ filling/dziadtop-nowe-duchy != filling/dziadtop-nowe-duchy ]]
      +++ [[ filling/dziadtop-nowe-duchy != '' ]]
      +++ __zfs_list_datasets filling/dziadtop-nowe-duchy
      +++ /sbin/zfs list -H -o name -s name -t filesystem
                         -r filling/dziadtop-nowe-duchy
      +++ tail -n +2
      cannot open 'filling/dziadtop-nowe-duchy':
      operation not applicable to datasets of this type
      +++ echo filling/dziadtop-nowe-duchy
      +++ echo filling/dziadtop-nowe-duchy@
      ++ compgen -W 'filling/dziadtop-nowe-duchy
    
    This properly completes with:
      $ /sbin/zfs list filling/a-zvol<TAB> -o space,refratio
      filling/a-zvol   filling/a-zvol@
      $ /sbin/zfs list filling/a-zvol<cursor> -o space,refratio
    
    Reviewed-by: Brian Behlendorf <[email protected]>
    Signed-off-by: Ahelenia Ziemiańska <[email protected]>
    Backport-of: 5ece420
    Closes openzfs#12820
    nabijaczleweli authored and behlendorf committed Jun 18, 2023
    Configuration menu
    Copy the full SHA
    f9a2d94 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2023

  1. Fix memory leak in zil_parse().

    482da24 missed arc_buf_destroy() calls on log parse errors, possibly
    leaking up to 128KB of memory per dataset during ZIL replay.
    
    Signed-off-by:	Alexander Motin <[email protected]>
    Sponsored by:	iXsystems, Inc.
    amotin authored and behlendorf committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    cb549c7 View commit details
    Browse the repository at this point in the history
  2. Remove duplicate code in l2arc_evict()

    l2arc_evict() performs the adjustment of the size of buffers to be
    written on L2ARC unnecessarily. l2arc_write_size() is called right
    before l2arc_evict() and performs those adjustments.
    
    Reviewed-by: Brian Behlendorf <[email protected]>
    Reviewed-by: Brian Atkinson <[email protected]>
    Signed-off-by: George Amanakis <[email protected]>
    Closes openzfs#14828
    gamanakis authored and behlendorf committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    d91778e View commit details
    Browse the repository at this point in the history
  3. Fix the L2ARC write size calculating logic

    l2arc_write_size() should return the write size after adjusting for trim
    and overhead of the L2ARC log blocks. Also take into account the
    allocated size of log blocks when deciding when to stop writing buffers
    to L2ARC.
    
    Reviewed-by: Brian Behlendorf <[email protected]>
    Signed-off-by: George Amanakis <[email protected]>
    Closes openzfs#14939
    gamanakis authored and behlendorf committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    425f789 View commit details
    Browse the repository at this point in the history
  4. Fix the L2ARC write size calculating logic (2)

    While commit bcd5321 adjusts the write size based on the size of the log
    block, this happens after comparing the unadjusted write size to the
    evicted (target) size.
    
    In this case l2ad_hand will exceed l2ad_evict and violate an assertion
    at the end of l2arc_write_buffers().
    
    Fix this by adding the max log block size to the allocated size of the
    buffer to be committed before comparing the result to the target
    size.
    
    Also reset the l2arc_trim_ahead ZFS module variable when the adjusted
    write size exceeds the size of the L2ARC device.
    
    Reviewed-by: Brian Behlendorf <[email protected]>
    Signed-off-by: George Amanakis <[email protected]>
    Closes openzfs#14936
    Closes openzfs#14954
    gamanakis authored and behlendorf committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    c12b582 View commit details
    Browse the repository at this point in the history
  5. Store the L2ARC device ashift in the vdev label

    If this is not done, and the pool has an ashift other than the default
    (at the moment 9) then the following happens:
    
    1) vdev_alloc() assigns the ashift of the pool to L2ARC device, but
       upon export it is not stored anywhere
    2) at the first import, vdev_open() sees an vdev_ashift() of 0 and
       assigns the logical_ashift, which is 9
    3) reading the contents of L2ARC, including the header fails
    4) L2ARC buffers are not restored in ARC.
    
    Reviewed-by: Brian Behlendorf <[email protected]>
    Signed-off-by: George Amanakis <[email protected]>
    Closes openzfs#14313 
    Closes openzfs#14963
    gamanakis authored and behlendorf committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    f28cd34 View commit details
    Browse the repository at this point in the history
  6. Shorten arcstat_quiescence sleep time

    With the latest L2ARC fixes, 2 seconds is too long to wait for
    quiescence of arcstats like l2_size. Shorten this interval to avoid
    having the persistent L2ARC tests in ZTS prematurely terminated.
    
    Signed-off-by: George Amanakis <[email protected]>
    gamanakis authored and behlendorf committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    ef2156c View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2023

  1. Fix remount when setting multiple properties.

    The previous code was checking zfs_is_namespace_prop() only for the
    last property on the list.  If one was not "namespace", then remount
    wasn't called.  To fix that move zfs_is_namespace_prop() inside the
    loop and remount if at least one of properties was "namespace".
    
    Reviewed-by: Umer Saleem <[email protected]>
    Reviewed-by: Ameer Hamza <[email protected]>
    Reviewed-by: Brian Behlendorf <[email protected]>
    Signed-off-by:	Alexander Motin <[email protected]>
    Sponsored by:	iXsystems, Inc.
    Closes openzfs#15000
    amotin authored and behlendorf committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    6e79bcd View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2023

  1. Fix raw receive with different indirect block size.

    Unlike regular receive, raw receive require destination to have the
    same block structure as the source.  In case of dnode reclaim this
    triggers two special cases, requiring special handling:
     - If dn_nlevels == 1, we can change the ibs, but dnode_set_blksz()
    should not dirty the data buffer if block size does not change, or
    durign receive dbuf_dirty_lightweight() will trigger assertion.
     - If dn_nlevels > 1, we just can't change the ibs, dnode_set_blksz()
    would fail and receive_object would trigger assertion, so we should
    destroy and recreate the dnode from scratch.
    
    Reviewed-by: Paul Dagnelie <[email protected]>
    Signed-off-by:	Alexander Motin <[email protected]>
    Sponsored by:	iXsystems, Inc.
    Closes openzfs#15039
    amotin authored and behlendorf committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    e01e3a4 View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2023

  1. zed: Fix zed ASSERT on slot power cycle

    We would see zed assert on one of our systems if we powered off a
    slot.  Further examination showed zfs_retire_recv() was reporting
    a GUID of 0, which in turn would return a NULL nvlist.  Add
    in a check for a zero GUID.
    
    Reviewed-by: Brian Behlendorf <[email protected]>
    Signed-off-by: Tony Hutter <[email protected]>
    Closes openzfs#15084
    tonyhutter authored and behlendorf committed Jul 24, 2023
    Configuration menu
    Copy the full SHA
    846a4cc View commit details
    Browse the repository at this point in the history

Commits on Jul 26, 2023

  1. zed: Reduce log noise for large JBODs

    For large JBODs the log message "zfs_iter_vdev: no match" can
    account for the bulk of the log messages (over 70%).  Since this
    message is purely informational and not that useful we remove it.
    
    Reviewed-by: Olaf Faaland <[email protected]>
    Reviewed-by: Brian Atkinson <[email protected]>
    Signed-off-by: Brian Behlendorf <[email protected]>
    Closes openzfs#15086
    Closes openzfs#15094
    behlendorf committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    1abf68b View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2023

  1. Linux 6.4 compat: META

    Update the META file to reflect compatibility with the 6.4 kernel.
    
    Reviewed-by: Brian Behlendorf <[email protected]>
    Signed-off-by: Ryan Lahfa <[email protected]>
    Closes openzfs#15125
    RaitoBezarius authored Aug 2, 2023
    Configuration menu
    Copy the full SHA
    245850b View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2023

  1. Workaround issue cleaning up automounted snapshots on Linux

    On Linux, sometimes, when ZFS goes to unmount an automounted snap,
    it fails a VERIFY check on debug builds, because taskq_cancel_id
    returned ENOENT after not finding the taskq it was trying to cancel.
    
    This presumably happens when it already died for some reason; in this
    case, we don't really mind it already being dead, since we're just
    going to dispatch a new task to unmount it right after.
    
    So we just ignore it if we get back ENOENT trying to cancel here,
    retry a couple times if we get back the only other possible condition
    (EBUSY), and log to dbgmsg if we got anything but ENOENT or success.
    
    (We also add some locking around taskqid, to avoid one or two cases
    of two instances of trying to cancel something at once.)
    
    Reviewed-by: Brian Behlendorf <[email protected]>
    Reviewed-by: Tony Nguyen <[email protected]>
    Signed-off-by: Rich Ercolani <[email protected]>
    Closes openzfs#11632
    Closes openzfs#12670
    rincebrain authored and behlendorf committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    692f780 View commit details
    Browse the repository at this point in the history
  2. quick fix for lingering snapdir unmount problems

    Unfortunately, even after e79b680, I still, much more rarely,
    tripped asserts when playing with many ctldir mounts at once.
    
    Since this appears to happen if we dispatched twice too fast, just
    ignore it. We don't actually need to do anything if someone already
    started doing it for us.
    
    Reviewed-by: Brian Behlendorf <[email protected]>
    Signed-off-by: Rich Ercolani <[email protected]>
    Closes openzfs#14462
    rincebrain authored and behlendorf committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    426d07d View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2023

  1. Linux: Never sleep in kmem_cache_alloc(..., KM_NOSLEEP) (openzfs#14926)

    When a kmem cache is exhausted and needs to be expanded a new
    slab is allocated.  KM_SLEEP callers can block and wait for the
    allocation, but KM_NOSLEEP callers were incorrectly allowed to
    block as well.
    
    Resolve this by attempting an emergency allocation as a best
    effort.  This may fail but that's fine since any KM_NOSLEEP
    consumer is required to handle an allocation failure.
    
    Signed-off-by: Brian Behlendorf <[email protected]>
    Reviewed-by: Adam Moss <[email protected]>
    Reviewed-by: Brian Atkinson <[email protected]>
    Reviewed-by: Richard Yao <[email protected]>
    Reviewed-by: Tony Hutter <[email protected]>
    behlendorf authored and tonyhutter committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    837e426 View commit details
    Browse the repository at this point in the history
  2. Linux 6.5 compat: BLK_STS_NEXUS renamed to BLK_STS_RESV_CONFLICT

    This change was introduced in Linux commit
    7ba150834b840f6f5cdd07ca69a4ccf39df59a66
    
    Reviewed-by: Brian Behlendorf <[email protected]>
    Reviewed-by: Alexander Motin <[email protected]>
    Signed-off-by: Coleman Kane <[email protected]>
    Closes openzfs#15059
    ckane authored and tonyhutter committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    f52d9b6 View commit details
    Browse the repository at this point in the history
  3. Linux 6.5 compat: disk_check_media_change() was added

    The disk_check_media_change() function was added which replaces
    bdev_check_media_change.  This change was introduced in 6.5rc1
    444aa2c58cb3b6cfe3b7cc7db6c294d73393a894 and the new function takes a
    gendisk* as its argument, no longer a block_device*. Thus, bdev->bd_disk
    is now used to pass the expected data.
    
    Reviewed-by: Brian Behlendorf <[email protected]>
    Signed-off-by: Coleman Kane <[email protected]>
    Closes openzfs#15060
    ckane authored and tonyhutter committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    e45ca51 View commit details
    Browse the repository at this point in the history
  4. Linux 6.5 compat: register_sysctl_table removed

    Additionally, the .child element of ctl_table has been removed in 6.5.
    This change adds a new test for the pre-6.5 register_sysctl_table()
    function, and uses the old code in that case. If it isn't found, then
    the parentage entries in the tables are removed, and the register_sysctl
    call is provided the paths of "kernel/spl", "kernel/spl/kmem", and
    "kernel/spl/kstat" directly, to populate each subdirectory over three
    calls, as is the new API.
    
    Reviewed-by: Brian Behlendorf <[email protected]>
    Signed-off-by: Coleman Kane <[email protected]>
    Closes openzfs#15098
    ckane authored and tonyhutter committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    211868b View commit details
    Browse the repository at this point in the history
  5. Linux 6.5 compat: use disk_check_media_change when it exists

    When disk_check_media_change() exists, then define
    zfs_check_media_change() to simply call disk_check_media_change() on
    the bd_disk member of its argument. Since disk_check_media_change()
    is newer than when revalidate_disk was present in bops, we should
    be able to safely do this via a macro, instead of recreating a new
    implementation of the inline function that forces revalidation.
    
    Reviewed-by: Brian Behlendorf <[email protected]>
    Reviewed-by: Brian Atkinson <[email protected]>
    Signed-off-by: Coleman Kane <[email protected]>
    Closes openzfs#15101
    ckane authored and tonyhutter committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    3ff9e4f View commit details
    Browse the repository at this point in the history
  6. Linux 6.5 compat: blkdev changes

    Multiple changes to the blkdev API were introduced in Linux 6.5. This
    includes passing (void* holder) to blkdev_put, adding a new
    blk_holder_ops* arg to blkdev_get_by_path, adding a new blk_mode_t type
    that replaces uses of fmode_t, and removing an argument from the release
    handler on block_device_operations that we weren't using. The open
    function definition has also changed to take gendisk* and blk_mode_t, so
    update it accordingly, too.
    
    Implement local wrappers for blkdev_get_by_path() and
    vdev_blkdev_put() so that the in-line calls are cleaner, and place the
    conditionally-compiled implementation details inside of both of these
    local wrappers. Both calls are exclusively used within vdev_disk.c, at
    this time.
    
    Add blk_mode_is_open_write() to test FMODE_WRITE / BLK_OPEN_WRITE
    The wrapper function is now used for testing using the appropriate
    method for the kernel, whether the open mode is writable or not.
    
    Emphasize fmode_t arg in zvol_release is not used
    
    Reviewed-by: Brian Behlendorf <[email protected]>
    Signed-off-by: Coleman Kane <[email protected]>
    Closes openzfs#15099
    ckane authored and tonyhutter committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    7c0618b View commit details
    Browse the repository at this point in the history
  7. Linux 6.4 compat: iter_iov() function now used to get old iov member

    The iov_iter->iov member is now iov_iter->__iov and must be accessed via
    the accessor function iter_iov(). Create a wrapper that is conditionally
    compiled to use the access method appropriate for the target kernel
    version.
    
    Reviewed-by: Brian Behlendorf <[email protected]>
    Reviewed-by: Brian Atkinson <[email protected]>
    Signed-off-by: Coleman Kane <[email protected]>
    Closes openzfs#15100
    ckane authored and tonyhutter committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    feb0fa6 View commit details
    Browse the repository at this point in the history
  8. Linux 4.20 compat: wrapper function for iov_iter type access

    An iov_iter_type() function to access the "type" member of the struct
    iov_iter was added at one point. Move the conditional logic to decide
    which method to use for accessing it into a macro and simplify the
    zpl_uio_init code.
    
    Reviewed-by: Brian Behlendorf <[email protected]>
    Reviewed-by: Brian Atkinson <[email protected]>
    Signed-off-by: Coleman Kane <[email protected]>
    Closes openzfs#15100
    ckane authored and tonyhutter committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    5ee79af View commit details
    Browse the repository at this point in the history
  9. Revert "Linux 6.5 compat: register_sysctl_table removed"

    This reverts commit b35374f as there
    are error messages when loading the SPL module. Errors seemed to be tied
    to duplicate a duplicate entry.
    
    Reviewed-by: Brian Behlendorf <[email protected]>
    Signed-off-by: Brian Atkinson <[email protected]>
    Closes openzfs#15134
    bwatkinson authored and tonyhutter committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    0ee7a08 View commit details
    Browse the repository at this point in the history
  10. Linux 6.5 compat: register_sysctl_table removed

    Additionally, the .child element of ctl_table has been removed in 6.5.
    This change adds a new test for the pre-6.5 register_sysctl_table()
    function, and uses the old code in that case. If it isn't found, then
    the parentage entries in the tables are removed, and the register_sysctl
    call is provided the paths of "kernel/spl", "kernel/spl/kmem", and
    "kernel/spl/kstat" directly, to populate each subdirectory over three
    calls, as is the new API.
    
    Reviewed-by: Brian Atkinson <[email protected]>
    Reviewed-by: Brian Behlendorf <[email protected]>
    Signed-off-by: Coleman Kane <[email protected]>
    Closes openzfs#15138
    ckane authored and tonyhutter committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    cb115ed View commit details
    Browse the repository at this point in the history
  11. Linux 6.5 compat: replace generic_file_splice_read with filemap_splic…

    …e_read
    
    The generic_file_splice_read function was removed in Linux 6.5 in favor
    of filemap_splice_read. Add an autoconf test for filemap_splice_read and
    use it if it is found as the handler for .splice_read in the
    file_operations struct. Additionally, ITER_PIPE was removed in 6.5. This
    change removes the ITER_* macros that OpenZFS doesn't use from being
    tested in config/kernel-vfs-iov_iter.m4. The removal of ITER_PIPE was
    causing the test to fail, which also affected the code responsible for
    setting the .splice_read handler, above. That behavior caused run-time
    panics on Linux 6.5.
    
    Reviewed-by: Brian Atkinson <[email protected]>
    Reviewed-by: Brian Behlendorf <[email protected]>
    Signed-off-by: Coleman Kane <[email protected]>
    Closes openzfs#15155
    ckane authored and tonyhutter committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    9b7f7f0 View commit details
    Browse the repository at this point in the history
  12. Linux 6.5 compat: Use copy_splice_read instead of filemap_splice_read

    Using the filemap_splice_read function for the splice_read handler was
    leading to occasional data corruption under certain circumstances. Favor
    using copy_splice_read instead, which does not demonstrate the same
    erroneous behavior under the tested failure cases.
    
    Reviewed-by: Brian Atkinson <[email protected]>
    Reviewed-by: Brian Behlendorf <[email protected]>
    Signed-off-by: Coleman Kane <[email protected]>
    Closes openzfs#15164
    ckane authored and tonyhutter committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    c74a17a View commit details
    Browse the repository at this point in the history
  13. Linux 6.5 compat: safe cleanup in spl_proc_fini()

    If we fail to create a proc entry in spl_proc_init() we may end up
    calling unregister_sysctl_table() twice: one in the failure path of
    spl_proc_init() and another time during spl_proc_fini().
    
    Avoid the double call to unregister_sysctl_table() and while at it
    refactor the code a bit to reduce code duplication.
    
    This was accidentally introduced when the spl code was
    updated for Linux 6.5 compatibility.
    
    Reviewed-by: Brian Behlendorf <[email protected]>
    Reviewed-by: Ameer Hamza <[email protected]>
    Signed-off-by: Andrea Righi <[email protected]>
    Closes openzfs#15234 
    Closes openzfs#15235
    Andrea Righi authored and tonyhutter committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    cb28c0b View commit details
    Browse the repository at this point in the history
  14. Linux 6.5 compat: spl: properly unregister sysctl entries

    When register_sysctl_table() is unavailable we fail to properly
    unregister sysctl entries under "kernel/spl".
    
    This leads to errors like the following when spl is unloaded/reloaded,
    making impossible to properly reload the spl module:
    
    [  746.995704] sysctl duplicate entry: /kernel/spl/kmem/slab_kvmem_total
    
    Fix by cleaning up all the sub-entries inside "kernel/spl" when the
    spl module is unloaded.
    
    Reviewed-by: Alexander Motin <[email protected]>
    Reviewed-by: Brian Atkinson <[email protected]>
    Signed-off-by: Andrea Righi <[email protected]>
    Closes openzfs#15239
    Andrea Righi authored and tonyhutter committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    adf428c View commit details
    Browse the repository at this point in the history
  15. intptr_t definition is canonically signed

    Make the version here match that elsewhere in the kernel and system
    headers.
    
    Reviewed-by: Brian Behlendorf <[email protected]>
    Reviewed-by: Alexander Motin <[email protected]>
    Signed-off-by: Coleman Kane <[email protected]>
    Closes openzfs#15058
    ckane authored and tonyhutter committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    92fc218 View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2023

  1. zed: Add zedlet to power off slot when drive is faulted

    If ZED_POWER_OFF_ENCLOUSRE_SLOT_ON_FAULT is enabled in zed.rc, then
    power off the drive's slot in the enclosure if it becomes FAULTED.
    This can help silence misbehaving drives.  This assumes your drive
    enclosure fully supports slot power control via sysfs.
    
    Reviewed-by: @AllKind
    Reviewed-by: Brian Behlendorf <[email protected]>
    Signed-off-by: Tony Hutter <[email protected]>
    Closes openzfs#15200
    tonyhutter committed Sep 12, 2023
    Configuration menu
    Copy the full SHA
    a4f82db View commit details
    Browse the repository at this point in the history
  2. zed: update zed.d/statechange-slot_off.sh

    The statechange-slot_off.sh zedlet which was added in openzfs#15200
    needed to be installed so it's included by the packages.
    
    Additional testing has also shown that multiple retries are
    often needed for the script to operate reliably.
    
    Reviewed-by: Tony Hutter <[email protected]>
    Signed-off-by: Brian Behlendorf <[email protected]>
    Closes openzfs#15210
    behlendorf authored and tonyhutter committed Sep 12, 2023
    Configuration menu
    Copy the full SHA
    a449d8b View commit details
    Browse the repository at this point in the history
  3. checkstyle: fix action failures

    Reviewed-by: Don Brady <[email protected]>
    Reviewed-by: Tony Hutter <[email protected]>
    Reviewed-by: Brian Behlendorf <[email protected]>
    Signed-off-by: Serapheim Dimitropoulos <[email protected]>
    Closes openzfs#15220
    sdimitro authored and tonyhutter committed Sep 12, 2023
    Configuration menu
    Copy the full SHA
    c8a3c74 View commit details
    Browse the repository at this point in the history
  4. Linux 6.5 compat: META (openzfs#15265)

    Update the META file to reflect compatibility with the 6.5
    kernel.
    
    Signed-off-by: Tony Hutter <[email protected]>
    Reviewed-by: Brian Behlendorf <[email protected]>
    tonyhutter committed Sep 12, 2023
    Configuration menu
    Copy the full SHA
    ae0d644 View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2023

  1. Cleanup: Replace oldstyle struct hack with C99 flexible array members

    The Linux 5.16.14 kernel's coccicheck caught this. The semantic
    patch that caught it was:
    
    ./scripts/coccinelle/misc/flexible_array.cocci
    
    However, unlike the cases where the GNU zero length array extension had
    been used, coccicheck would not suggest patches for the older style
    single member arrays. That was good because blindly changing them would
    break size calculations in most cases.
    
    Therefore, this required care to make sure that we did not break size
    calculations. In the case of `indirect_split_t`, we use
    `offsetof(indirect_split_t, is_child[is->is_children])` to calculate
    size. This might be subtly wrong according to an old mailing list
    thread:
    
    https://inbox.sourceware.org/gcc-prs/[email protected]/T/
    
    That is because the C99 specification should consider the flexible array
    members to start at the end of a structure, but compilers prefer to put
    padding at the end. A suggestion was made to allow compilers to allocate
    padding after the VLA like compilers already did:
    
    http://std.dkuug.dk/JTC1/SC22/WG14/www/docs/n983.htm
    
    However, upon thinking about it, whether or not we allocate end of
    structure padding does not matter, so using offsetof() to calculate the
    size of the structure is fine, so long as we do not mix it with sizeof()
    on structures with no array members.
    
    In the case that we mix them and padding causes offsetof(struct_t,
    vla_member[0]) to differ from sizeof(struct_t), we would be doing unsafe
    operations if we underallocate via `offsetof()` and then overcopy via
    sizeof().
    
    Reviewed-by: Brian Behlendorf <[email protected]>
    Signed-off-by: Richard Yao <[email protected]>
    Closes openzfs#14372
    ryao authored and tonyhutter committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    a93c30a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a3169da View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2023

  1. Tag zfs-2.1.13

    META file and changelog updated.
    
    Signed-off-by: Tony Hutter <[email protected]>
    tonyhutter committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    eb62221 View commit details
    Browse the repository at this point in the history