1. 26 Mar, 2021 13 commits
  2. 22 Mar, 2021 3 commits
    • Mikulas Patocka's avatar
      dm: don't report "detected capacity change" on device creation · 5424a0b8
      Mikulas Patocka authored
      When a DM device is first created it doesn't yet have an established
      capacity, therefore the use of set_capacity_and_notify() should be
      conditional given the potential for needless pr_info "detected
      capacity change" noise even if capacity is 0.
      
      One could argue that the pr_info() in set_capacity_and_notify() is
      misplaced, but that position is not held uniformly.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Fixes: f64d9b2e ("dm: use set_capacity_and_notify")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      5424a0b8
    • Shin'ichiro Kawasaki's avatar
      dm table: Fix zoned model check and zone sectors check · 2d669ceb
      Shin'ichiro Kawasaki authored
      Commit 24f6b603 ("dm table: fix zoned iterate_devices based device
      capability checks") triggered dm table load failure when dm-zoned device
      is set up for zoned block devices and a regular device for cache.
      
      The commit inverted logic of two callback functions for iterate_devices:
      device_is_zoned_model() and device_matches_zone_sectors(). The logic of
      device_is_zoned_model() was inverted then all destination devices of all
      targets in dm table are required to have the expected zoned model. This
      is fine for dm-linear, dm-flakey and dm-crypt on zoned block devices
      since each target has only one destination device. However, this results
      in failure for dm-zoned with regular cache device since that target has
      both regular block device and zoned block devices.
      
      As for device_matches_zone_sectors(), the commit inverted the logic to
      require all zoned block devices in each target have the specified
      zone_sectors. This check also fails for regular block device which does
      not have zones.
      
      To avoid the check failures, fix the zone model check and the zone
      sectors check. For zone model check, introduce the new feature flag
      DM_TARGET_MIXED_ZONED_MODEL, and set it to dm-zoned target. When the
      target has this flag, allow it to have destination devices with any
      zoned model. For zone sectors check, skip the check if the destination
      device is not a zoned block device. Also add comments and improve an
      error message to clarify expectations to the two checks.
      
      Fixes: 24f6b603 ("dm table: fix zoned iterate_devices based device capability checks")
      Signed-off-by: default avatarShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      2d669ceb
    • JeongHyeon Lee's avatar
      dm verity: fix DM_VERITY_OPTS_MAX value · 160f99db
      JeongHyeon Lee authored
      Three optional parameters must be accepted at once in a DM verity table, e.g.:
        (verity_error_handling_mode) (ignore_zero_block) (check_at_most_once)
      Fix this to be possible by incrementing DM_VERITY_OPTS_MAX.
      Signed-off-by: default avatarJeongHyeon Lee <jhs2.lee@samsung.com>
      Fixes: 843f38d3 ("dm verity: add 'check_at_most_once' option to only validate hashes once")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      160f99db
  3. 21 Mar, 2021 23 commits
  4. 20 Mar, 2021 1 commit
    • Thomas Gleixner's avatar
      genirq: Disable interrupts for force threaded handlers · 81e2073c
      Thomas Gleixner authored
      With interrupt force threading all device interrupt handlers are invoked
      from kernel threads. Contrary to hard interrupt context the invocation only
      disables bottom halfs, but not interrupts. This was an oversight back then
      because any code like this will have an issue:
      
      thread(irq_A)
        irq_handler(A)
          spin_lock(&foo->lock);
      
      interrupt(irq_B)
        irq_handler(B)
          spin_lock(&foo->lock);
      
      This has been triggered with networking (NAPI vs. hrtimers) and console
      drivers where printk() happens from an interrupt which interrupted the
      force threaded handler.
      
      Now people noticed and started to change the spin_lock() in the handler to
      spin_lock_irqsave() which affects performance or add IRQF_NOTHREAD to the
      interrupt request which in turn breaks RT.
      
      Fix the root cause and not the symptom and disable interrupts before
      invoking the force threaded handler which preserves the regular semantics
      and the usefulness of the interrupt force threading as a general debugging
      tool.
      
      For not RT this is not changing much, except that during the execution of
      the threaded handler interrupts are delayed until the handler
      returns. Vs. scheduling and softirq processing there is no difference.
      
      For RT kernels there is no issue.
      
      Fixes: 8d32a307 ("genirq: Provide forced interrupt threading")
      Reported-by: default avatarJohan Hovold <johan@kernel.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarJohan Hovold <johan@kernel.org>
      Acked-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Link: https://lore.kernel.org/r/20210317143859.513307808@linutronix.de
      81e2073c