Skip to content
  1. Aug 31, 2018
    • Linus Torvalds's avatar
      Merge tag 'pm-4.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · b6935d2a
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "These address a corner case in the menu cpuidle governor and fix error
        handling in the PM core's generic clock management code.
      
        Specifics:
      
         - Make the menu cpuidle governor avoid stopping the scheduler tick if
           the predicted idle duration exceeds the tick period length, but the
           selected idle state is shallow and deeper idle states with high
           target residencies are available (Rafael Wysocki).
      
         - Make the PM core's generic clock management code use a proper data
           type for one variable to make error handling work (Dan Carpenter)"
      
      * tag 'pm-4.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpuidle: menu: Retain tick when shallow state is selected
        PM / clk: signedness bug in of_pm_clk_add_clks()
      b6935d2a
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-core' · a0b9c4de
      Rafael J. Wysocki authored
      Merge a generic clock management fix for 4.19-rc2.
      
      * pm-core:
        PM / clk: signedness bug in of_pm_clk_add_clks()
      a0b9c4de
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20180830' of git://git.kernel.dk/linux-block · fb646385
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Small collection of fixes that should go into this series. This pull
        contains:
      
         - NVMe pull request with three small fixes (via Christoph)
      
         - Kill useless NULL check before kmem_cache_destroy (Chengguang Xu)
      
         - Xen block driver pull request with persistent grant flushing fixes
           (Juergen Gross)
      
         - Final wbt fixes, wrapping up the changes for this series. These
           have been heavily tested (me)
      
         - cdrom info leak fix (Scott Bauer)
      
         - ATA dma quirk for SQ201 (Linus Walleij)
      
         - Straight forward bsg refcount_t conversion (John Pittman)"
      
      * tag 'for-linus-20180830' of git://git.kernel.dk/linux-block:
        cdrom: Fix info leak/OOB read in cdrom_ioctl_drive_status
        nvmet: free workqueue object if module init fails
        nvme-fcloop: Fix dropped LS's to removed target port
        nvme-pci: add a memory barrier to nvme_dbbuf_update_and_check_event
        block: bsg: move atomic_t ref_count variable to refcount API
        block: remove unnecessary condition check
        ata: ftide010: Add a quirk for SQ201
        blk-wbt: remove dead code
        blk-wbt: improve waking of tasks
        blk-wbt: abstract out end IO completion handler
        xen/blkback: remove unused pers_gnts_lock from struct xen_blkif_ring
        xen/blkback: move persistent grants flags to bool
        xen/blkfront: reorder tests in xlblk_init()
        xen/blkfront: cleanup stale persistent grants
        xen/blkback: don't keep persistent grants too long
      fb646385
    • Linus Torvalds's avatar
      Merge tag 'mtd/for-4.19-rc2' of git://git.infradead.org/linux-mtd · 9f8f16c8
      Linus Torvalds authored
      Pull mtd fixes from Boris Brezillon:
       "Raw NAND fixes:
      
         - denali: Fix a regression caused by the nand_scan() rework
      
         - docg4: Fix a build error when gcc decides to not iniline some
           functions (can be reproduced with gcc 4.1.2):
      
      * tag 'mtd/for-4.19-rc2' of git://git.infradead.org/linux-mtd:
        mtd: rawnand: denali: do not pass zero maxchips to nand_scan()
        mtd: rawnand: docg4: Remove wrong __init annotations
      9f8f16c8
    • Linus Torvalds's avatar
      Merge tag 'mmc-v4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 48f8e8e9
      Linus Torvalds authored
      Pull MMC fixes from Ulf Hansson:
       "MMC core:
         - Fix unsupported parallel dispatch of requests
      
        MMC host:
         - atmel-mci/android-goldfish: Fixup logic of sg_copy_{from,to}_buffer
         - renesas_sdhi_internal_dmac: Prevent IRQ-storm due of DMAC IRQs
         - renesas_sdhi_internal_dmac: Fixup bad register offset"
      
      * tag 'mmc-v4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: renesas_sdhi_internal_dmac: mask DMAC interrupts
        mmc: renesas_sdhi_internal_dmac: fix #define RST_RESERVED_BITS
        mmc: block: Fix unsupported parallel dispatch of requests
        mmc: android-goldfish: fix bad logic of sg_copy_{from,to}_buffer conversion
        mmc: atmel-mci: fix bad logic of sg_copy_{from,to}_buffer conversion
      48f8e8e9
  2. Aug 30, 2018
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-4.19-rc2' of... · 58c3f14f
      Linus Torvalds authored
      Merge tag 'riscv-for-linus-4.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux
      
      Pull RISC-V fixes from Palmer Dabbelt:
       "RISC-V Fixes and Cleanups for 4.19-rc2
      
        This contains a handful of patches that filtered their way in during
        the merge window but just didn't make the deadline. It includes:
      
         - Additional documentation in the riscv,cpu-intc device tree binding
           that resulted from some feedback I missed in the original patch
           set.
      
         - A build fix that provides the definition of tlb_flush() before
           including tlb.h, which fixes a RISC-V build regression introduced
           during this merge window.
      
         - A cosmetic cleanup to sys_riscv_flush_icache()"
      
      * tag 'riscv-for-linus-4.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux:
        RISC-V: Use a less ugly workaround for unused variable warnings
        riscv: tlb: Provide definition of tlb_flush() before including tlb.h
        dt-bindings: riscv,cpu-intc: Cleanups from a missed review
      58c3f14f
    • Ard Biesheuvel's avatar
      powerpc: disable support for relative ksymtab references · ff69279a
      Ard Biesheuvel authored
      
      
      The newly added code that emits ksymtab entries as pairs of 32-bit
      relative references interacts poorly with the way powerpc lays out its
      address space: when a module exports a per-CPU variable, the primary
      module region covering the ksymtab entry -and thus the 32-bit relative
      reference- is too far away from the actual per-CPU variable's base
      address (to which the per-CPU offsets are applied to obtain the
      respective address of each CPU's copy), resulting in corruption when the
      module loader attempts to resolve symbol references of modules that are
      loaded on top and link to the exported per-CPU symbol.
      
      So let's disable this feature on powerpc.  Even though it implements
      CONFIG_RELOCATABLE, it does not implement CONFIG_RANDOMIZE_BASE and so
      KASLR kernels (which are the main target of the feature) do not exist on
      powerpc anyway.
      
      Reported-by: default avatarAndreas Schwab <schwab@linux-m68k.org>
      Suggested-by: default avatarNicholas Piggin <nicholas.piggin@gmail.com>
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ff69279a
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-linus-v4.19-rc2' of... · af3a5fe4
      Linus Torvalds authored
      Merge tag 'hwmon-for-linus-v4.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      Pull hwmon fixes from Guenter Roeck:
      
       - Fix potential Spectre v1 in nct6775
      
       - Add error checking to adt7475 driver
      
       - Fix reading shunt resistor value in ina2xx driver
      
      * tag 'hwmon-for-linus-v4.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (nct6775) Fix potential Spectre v1
        hwmon: (adt7475) Make adt7475_read_word() return errors
        hwmon: (adt7475) Potential error pointer dereferences
        hwmon: (ina2xx) fix sysfs shunt resistor read access
      af3a5fe4
    • Linus Torvalds's avatar
      Merge tag 'for_v4.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · f3f106da
      Linus Torvalds authored
      Pull misc fs fixes from Jan Kara:
      
       - make UDF to properly mount media created by Win7
      
       - make isofs to properly refuse devices with large physical block size
      
       - fix a Spectre gadget in quotactl(2)
      
       - fix a warning in fsnotify code hit by syzkaller
      
      * tag 'for_v4.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        udf: Fix mounting of Win7 created UDF filesystems
        udf: Remove dead code from udf_find_fileset()
        fs/quota: Fix spectre gadget in do_quotactl
        fs/quota: Replace XQM_MAXQUOTAS usage with MAXQUOTAS
        isofs: reject hardware sector size > 2048 bytes
        fsnotify: fix false positive warning on inode delete
      f3f106da
    • Linus Torvalds's avatar
      Merge tag 'nios2-v4.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2 · ff81a521
      Linus Torvalds authored
      Pull nios2 fix from Ley Foon Tan:
       "remove duplicate DEBUG_STACK_USAGE symbol defintions"
      
      * tag 'nios2-v4.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2:
        nios2: kconfig: remove duplicate DEBUG_STACK_USAGE symbol defintions
      ff81a521
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · b4df50de
      Linus Torvalds authored
      Pull crypto fixes from Herbert Xu:
      
       - Check for the right CPU feature bit in sm4-ce on arm64.
      
       - Fix scatterwalk WARN_ON in aes-gcm-ce on arm64.
      
       - Fix unaligned fault in aesni on x86.
      
       - Fix potential NULL pointer dereference on exit in chtls.
      
       - Fix DMA mapping direction for RSA in caam.
      
       - Fix error path return value for xts setkey in caam.
      
       - Fix address endianness when DMA unmapping in caam.
      
       - Fix sleep-in-atomic in vmx.
      
       - Fix command corruption when queue is full in cavium/nitrox.
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: cavium/nitrox - fix for command corruption in queue full case with backlog submissions.
        crypto: vmx - Fix sleep-in-atomic bugs
        crypto: arm64/aes-gcm-ce - fix scatterwalk API violation
        crypto: aesni - Use unaligned loads from gcm_context_data
        crypto: chtls - fix null dereference chtls_free_uld()
        crypto: arm64/sm4-ce - check for the right CPU feature bit
        crypto: caam - fix DMA mapping direction for RSA forms 2 & 3
        crypto: caam/qi - fix error path in xts setkey
        crypto: caam/jr - fix descriptor DMA unmapping
      b4df50de
    • Jens Axboe's avatar
      Merge branch 'nvme-4.19' of git://git.infradead.org/nvme into for-linus · 52bd456a
      Jens Axboe authored
      Pull NVMe fixes from Christoph.
      
      * 'nvme-4.19' of git://git.infradead.org/nvme:
        nvmet: free workqueue object if module init fails
        nvme-fcloop: Fix dropped LS's to removed target port
        nvme-pci: add a memory barrier to nvme_dbbuf_update_and_check_event
      52bd456a
  3. Aug 29, 2018
  4. Aug 28, 2018
    • Chaitanya Kulkarni's avatar
    • James Smart's avatar
      nvme-fcloop: Fix dropped LS's to removed target port · afd299ca
      James Smart authored
      
      
      When a targetport is removed from the config, fcloop will avoid calling
      the LS done() routine thinking the targetport is gone. This leaves the
      initiator reset/reconnect hanging as it waits for a status on the
      Create_Association LS for the reconnect.
      
      Change the filter in the LS callback path. If tport null (set when
      failed validation before "sending to remote port"), be sure to call
      done. This was the main bug. But, continue the logic that only calls
      done if tport was set but there is no remoteport (e.g. case where
      remoteport has been removed, thus host doesn't expect a completion).
      
      Signed-off-by: default avatarJames Smart <james.smart@broadcom.com>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      afd299ca
    • Michal Wnukowski's avatar
      nvme-pci: add a memory barrier to nvme_dbbuf_update_and_check_event · f1ed3df2
      Michal Wnukowski authored
      In many architectures loads may be reordered with older stores to
      different locations.  In the nvme driver the following two operations
      could be reordered:
      
       - Write shadow doorbell (dbbuf_db) into memory.
       - Read EventIdx (dbbuf_ei) from memory.
      
      This can result in a potential race condition between driver and VM host
      processing requests (if given virtual NVMe controller has a support for
      shadow doorbell).  If that occurs, then the NVMe controller may decide to
      wait for MMIO doorbell from guest operating system, and guest driver may
      decide not to issue MMIO doorbell on any of subsequent commands.
      
      This issue is purely timing-dependent one, so there is no easy way to
      reproduce it. Currently the easiest known approach is to run "Oracle IO
      Numbers" (orion) that is shipped with Oracle DB:
      
      orion -run advanced -num_large 0 -size_small 8 -type rand -simulate \
      	concat -write 40 -duration 120 -matrix row -testname nvme_test
      
      Where nvme_test is a .lun file that contains a list of NVMe block
      devices to run test against. Limiting number of vCPUs assigned to given
      VM instance seems to increase chances for this bug to occur. On test
      environment with VM that got 4 NVMe drives and 1 vCPU assigned the
      virtual NVMe controller hang could be observed within 10-20 minutes.
      That correspond to about 400-500k IO operations processed (or about
      100GB of IO read/writes).
      
      Orion tool was used as a validation and set to run in a loop for 36
      hours (equivalent of pushing 550M IO operations). No issues were
      observed. That suggest that the patch fixes the issue.
      
      Fixes: f9f38e33
      
       ("nvme: improve performance for virtual NVMe devices")
      Signed-off-by: default avatarMichal Wnukowski <wnukowski@google.com>
      Reviewed-by: default avatarKeith Busch <keith.busch@intel.com>
      Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
      [hch: updated changelog and comment a bit]
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      f1ed3df2
    • John Pittman's avatar
      block: bsg: move atomic_t ref_count variable to refcount API · db193954
      John Pittman authored
      
      
      Currently, variable ref_count within the bsg_device struct is of
      type atomic_t.  For variables being used as reference counters,
      the refcount API should be used instead of atomic.  The newer
      refcount API works to prevent counter overflows and use-after-free
      bugs.  So, move this varable from the atomic API to refcount,
      potentially avoiding the issues mentioned.
      
      Signed-off-by: default avatarJohn Pittman <jpittman@redhat.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      db193954
    • Chengguang Xu's avatar
      block: remove unnecessary condition check · 62d2a194
      Chengguang Xu authored
      
      
      kmem_cache_destroy() can handle NULL pointer correctly, so there is
      no need to check e->icq_cache before calling kmem_cache_destroy().
      
      Signed-off-by: default avatarChengguang Xu <cgxu519@gmx.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      62d2a194
    • Linus Walleij's avatar
      ata: ftide010: Add a quirk for SQ201 · 46cb52ad
      Linus Walleij authored
      
      
      The DMA is broken on this specific device for some unknown
      reason (probably badly designed or plain broken interface
      electronics) and will only work with PIO. Other users of
      the same hardware does not have this problem.
      
      Add a specific quirk so that this Gemini device gets
      DMA turned off. Also fix up some code around passing the
      port information around in probe while we're at it.
      
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      46cb52ad
    • Jens Axboe's avatar
      blk-wbt: remove dead code · b0a84beb
      Jens Axboe authored
      
      
      We already note and mark discard and swap IO from bio_to_wbt_flags().
      
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      b0a84beb
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 050cdc6c
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) ICE, E1000, IGB, IXGBE, and I40E bug fixes from the Intel folks.
      
       2) Better fix for AB-BA deadlock in packet scheduler code, from Cong
          Wang.
      
       3) bpf sockmap fixes (zero sized key handling, etc.) from Daniel
          Borkmann.
      
       4) Send zero IPID in TCP resets and SYN-RECV state ACKs, to prevent
          attackers using it as a side-channel. From Eric Dumazet.
      
       5) Memory leak in mediatek bluetooth driver, from Gustavo A. R. Silva.
      
       6) Hook up rt->dst.input of ipv6 anycast routes properly, from Hangbin
          Liu.
      
       7) hns and hns3 bug fixes from Huazhong Tan.
      
       8) Fix RIF leak in mlxsw driver, from Ido Schimmel.
      
       9) iova range check fix in vhost, from Jason Wang.
      
      10) Fix hang in do_tcp_sendpages() with tls, from John Fastabend.
      
      11) More r8152 chips need to disable RX aggregation, from Kai-Heng Feng.
      
      12) Memory exposure in TCA_U32_SEL handling, from Kees Cook.
      
      13) TCP BBR congestion control fixes from Kevin Yang.
      
      14) hv_netvsc, ignore non-PCI devices, from Stephen Hemminger.
      
      15) qed driver fixes from Tomer Tayar.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (77 commits)
        net: sched: Fix memory exposure from short TCA_U32_SEL
        qed: fix spelling mistake "comparsion" -> "comparison"
        vhost: correctly check the iova range when waking virtqueue
        qlge: Fix netdev features configuration.
        net: macb: do not disable MDIO bus at open/close time
        Revert "net: stmmac: fix build failure due to missing COMMON_CLK dependency"
        net: macb: Fix regression breaking non-MDIO fixed-link PHYs
        mlxsw: spectrum_switchdev: Do not leak RIFs when removing bridge
        i40e: fix condition of WARN_ONCE for stat strings
        i40e: Fix for Tx timeouts when interface is brought up if DCB is enabled
        ixgbe: fix driver behaviour after issuing VFLR
        ixgbe: Prevent unsupported configurations with XDP
        ixgbe: Replace GFP_ATOMIC with GFP_KERNEL
        igb: Replace mdelay() with msleep() in igb_integrated_phy_loopback()
        igb: Replace GFP_ATOMIC with GFP_KERNEL in igb_sw_init()
        igb: Use an advanced ctx descriptor for launchtime
        e1000: ensure to free old tx/rx rings in set_ringparam()
        e1000: check on netif_running() before calling e1000_up()
        ixgb: use dma_zalloc_coherent instead of allocator/memset
        ice: Trivial formatting fixes
        ...
      050cdc6c
    • Masahiro Yamada's avatar
      mtd: rawnand: denali: do not pass zero maxchips to nand_scan() · 336d139f
      Masahiro Yamada authored
      Commit 49aa76b1 ("mtd: rawnand: do not execute nand_scan_ident()
      if maxchips is zero") gave a new meaning for calling nand_scan_ident()
      with maxchips=0.
      
      It is a special usage for some drivers such as docg4, but actually
      the Denali driver may pass maxchips=0 to nand_scan() when the driver
      is enabled but no NAND chip is found on the board for some reasons.
      
      If nand_scan_with_ids() is called with maxchips=0, nand_scan_ident()
      is skipped, then nand_set_defaults() is skipped as well.  Thus, the
      driver must set chip->controller beforehand.  Otherwise, nand_attach()
      causes NULL pointer dereference.
      
      In fact, the Denali controller knows the number of connected chips
      before calling nand_scan_ident(); if DEVICE_RESET fails, there is no
      chip in that chip select.  Then, denali_reset_banks() sets the maxchips
      to the number of detected chips.  If no chip is found, maxchips is zero.
      
      In this case, there is no point for calling nand_scan() because we know
      it will fail for sure.  Let's make the probe function fail immediately.
      
      Fixes: 49aa76b1
      
       ("mtd: rawnand: do not execute nand_scan_ident() if maxchips is zero")
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
      Signed-off-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
      336d139f
    • Jens Axboe's avatar
      Merge branch 'stable/for-jens-4.19' of... · 057d3ccf
      Jens Axboe authored
      Merge branch 'stable/for-jens-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into for-linus
      
      Pull Xen block driver fixes from Konrad:
      
      "Fix for flushing out persistent pages at a deterministic rate"
      
      * 'stable/for-jens-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        xen/blkback: remove unused pers_gnts_lock from struct xen_blkif_ring
        xen/blkback: move persistent grants flags to bool
        xen/blkfront: reorder tests in xlblk_init()
        xen/blkfront: cleanup stale persistent grants
        xen/blkback: don't keep persistent grants too long
      057d3ccf
    • Jens Axboe's avatar
      blk-wbt: improve waking of tasks · 38cfb5a4
      Jens Axboe authored
      We have two potential issues:
      
      1) After commit 2887e41b
      
      , we only wake one process at the time when
         we finish an IO. We really want to wake up as many tasks as can
         queue IO. Before this commit, we woke up everyone, which could cause
         a thundering herd issue.
      
      2) A task can potentially consume two wakeups, causing us to (in
         practice) miss a wakeup.
      
      Fix both by providing our own wakeup function, which stops
      __wake_up_common() from waking up more tasks if we fail to get a
      queueing token. With the strict ordering we have on the wait list, this
      wakes the right tasks and the right amount of tasks.
      
      Based on a patch from Jianchao Wang <jianchao.w.wang@oracle.com>.
      
      Tested-by: default avatarAgarwal, Anchal <anchalag@amazon.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      38cfb5a4
    • Jens Axboe's avatar
      blk-wbt: abstract out end IO completion handler · 061a5427
      Jens Axboe authored
      
      
      Prep patch for calling the handler from a different context,
      no functional changes in this patch.
      
      Tested-by: default avatarAgarwal, Anchal <anchalag@amazon.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      061a5427
    • Juergen Gross's avatar
      xen/blkback: remove unused pers_gnts_lock from struct xen_blkif_ring · 6f2f39ad
      Juergen Gross authored
      
      
      pers_gnts_lock isn't being used anywhere. Remove it.
      
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      Reviewed-by: default avatarRoger Pau Monné <roger.pau@citrix.com>
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      6f2f39ad
    • Juergen Gross's avatar
      xen/blkback: move persistent grants flags to bool · d77ff24e
      Juergen Gross authored
      
      
      The struct persistent_gnt flags member is meant to be a bitfield of
      different flags. There is only PERSISTENT_GNT_ACTIVE flag left, so
      convert it to a bool named "active".
      
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      Reviewed-by: default avatarRoger Pau Monné <roger.pau@citrix.com>
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      d77ff24e
    • Juergen Gross's avatar
      xen/blkfront: reorder tests in xlblk_init() · 4bcddbae
      Juergen Gross authored
      
      
      In case we don't want pv block devices we should not test parameters
      for sanity and eventually print out error messages. So test precluding
      conditions before checking parameters.
      
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      Reviewed-by: default avatarRoger Pau Monné <roger.pau@citrix.com>
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      4bcddbae
    • Juergen Gross's avatar
      xen/blkfront: cleanup stale persistent grants · a46b5367
      Juergen Gross authored
      
      
      Add a periodic cleanup function to remove old persistent grants which
      are no longer in use on the backend side. This avoids starvation in
      case there are lots of persistent grants for a device which no longer
      is involved in I/O business.
      
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      Reviewed-by: default avatarRoger Pau Monné <roger.pau@citrix.com>
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      a46b5367
    • Juergen Gross's avatar
      xen/blkback: don't keep persistent grants too long · 973e5405
      Juergen Gross authored
      
      
      Persistent grants are allocated until a threshold per ring is being
      reached. Those grants won't be freed until the ring is being destroyed
      meaning there will be resources kept busy which might no longer be
      used.
      
      Instead of freeing only persistent grants until the threshold is
      reached add a timestamp and remove all persistent grants not having
      been in use for a minute.
      
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      Reviewed-by: default avatarRoger Pau Monné <roger.pau@citrix.com>
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      973e5405
  5. Aug 27, 2018