<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/block, branch v5.10</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.10</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.10'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-12-09T09:31:37Z</updated>
<entry>
<title>xen: add helpers for caching grant mapping pages</title>
<updated>2020-12-09T09:31:37Z</updated>
<author>
<name>Juergen Gross</name>
<email>jgross@suse.com</email>
</author>
<published>2020-12-07T07:31:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ca33479cc7be2c9b5f8be078c8bf3ac26b7d6186'/>
<id>urn:sha1:ca33479cc7be2c9b5f8be078c8bf3ac26b7d6186</id>
<content type='text'>
Instead of having similar helpers in multiple backend drivers use
common helpers for caching pages allocated via gnttab_alloc_pages().

Make use of those helpers in blkback and scsiback.

Cc: &lt;stable@vger.kernel.org&gt; # 5.9
Signed-off-by: Juergen Gross &lt;jgross@suse.com&gt;
Reviewed-by: Boris Ostrovsky &lt;boris.ostrovksy@oracle.com&gt;
Signed-off-by: Juergen Gross &lt;jgross@suse.com&gt;
</content>
</entry>
<entry>
<title>loop: Fix occasional uevent drop</title>
<updated>2020-11-12T20:59:04Z</updated>
<author>
<name>Petr Vorel</name>
<email>pvorel@suse.cz</email>
</author>
<published>2020-11-12T16:50:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c01a21b77722db0474bbcc4eafc8c4e0d8fed6d8'/>
<id>urn:sha1:c01a21b77722db0474bbcc4eafc8c4e0d8fed6d8</id>
<content type='text'>
Commit 716ad0986cbd ("loop: Switch to set_capacity_revalidate_and_notify")
causes an occasional drop of loop device uevent, which are no longer
triggered in loop_set_size() but in a different part of code.

Bug is reproducible with LTP test uevent01 [1]:

i=0; while true; do
    i=$((i+1)); echo "== $i =="
    lsmod |grep -q loop &amp;&amp; rmmod -f loop
    ./uevent01 || break
done

Put back triggering through code called in loop_set_size().

Fix required to add yet another parameter to
set_capacity_revalidate_and_notify().

[1] https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/uevents/uevent01.c

[hch: rebased on a different change to the prototype of
 set_capacity_revalidate_and_notify]

Cc: stable@vger.kernel.org # v5.9
Fixes: 716ad0986cbd ("loop: Switch to set_capacity_revalidate_and_notify")
Reported-by: &lt;ltp@lists.linux.it&gt;
Signed-off-by: Petr Vorel &lt;pvorel@suse.cz&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>nbd: fix a block_device refcount leak in nbd_release</title>
<updated>2020-11-10T15:01:28Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2020-11-09T17:30:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2bd645b2d3f0bacadaa6037f067538e1cd4e42ef'/>
<id>urn:sha1:2bd645b2d3f0bacadaa6037f067538e1cd4e42ef</id>
<content type='text'>
bdget_disk needs to be paired with bdput to not leak a reference
on the block device inode.

Fixes: 08ba91ee6e2c ("nbd: Add the nbd NBD_DISCONNECT_ON_CLOSE config flag.")
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Josef Bacik &lt;josef@toxicpanda.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>null_blk: Fix scheduling in atomic with zoned mode</title>
<updated>2020-11-06T16:36:42Z</updated>
<author>
<name>Damien Le Moal</name>
<email>damien.lemoal@wdc.com</email>
</author>
<published>2020-11-06T11:01:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e1777d099728a76a8f8090f89649aac961e7e530'/>
<id>urn:sha1:e1777d099728a76a8f8090f89649aac961e7e530</id>
<content type='text'>
Commit aa1c09cb65e2 ("null_blk: Fix locking in zoned mode") changed
zone locking to using the potentially sleeping wait_on_bit_io()
function. This is acceptable when memory backing is enabled as the
device queue is in that case marked as blocking, but this triggers a
scheduling while in atomic context with memory backing disabled.

Fix this by relying solely on the device zone spinlock for zone
information protection without temporarily releasing this lock around
null_process_cmd() execution in null_zone_write(). This is OK to do
since when memory backing is disabled, command processing does not
block and the memory backing lock nullb-&gt;lock is unused. This solution
avoids the overhead of having to mark a zoned null_blk device queue as
blocking when memory backing is unused.

This patch also adds comments to the zone locking code to explain the
unusual locking scheme.

Fixes: aa1c09cb65e2 ("null_blk: Fix locking in zoned mode")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Damien Le Moal &lt;damien.lemoal@wdc.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>xsysace: use platform_get_resource() and platform_get_irq_optional()</title>
<updated>2020-10-29T14:22:33Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2020-10-27T17:11:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7cb6e22ba011c2dc1e94cc0dc94d9ef199715ed9'/>
<id>urn:sha1:7cb6e22ba011c2dc1e94cc0dc94d9ef199715ed9</id>
<content type='text'>
Use platform_get_resource() to fetch the memory resource and
platform_get_irq_optional() to get optional IRQ instead of
open-coded variants.

IRQ is not supposed to be changed at runtime, so there is
no functional change in ace_fsm_yieldirq().

On the other hand we now take first resources instead of last ones
to proceed. I can't imagine how broken should be firmware to have
a garbage in the first resource slots. But if it the case, it needs
to be documented.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Acked-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>null_blk: Fix locking in zoned mode</title>
<updated>2020-10-29T13:27:30Z</updated>
<author>
<name>Damien Le Moal</name>
<email>damien.lemoal@wdc.com</email>
</author>
<published>2020-10-29T11:05:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aa1c09cb65e2ed17cb8e652bc7ec84e0af1229eb'/>
<id>urn:sha1:aa1c09cb65e2ed17cb8e652bc7ec84e0af1229eb</id>
<content type='text'>
When the zoned mode is enabled in null_blk, Serializing read, write
and zone management operations for each zone is necessary to protect
device level information for managing zone resources (zone open and
closed counters) as well as each zone condition and write pointer
position. Commit 35bc10b2eafb ("null_blk: synchronization fix for
zoned device") introduced a spinlock to implement this serialization.
However, when memory backing is also enabled, GFP_NOIO memory
allocations are executed under the spinlock, resulting in might_sleep()
warnings. Furthermore, the zone_lock spinlock is locked/unlocked using
spin_lock_irq/spin_unlock_irq, similarly to the memory backing code with
the nullb-&gt;lock spinlock. This nested use of irq locks wrecks the irq
enabled/disabled state.

Fix all this by introducing a bitmap for per-zone lock, with locking
implemented using wait_on_bit_lock_io() and clear_and_wake_up_bit().
This locking mechanism allows keeping a zone locked while executing
null_process_cmd(), serializing all operations to the zone while
allowing to sleep during memory backing allocation with GFP_NOIO.
Device level zone resource management information is protected using
a spinlock which is not held while executing null_process_cmd();

Fixes: 35bc10b2eafb ("null_blk: synchronization fix for zoned device")
Signed-off-by: Damien Le Moal &lt;damien.lemoal@wdc.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>null_blk: Fix zone reset all tracing</title>
<updated>2020-10-29T13:27:30Z</updated>
<author>
<name>Damien Le Moal</name>
<email>damien.lemoal@wdc.com</email>
</author>
<published>2020-10-29T11:04:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f9c9104288da543cd64f186f9e2fba389f415630'/>
<id>urn:sha1:f9c9104288da543cd64f186f9e2fba389f415630</id>
<content type='text'>
In the cae of the REQ_OP_ZONE_RESET_ALL operation, the command sector is
ignored and the operation is applied to all sequential zones. For these
commands, tracing the effect of the command using the command sector to
determine the target zone is thus incorrect.

Fix null_zone_mgmt() zone condition tracing in the case of
REQ_OP_ZONE_RESET_ALL to apply tracing to all sequential zones that are
not already empty.

Fixes: 766c3297d7e1 ("null_blk: add trace in null_blk_zoned.c")
Signed-off-by: Damien Le Moal &lt;damien.lemoal@wdc.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>nbd: don't update block size after device is started</title>
<updated>2020-10-29T13:25:43Z</updated>
<author>
<name>Ming Lei</name>
<email>ming.lei@redhat.com</email>
</author>
<published>2020-10-28T07:24:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b40813ddcd6bf9f01d020804e4cb8febc480b9e4'/>
<id>urn:sha1:b40813ddcd6bf9f01d020804e4cb8febc480b9e4</id>
<content type='text'>
Mounted NBD device can be resized, one use case is rbd-nbd.

Fix the issue by setting up default block size, then not touch it
in nbd_size_update() any more. This kind of usage is aligned with loop
which has same use case too.

Cc: stable@vger.kernel.org
Fixes: c8a83a6b54d0 ("nbd: Use set_blocksize() to set device blocksize")
Reported-by: lining &lt;lining2020x@163.com&gt;
Signed-off-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Cc: Josef Bacik &lt;josef@toxicpanda.com&gt;
Cc: Jan Kara &lt;jack@suse.cz&gt;
Tested-by: lining &lt;lining2020x@163.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>null_blk: synchronization fix for zoned device</title>
<updated>2020-10-28T02:40:42Z</updated>
<author>
<name>Kanchan Joshi</name>
<email>joshi.k@samsung.com</email>
</author>
<published>2020-09-28T09:55:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=35bc10b2eafbb701064b94f283b77c54d3304842'/>
<id>urn:sha1:35bc10b2eafbb701064b94f283b77c54d3304842</id>
<content type='text'>
Parallel write,read,zone-mgmt operations accessing/altering zone state
and write-pointer may get into race. Avoid the situation by using a new
spinlock for zoned device.
Concurrent zone-appends (on a zone) returning same write-pointer issue
is also avoided using this lock.

Cc: stable@vger.kernel.org
Fixes: e0489ed5daeb ("null_blk: Support REQ_OP_ZONE_APPEND")
Signed-off-by: Kanchan Joshi &lt;joshi.k@samsung.com&gt;
Reviewed-by: Damien Le Moal &lt;damien.lemoal@wdc.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for-linus-5.10b-rc1c-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip</title>
<updated>2020-10-25T17:55:35Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2020-10-25T17:55:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bd6aabc7ca39dd28a27fe1ec99e36e941cfb8192'/>
<id>urn:sha1:bd6aabc7ca39dd28a27fe1ec99e36e941cfb8192</id>
<content type='text'>
Pull more xen updates from Juergen Gross:

 - a series for the Xen pv block drivers adding module parameters for
   better control of resource usge

 - a cleanup series for the Xen event driver

* tag 'for-linus-5.10b-rc1c-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  Documentation: add xen.fifo_events kernel parameter description
  xen/events: unmask a fifo event channel only if it was masked
  xen/events: only register debug interrupt for 2-level events
  xen/events: make struct irq_info private to events_base.c
  xen: remove no longer used functions
  xen-blkfront: Apply changed parameter name to the document
  xen-blkfront: add a parameter for disabling of persistent grants
  xen-blkback: add a parameter for disabling of persistent grants
</content>
</entry>
</feed>
