1. 06 May, 2022 2 commits
    • Stefan Haberland's avatar
      s390/dasd: prevent double format of tracks for ESE devices · 71f38716
      Stefan Haberland authored
      For ESE devices we get an error for write operations on an unformatted
      track. Afterwards the track will be formatted and the IO operation
      restarted.
      When using alias devices a track might be accessed by multiple requests
      simultaneously and there is a race window that a track gets formatted
      twice resulting in data loss.
      
      Prevent this by remembering the amount of formatted tracks when starting
      a request and comparing this number before actually formatting a track
      on the fly. If the number has changed there is a chance that the current
      track was finally formatted in between. As a result do not format the
      track and restart the current IO to check.
      
      The number of formatted tracks does not match the overall number of
      formatted tracks on the device and it might wrap around but this is no
      problem. It is only needed to recognize that a track has been formatted at
      all in between.
      
      Fixes: 5e2b17e7 ("s390/dasd: Add dynamic formatting support for ESE volumes")
      Cc: stable@vger.kernel.org # 5.3+
      Signed-off-by: default avatarStefan Haberland <sth@linux.ibm.com>
      Reviewed-by: default avatarJan Hoeppner <hoeppner@linux.ibm.com>
      Link: https://lore.kernel.org/r/20220505141733.1989450-3-sth@linux.ibm.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      71f38716
    • Stefan Haberland's avatar
      s390/dasd: fix data corruption for ESE devices · 5b53a405
      Stefan Haberland authored
      For ESE devices we get an error when accessing an unformatted track.
      The handling of this error will return zero data for read requests and
      format the track on demand before writing to it. To do this the code needs
      to distinguish between read and write requests. This is done with data from
      the blocklayer request. A pointer to the blocklayer request is stored in
      the CQR.
      
      If there is an error on the device an ERP request is built to do error
      recovery. While the ERP request is mostly a copy of the original CQR the
      pointer to the blocklayer request is not copied to not accidentally pass
      it back to the blocklayer without cleanup.
      
      This leads to the error that during ESE handling after an ERP request was
      built it is not possible to determine the IO direction. This leads to the
      formatting of a track for read requests which might in turn lead to data
      corruption.
      
      Fixes: 5e2b17e7 ("s390/dasd: Add dynamic formatting support for ESE volumes")
      Cc: stable@vger.kernel.org # 5.3+
      Signed-off-by: default avatarStefan Haberland <sth@linux.ibm.com>
      Reviewed-by: default avatarJan Hoeppner <hoeppner@linux.ibm.com>
      Link: https://lore.kernel.org/r/20220505141733.1989450-2-sth@linux.ibm.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      5b53a405
  2. 02 May, 2022 1 commit
  3. 29 Apr, 2022 1 commit
  4. 27 Apr, 2022 2 commits
    • Tejun Heo's avatar
      Revert "block: inherit request start time from bio for BLK_CGROUP" · 4cddeaca
      Tejun Heo authored
      This reverts commit 00067077. It has a
      couple problems:
      
      * bio_issue_time() is stored in bio->bi_issue truncated to 51 bits. This
        overflows in slightly over 26 days. Setting rq->io_start_time_ns with it
        means that io duration calculation would yield >26days after 26 days of
        uptime. This, for example, confuses kyber making it cause high IO
        latencies.
      
      * rq->io_start_time_ns should record the time that the IO is issued to the
        device so that on-device latency can be measured. However,
        bio_issue_time() is set before the bio goes through the rq-qos controllers
        (wbt, iolatency, iocost), so when the bio gets throttled in any of the
        mechanisms, the measured latencies make no sense - on-device latencies end
        up higher than request-alloc-to-completion latencies.
      
      We'll need a smarter way to avoid calling ktime_get_ns() repeatedly
      back-to-back. For now, let's revert the commit.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: stable@vger.kernel.org # v5.16+
      Link: https://lore.kernel.org/r/YmmeOLfo5lzc+8yI@slm.duckdns.orgSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      4cddeaca
    • Tejun Heo's avatar
      iocost: don't reset the inuse weight of under-weighted debtors · 8c936f9e
      Tejun Heo authored
      When an iocg is in debt, its inuse weight is owned by debt handling and
      should stay at 1. This invariant was broken when determining the amount of
      surpluses at the beginning of donation calculation - when an iocg's
      hierarchical weight is too low, the iocg is excluded from donation
      calculation and its inuse is reset to its active regardless of its
      indebtedness, triggering warnings like the following:
      
       WARNING: CPU: 5 PID: 0 at block/blk-iocost.c:1416 iocg_kick_waitq+0x392/0x3a0
       ...
       RIP: 0010:iocg_kick_waitq+0x392/0x3a0
       Code: 00 00 be ff ff ff ff 48 89 4d a8 e8 98 b2 70 00 48 8b 4d a8 85 c0 0f 85 4a fe ff ff 0f 0b e9 43 fe ff ff 0f 0b e9 4d fe ff ff <0f> 0b e9 50 fe ff ff e8 a2 ae 70 00 66 90 0f 1f 44 00 00 55 48 89
       RSP: 0018:ffffc90000200d08 EFLAGS: 00010016
       ...
        <IRQ>
        ioc_timer_fn+0x2e0/0x1470
        call_timer_fn+0xa1/0x2c0
       ...
      
      As this happens only when an iocg's hierarchical weight is negligible, its
      impact likely is limited to triggering the warnings. Fix it by skipping
      resetting inuse of under-weighted debtors.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Reported-by: default avatarRik van Riel <riel@surriel.com>
      Fixes: c421a3eb ("blk-iocost: revamp debt handling")
      Cc: stable@vger.kernel.org # v5.10+
      Link: https://lore.kernel.org/r/YmjODd4aif9BzFuO@slm.duckdns.orgSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      8c936f9e
  5. 19 Apr, 2022 2 commits
  6. 15 Apr, 2022 7 commits
  7. 14 Apr, 2022 2 commits
  8. 12 Apr, 2022 2 commits
  9. 06 Apr, 2022 4 commits
  10. 03 Apr, 2022 8 commits
  11. 02 Apr, 2022 9 commits
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-for-v5.18-2022-04-02' of... · be2d3ece
      Linus Torvalds authored
      Merge tag 'perf-tools-for-v5.18-2022-04-02' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull more perf tools updates from Arnaldo Carvalho de Melo:
      
       - Avoid SEGV if core.cpus isn't set in 'perf stat'.
      
       - Stop depending on .git files for building PERF-VERSION-FILE, used in
         'perf --version', fixing some perf tools build scenarios.
      
       - Convert tracepoint.py example to python3.
      
       - Update UAPI header copies from the kernel sources: socket,
         mman-common, msr-index, KVM, i915 and cpufeatures.
      
       - Update copy of libbpf's hashmap.c.
      
       - Directly return instead of using local ret variable in
         evlist__create_syswide_maps(), found by coccinelle.
      
      * tag 'perf-tools-for-v5.18-2022-04-02' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf python: Convert tracepoint.py example to python3
        perf evlist: Directly return instead of using local ret variable
        perf cpumap: More cpu map reuse by merge.
        perf cpumap: Add is_subset function
        perf evlist: Rename cpus to user_requested_cpus
        perf tools: Stop depending on .git files for building PERF-VERSION-FILE
        tools headers cpufeatures: Sync with the kernel sources
        tools headers UAPI: Sync drm/i915_drm.h with the kernel sources
        tools headers UAPI: Sync linux/kvm.h with the kernel sources
        tools kvm headers arm64: Update KVM headers from the kernel sources
        tools arch x86: Sync the msr-index.h copy with the kernel sources
        tools headers UAPI: Sync asm-generic/mman-common.h with the kernel
        perf beauty: Update copy of linux/socket.h with the kernel sources
        perf tools: Update copy of libbpf's hashmap.c
        perf stat: Avoid SEGV if core.cpus isn't set
      be2d3ece
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v5.18' of... · d897b680
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - Fix empty $(PYTHON) expansion.
      
       - Fix UML, which got broken by the attempt to suppress Clang warnings.
      
       - Fix warning message in modpost.
      
      * tag 'kbuild-fixes-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        modpost: restore the warning message for missing symbol versions
        Revert "um: clang: Strip out -mno-global-merge from USER_CFLAGS"
        kbuild: Remove '-mno-global-merge'
        kbuild: fix empty ${PYTHON} in scripts/link-vmlinux.sh
        kconfig: remove stale comment about removed kconfig_print_symbol()
      d897b680
    • Linus Torvalds's avatar
      Merge tag 'mips_5.18_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · 0b0fa57a
      Linus Torvalds authored
      Pull MIPS fixes from Thomas Bogendoerfer:
      
       - build fix for gpio
      
       - fix crc32 build problems
      
       - check for failed memory allocations
      
      * tag 'mips_5.18_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MIPS: crypto: Fix CRC32 code
        MIPS: rb532: move GPIOD definition into C-files
        MIPS: lantiq: check the return value of kzalloc()
        mips: sgi-ip22: add a check for the return of kzalloc()
      0b0fa57a
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 38904911
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
      
       - Only do MSR filtering for MSRs accessed by rdmsr/wrmsr
      
       - Documentation improvements
      
       - Prevent module exit until all VMs are freed
      
       - PMU Virtualization fixes
      
       - Fix for kvm_irq_delivery_to_apic_fast() NULL-pointer dereferences
      
       - Other miscellaneous bugfixes
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (42 commits)
        KVM: x86: fix sending PV IPI
        KVM: x86/mmu: do compare-and-exchange of gPTE via the user address
        KVM: x86: Remove redundant vm_entry_controls_clearbit() call
        KVM: x86: cleanup enter_rmode()
        KVM: x86: SVM: fix tsc scaling when the host doesn't support it
        kvm: x86: SVM: remove unused defines
        KVM: x86: SVM: move tsc ratio definitions to svm.h
        KVM: x86: SVM: fix avic spec based definitions again
        KVM: MIPS: remove reference to trap&emulate virtualization
        KVM: x86: document limitations of MSR filtering
        KVM: x86: Only do MSR filtering when access MSR by rdmsr/wrmsr
        KVM: x86/emulator: Emulate RDPID only if it is enabled in guest
        KVM: x86/pmu: Fix and isolate TSX-specific performance event logic
        KVM: x86: mmu: trace kvm_mmu_set_spte after the new SPTE was set
        KVM: x86/svm: Clear reserved bits written to PerfEvtSeln MSRs
        KVM: x86: Trace all APICv inhibit changes and capture overall status
        KVM: x86: Add wrappers for setting/clearing APICv inhibits
        KVM: x86: Make APICv inhibit reasons an enum and cleanup naming
        KVM: X86: Handle implicit supervisor access with SMAP
        KVM: X86: Rename variable smap to not_smap in permission_fault()
        ...
      38904911
    • Masahiro Yamada's avatar
      modpost: restore the warning message for missing symbol versions · bf5c0c22
      Masahiro Yamada authored
      This log message was accidentally chopped off.
      
      I was wondering why this happened, but checking the ML log, Mark
      precisely followed my suggestion [1].
      
      I just used "..." because I was too lazy to type the sentence fully.
      Sorry for the confusion.
      
      [1]: https://lore.kernel.org/all/CAK7LNAR6bXXk9-ZzZYpTqzFqdYbQsZHmiWspu27rtsFxvfRuVA@mail.gmail.com/
      
      Fixes: 4a679593 ("kbuild: modpost: Explicitly warn about unprototyped symbols")
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Acked-by: default avatarMark Brown <broonie@kernel.org>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      bf5c0c22
    • Linus Torvalds's avatar
      Merge tag 'for-5.18/drivers-2022-04-02' of git://git.kernel.dk/linux-block · 6f34f8c3
      Linus Torvalds authored
      Pull block driver fix from Jens Axboe:
       "Got two reports on nbd spewing warnings on load now, which is a
        regression from a commit that went into your tree yesterday.
      
        Revert the problematic change for now"
      
      * tag 'for-5.18/drivers-2022-04-02' of git://git.kernel.dk/linux-block:
        Revert "nbd: fix possible overflow on 'first_minor' in nbd_dev_add()"
      6f34f8c3
    • Linus Torvalds's avatar
      Merge tag 'pci-v5.18-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 9a212aaf
      Linus Torvalds authored
      Pull pci fix from Bjorn Helgaas:
      
       - Fix Hyper-V "defined but not used" build issue added during merge
         window (YueHaibing)
      
      * tag 'pci-v5.18-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI: hv: Remove unused hv_set_msi_entry_from_desc()
      9a212aaf
    • Linus Torvalds's avatar
      Merge tag 'tag-chrome-platform-for-v5.18' of... · 02d4f8a3
      Linus Torvalds authored
      Merge tag 'tag-chrome-platform-for-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux
      
      Pull chrome platform updates from Benson Leung:
       "cros_ec_typec:
      
         - Check for EC device - Fix a crash when using the cros_ec_typec
           driver on older hardware not capable of typec commands
      
         - Make try power role optional
      
         - Mux configuration reorganization series from Prashant
      
        cros_ec_debugfs:
      
         - Fix use after free. Thanks Tzung-bi
      
        sensorhub:
      
         - cros_ec_sensorhub fixup - Split trace include file
      
        misc:
      
         - Add new mailing list for chrome-platform development:
      
      	chrome-platform@lists.linux.dev
      
           Now with patchwork!"
      
      * tag 'tag-chrome-platform-for-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux:
        platform/chrome: cros_ec_debugfs: detach log reader wq from devm
        platform: chrome: Split trace include file
        platform/chrome: cros_ec_typec: Update mux flags during partner removal
        platform/chrome: cros_ec_typec: Configure muxes at start of port update
        platform/chrome: cros_ec_typec: Get mux state inside configure_mux
        platform/chrome: cros_ec_typec: Move mux flag checks
        platform/chrome: cros_ec_typec: Check for EC device
        platform/chrome: cros_ec_typec: Make try power role optional
        MAINTAINERS: platform-chrome: Add new chrome-platform@lists.linux.dev list
      02d4f8a3
    • Jens Axboe's avatar
      Revert "nbd: fix possible overflow on 'first_minor' in nbd_dev_add()" · 7198bfc2
      Jens Axboe authored
      This reverts commit 6d35d04a.
      
      Both Gabriel and Borislav report that this commit casues a regression
      with nbd:
      
      sysfs: cannot create duplicate filename '/dev/block/43:0'
      
      Revert it before 5.18-rc1 and we'll investigage this separately in
      due time.
      
      Link: https://lore.kernel.org/all/YkiJTnFOt9bTv6A2@zn.tnic/Reported-by: default avatarGabriel L. Somlo <somlo@cmu.edu>
      Reported-by: default avatarBorislav Petkov <bp@alien8.de>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      7198bfc2