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

[2.2] add missing brt tests and fix cloning into mmaped and cached file #15788

Merged

Commits on Jan 18, 2024

  1. ZTS: block_cloning: Use numeric sort for get_same_blocks

    Reviewed-by: Kay Pedersen <mail@mkwg.de>
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Reviewed-by:  Alexander Motin <mav@FreeBSD.org>
    Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>
    Closes openzfs#15614
    ixhamza authored and mmatuska committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    a2016bc View commit details
    Browse the repository at this point in the history
  2. ZTS: Add test cases for block cloning replay

    Reviewed-by: Kay Pedersen <mail@mkwg.de>
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Reviewed-by:  Alexander Motin <mav@FreeBSD.org>
    Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>
    Closes openzfs#15614
    ixhamza authored and mmatuska committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    c1bd2ba View commit details
    Browse the repository at this point in the history
  3. Test LWB buffer overflow for block cloning

    PR#15634 removes 128K into 2x68K LWB split optimization, since it
    was found to cause LWB buffer overflow while trying to write 128KB
    TX_CLONE_RANGE record with 1022 block pointers into 68KB buffer,
    with multiple VDEVs ZIL.
    
    This commit adds a test for this particular scenario by writing
    maximum sizes TX_CLONE_RANE record with 1022 block pointers into
    68KB buffer, with two SLOG devices.
    
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Reviewed-by:  Alexander Motin <mav@FreeBSD.org>
    Reviewed-by: Ameer Hamza <ahamza@ixsystems.com>
    Signed-off-by: Umer Saleem <usaleem@ixsystems.com>
    Closes openzfs#15672
    usaleem-ix authored and mmatuska committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    9eda19c View commit details
    Browse the repository at this point in the history
  4. Block cloning tests.

    The test mostly focus on testing various corner cases.
    The tests take a long time to run, so for the common.run runfile
    we randomly select a hundred tests.
    To run all the bclone tests, bclone.run runfile should be used.
    
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Signed-off-by: Pawel Jakub Dawidek <pawel@dawidek.net>
    Closes openzfs#15631
    pjd authored and mmatuska committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    728d118 View commit details
    Browse the repository at this point in the history
  5. Enable block_cloning tests on FreeBSD

    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Signed-off-by: Pawel Jakub Dawidek <pawel@dawidek.net>
    Closes openzfs#15749
    behlendorf authored and mmatuska committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    624eab3 View commit details
    Browse the repository at this point in the history
  6. ZTS: Test for clone, mmap and write for block cloning

    For block cloning, if we mmap the cloned file and write from the
    map into the file, it triggers a panic in dbuf_redirty() on Linux.
    
    The same scenario causes data corruption on FreeBSD. Both these
    issues are fixed under PR#15656 and PR#15665.
    
    It would be good to add a test for this scenario in ZTS. The test
    program and issue was produced by @robn.
    
    Reviewed-by: Pawel Jakub Dawidek <pawel@dawidek.net>
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Reviewed-by: Alexander Motin <mav@FreeBSD.org>
    Reviewed-by: Ameer Hamza <ahamza@ixsystems.com>
    Signed-off-by: Umer Saleem <usaleem@ixsystems.com>
    Closes openzfs#15717
    usaleem-ix authored and mmatuska committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    5e73af0 View commit details
    Browse the repository at this point in the history
  7. Fix cloning into mmaped and cached file.

    If the destination file is mmaped and the mmaped region was already
    read, so it is cached, we need to update mmaped pages after successful
    clone using update_pages().
    
    Reviewed-by: Alexander Motin <mav@FreeBSD.org>
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Pointed out by: Ka Ho Ng <khng@freebsd.org>
    Signed-off-by: Pawel Jakub Dawidek <pawel@dawidek.net>
    Closes openzfs#15772
    pjd authored and mmatuska committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    9a736d1 View commit details
    Browse the repository at this point in the history
  8. fix: variable type with zfs-tests/cmd/clonefile.c

    Compiling on arm64 freebsd-13.2 and arm64 almalinux-8 brings currently
    this error:
    
    ```
      CC       tests/zfs-tests/cmd/clonefile.o
    tests/zfs-tests/cmd/clonefile.c:166:43: error: result of comparison of \
    constant -1 with expression of type 'char' is always true \
    [-Werror,-Wtautological-constant-out-of-range-compare]
            while ((c = getopt(argc, argv, "crfdq")) != -1) {
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~
    1 error generated.
    gmake[2]: *** [Makefile:8675: tests/zfs-tests/cmd/clonefile.o] Error 1
    ```
    
    Fix: use correct variable type `int`.
    
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Reviewed-by: Rob Norris <robn@despairlabs.com>
    Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
    Closes openzfs#15783
    mcmilk authored and mmatuska committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    64d236f View commit details
    Browse the repository at this point in the history