<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/block/xen-blkback/xenbus.c, branch v4.1.10</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Merge branch 'for-4.1/drivers' of git://git.kernel.dk/linux-block</title>
<updated>2015-04-17T02:05:27+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-04-17T02:05:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a39ef1a7c6093bbd4e0a8197350b99cd635e5446'/>
<id>a39ef1a7c6093bbd4e0a8197350b99cd635e5446</id>
<content type='text'>
Pull block driver updates from Jens Axboe:
 "This is the block driver pull request for 4.1.  As with the core bits,
  this is a relatively slow round.  This pull request contains:

   - Various fixes and cleanups for NVMe, from Alexey Khoroshilov, Chong
     Yuan, myself, Keith Busch, and Murali Iyer.

   - Documentation and code cleanups for nbd from Markus Pargmann.

   - Change of brd maintainer to me, from Ross Zwisler.  At least the
     email doesn't bounce anymore then.

   - Two xen-blkback fixes from Tao Chen"

* 'for-4.1/drivers' of git://git.kernel.dk/linux-block: (23 commits)
  NVMe: Meta data handling through submit io ioctl
  NVMe: Add translation for block limits
  NVMe: Remove check for null
  NVMe: Fix error handling of class_create("nvme")
  xen-blkback: define pr_fmt macro to avoid the duplication of DRV_PFX
  xen-blkback: enlarge the array size of blkback name
  nbd: Return error pointer directly
  nbd: Return error code directly
  nbd: Remove fixme that was already fixed
  nbd: Restructure debugging prints
  nbd: Fix device bytesize type
  nbd: Replace kthread_create with kthread_run
  nbd: Remove kernel internal header
  Documentation: nbd: Add list of module parameters
  Documentation: nbd: Reformat to allow more documentation
  NVMe: increase depth of admin queue
  nvme: Fix PRP list calculation for non-4k system page size
  NVMe: Fix blk-mq hot cpu notification
  NVMe: embedded iod mask cleanup
  NVMe: Freeze admin queue on device failure
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull block driver updates from Jens Axboe:
 "This is the block driver pull request for 4.1.  As with the core bits,
  this is a relatively slow round.  This pull request contains:

   - Various fixes and cleanups for NVMe, from Alexey Khoroshilov, Chong
     Yuan, myself, Keith Busch, and Murali Iyer.

   - Documentation and code cleanups for nbd from Markus Pargmann.

   - Change of brd maintainer to me, from Ross Zwisler.  At least the
     email doesn't bounce anymore then.

   - Two xen-blkback fixes from Tao Chen"

* 'for-4.1/drivers' of git://git.kernel.dk/linux-block: (23 commits)
  NVMe: Meta data handling through submit io ioctl
  NVMe: Add translation for block limits
  NVMe: Remove check for null
  NVMe: Fix error handling of class_create("nvme")
  xen-blkback: define pr_fmt macro to avoid the duplication of DRV_PFX
  xen-blkback: enlarge the array size of blkback name
  nbd: Return error pointer directly
  nbd: Return error code directly
  nbd: Remove fixme that was already fixed
  nbd: Restructure debugging prints
  nbd: Fix device bytesize type
  nbd: Replace kthread_create with kthread_run
  nbd: Remove kernel internal header
  Documentation: nbd: Add list of module parameters
  Documentation: nbd: Reformat to allow more documentation
  NVMe: increase depth of admin queue
  nvme: Fix PRP list calculation for non-4k system page size
  NVMe: Fix blk-mq hot cpu notification
  NVMe: embedded iod mask cleanup
  NVMe: Freeze admin queue on device failure
  ...
</pre>
</div>
</content>
</entry>
<entry>
<title>xenbus_client: Extend interface to support multi-page ring</title>
<updated>2015-04-15T09:56:47+00:00</updated>
<author>
<name>Wei Liu</name>
<email>wei.liu2@citrix.com</email>
</author>
<published>2015-04-03T06:44:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ccc9d90a9a8b5c4ad7e9708ec41f75ff9e98d61d'/>
<id>ccc9d90a9a8b5c4ad7e9708ec41f75ff9e98d61d</id>
<content type='text'>
Originally Xen PV drivers only use single-page ring to pass along
information. This might limit the throughput between frontend and
backend.

The patch extends Xenbus driver to support multi-page ring, which in
general should improve throughput if ring is the bottleneck. Changes to
various frontend / backend to adapt to the new interface are also
included.

Affected Xen drivers:
* blkfront/back
* netfront/back
* pcifront/back
* scsifront/back
* vtpmfront

The interface is documented, as before, in xenbus_client.c.

Signed-off-by: Wei Liu &lt;wei.liu2@citrix.com&gt;
Signed-off-by: Paul Durrant &lt;paul.durrant@citrix.com&gt;
Signed-off-by: Bob Liu &lt;bob.liu@oracle.com&gt;
Cc: Konrad Wilk &lt;konrad.wilk@oracle.com&gt;
Cc: Boris Ostrovsky &lt;boris.ostrovsky@oracle.com&gt;
Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Originally Xen PV drivers only use single-page ring to pass along
information. This might limit the throughput between frontend and
backend.

The patch extends Xenbus driver to support multi-page ring, which in
general should improve throughput if ring is the bottleneck. Changes to
various frontend / backend to adapt to the new interface are also
included.

Affected Xen drivers:
* blkfront/back
* netfront/back
* pcifront/back
* scsifront/back
* vtpmfront

The interface is documented, as before, in xenbus_client.c.

Signed-off-by: Wei Liu &lt;wei.liu2@citrix.com&gt;
Signed-off-by: Paul Durrant &lt;paul.durrant@citrix.com&gt;
Signed-off-by: Bob Liu &lt;bob.liu@oracle.com&gt;
Cc: Konrad Wilk &lt;konrad.wilk@oracle.com&gt;
Cc: Boris Ostrovsky &lt;boris.ostrovsky@oracle.com&gt;
Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xen-blkback: define pr_fmt macro to avoid the duplication of DRV_PFX</title>
<updated>2015-04-07T14:32:43+00:00</updated>
<author>
<name>Tao Chen</name>
<email>boby.chen@huawei.com</email>
</author>
<published>2015-04-01T15:04:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=77387b82d1b2bada25a7b566ab7716408fedc5e9'/>
<id>77387b82d1b2bada25a7b566ab7716408fedc5e9</id>
<content type='text'>
Define pr_fmt macro with {xen-blkback: } prefix, then remove all use
of DRV_PFX in the pr sentences. Replace all DPRINTK with pr sentences,
and get rid of DPRINTK macro. It will simplify the code.

And if the pr sentences miss a \n, add it in the end. If the DPRINTK
sentences have redundant \n, remove it. It will format the code.

These all make the readability of the code become better.

Signed-off-by: Tao Chen &lt;boby.chen@huawei.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Acked-by: Roger Pau Monné &lt;roger.pau@citrix.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Define pr_fmt macro with {xen-blkback: } prefix, then remove all use
of DRV_PFX in the pr sentences. Replace all DPRINTK with pr sentences,
and get rid of DPRINTK macro. It will simplify the code.

And if the pr sentences miss a \n, add it in the end. If the DPRINTK
sentences have redundant \n, remove it. It will format the code.

These all make the readability of the code become better.

Signed-off-by: Tao Chen &lt;boby.chen@huawei.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Acked-by: Roger Pau Monné &lt;roger.pau@citrix.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xen-blkback: enlarge the array size of blkback name</title>
<updated>2015-04-07T14:32:42+00:00</updated>
<author>
<name>Tao Chen</name>
<email>boby.chen@huawei.com</email>
</author>
<published>2015-03-27T13:15:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1375590d3e18b4d87d2f768178e93a0c8644a7dc'/>
<id>1375590d3e18b4d87d2f768178e93a0c8644a7dc</id>
<content type='text'>
The blkback name is like blkback.domid.xvd[a-z], if domid has four digits
(means larger than 1000), then the backmost xvd wouldn't be fully shown.

Define a BLKBACK_NAME_LEN macro to be 20, enlarge the array size of
blkback name, so it will be fully shown in any case.

Signed-off-by: Tao Chen &lt;boby.chen@huawei.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Acked-by: Roger Pau Monné &lt;roger.pau@citrix.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The blkback name is like blkback.domid.xvd[a-z], if domid has four digits
(means larger than 1000), then the backmost xvd wouldn't be fully shown.

Define a BLKBACK_NAME_LEN macro to be 20, enlarge the array size of
blkback name, so it will be fully shown in any case.

Signed-off-by: Tao Chen &lt;boby.chen@huawei.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Acked-by: Roger Pau Monné &lt;roger.pau@citrix.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xen-blkback: default to X86_32 ABI on x86</title>
<updated>2015-02-10T16:04:46+00:00</updated>
<author>
<name>David Vrabel</name>
<email>david.vrabel@citrix.com</email>
</author>
<published>2015-02-05T17:09:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b042a3ca949053231950a1b15f31cccca9e305f3'/>
<id>b042a3ca949053231950a1b15f31cccca9e305f3</id>
<content type='text'>
Prior to the existance of 64-bit backends using the X86_64 ABI,
frontends used the X86_32 ABI.  These old frontends do not specify the
ABI and when used with a 64-bit backend do not work.

On x86, default to the X86_32 ABI if one is not specified.  Backends
on ARM continue to default to their NATIVE ABI.

Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Acked-by: Roger Pau Monné &lt;roger.pau@citrix.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prior to the existance of 64-bit backends using the X86_64 ABI,
frontends used the X86_32 ABI.  These old frontends do not specify the
ABI and when used with a 64-bit backend do not work.

On x86, default to the X86_32 ABI if one is not specified.  Backends
on ARM continue to default to their NATIVE ABI.

Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Acked-by: Roger Pau Monné &lt;roger.pau@citrix.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'for-3.18/drivers' of git://git.kernel.dk/linux-block</title>
<updated>2014-10-18T19:12:45+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-10-18T19:12:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e75437fb9322cf0ac707046a12d78a25f9d52ccf'/>
<id>e75437fb9322cf0ac707046a12d78a25f9d52ccf</id>
<content type='text'>
Pull block layer driver update from Jens Axboe:
 "This is the block driver pull request for 3.18.  Not a lot in there
  this round, and nothing earth shattering.

   - A round of drbd fixes from the linbit team, and an improvement in
     asender performance.

   - Removal of deprecated (and unused) IRQF_DISABLED flag in rsxx and
     hd from Michael Opdenacker.

   - Disable entropy collection from flash devices by default, from Mike
     Snitzer.

   - A small collection of xen blkfront/back fixes from Roger Pau Monné
     and Vitaly Kuznetsov"

* 'for-3.18/drivers' of git://git.kernel.dk/linux-block:
  block: disable entropy contributions for nonrot devices
  xen, blkfront: factor out flush-related checks from do_blkif_request()
  xen-blkback: fix leak on grant map error path
  xen/blkback: unmap all persistent grants when frontend gets disconnected
  rsxx: Remove deprecated IRQF_DISABLED
  block: hd: remove deprecated IRQF_DISABLED
  drbd: use RB_DECLARE_CALLBACKS() to define augment callbacks
  drbd: compute the end before rb_insert_augmented()
  drbd: Add missing newline in resync progress display in /proc/drbd
  drbd: reduce lock contention in drbd_worker
  drbd: Improve asender performance
  drbd: Get rid of the WORK_PENDING macro
  drbd: Get rid of the __no_warn and __cond_lock macros
  drbd: Avoid inconsistent locking warning
  drbd: Remove superfluous newline from "resync_extents" debugfs entry.
  drbd: Use consistent names for all the bi_end_io callbacks
  drbd: Use better variable names
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull block layer driver update from Jens Axboe:
 "This is the block driver pull request for 3.18.  Not a lot in there
  this round, and nothing earth shattering.

   - A round of drbd fixes from the linbit team, and an improvement in
     asender performance.

   - Removal of deprecated (and unused) IRQF_DISABLED flag in rsxx and
     hd from Michael Opdenacker.

   - Disable entropy collection from flash devices by default, from Mike
     Snitzer.

   - A small collection of xen blkfront/back fixes from Roger Pau Monné
     and Vitaly Kuznetsov"

* 'for-3.18/drivers' of git://git.kernel.dk/linux-block:
  block: disable entropy contributions for nonrot devices
  xen, blkfront: factor out flush-related checks from do_blkif_request()
  xen-blkback: fix leak on grant map error path
  xen/blkback: unmap all persistent grants when frontend gets disconnected
  rsxx: Remove deprecated IRQF_DISABLED
  block: hd: remove deprecated IRQF_DISABLED
  drbd: use RB_DECLARE_CALLBACKS() to define augment callbacks
  drbd: compute the end before rb_insert_augmented()
  drbd: Add missing newline in resync progress display in /proc/drbd
  drbd: reduce lock contention in drbd_worker
  drbd: Improve asender performance
  drbd: Get rid of the WORK_PENDING macro
  drbd: Get rid of the __no_warn and __cond_lock macros
  drbd: Avoid inconsistent locking warning
  drbd: Remove superfluous newline from "resync_extents" debugfs entry.
  drbd: Use consistent names for all the bi_end_io callbacks
  drbd: Use better variable names
</pre>
</div>
</content>
</entry>
<entry>
<title>xen: remove DEFINE_XENBUS_DRIVER() macro</title>
<updated>2014-10-06T09:27:57+00:00</updated>
<author>
<name>David Vrabel</name>
<email>david.vrabel@citrix.com</email>
</author>
<published>2014-09-08T16:30:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=95afae481414cbdb0567bf82d5e5077c3ac9da20'/>
<id>95afae481414cbdb0567bf82d5e5077c3ac9da20</id>
<content type='text'>
The DEFINE_XENBUS_DRIVER() macro looks a bit weird and causes sparse
errors.

Replace the uses with standard structure definitions instead.  This is
similar to pci and usb device registration.

Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The DEFINE_XENBUS_DRIVER() macro looks a bit weird and causes sparse
errors.

Replace the uses with standard structure definitions instead.  This is
similar to pci and usb device registration.

Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xen/blkback: unmap all persistent grants when frontend gets disconnected</title>
<updated>2014-10-01T20:32:23+00:00</updated>
<author>
<name>Vitaly Kuznetsov</name>
<email>vkuznets@redhat.com</email>
</author>
<published>2014-09-08T13:21:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=12ea729645ace01e08f9654df155622898d3aae6'/>
<id>12ea729645ace01e08f9654df155622898d3aae6</id>
<content type='text'>
blkback does not unmap persistent grants when frontend goes to Closed
state (e.g. when blkfront module is being removed). This leads to the
following in guest's dmesg:

[  343.243825] xen:grant_table: WARNING: g.e. 0x445 still in use!
[  343.243825] xen:grant_table: WARNING: g.e. 0x42a still in use!
...

When load module -&gt; use device -&gt; unload module sequence is performed multiple times
it is possible to hit BUG() condition in blkfront module:

[  343.243825] kernel BUG at drivers/block/xen-blkfront.c:954!
[  343.243825] invalid opcode: 0000 [#1] SMP
[  343.243825] Modules linked in: xen_blkfront(-) ata_generic pata_acpi [last unloaded: xen_blkfront]
...
[  343.243825] Call Trace:
[  343.243825]  [&lt;ffffffff814111ef&gt;] ? unregister_xenbus_watch+0x16f/0x1e0
[  343.243825]  [&lt;ffffffffa0016fbf&gt;] blkfront_remove+0x3f/0x140 [xen_blkfront]
...
[  343.243825] RIP  [&lt;ffffffffa0016aae&gt;] blkif_free+0x34e/0x360 [xen_blkfront]
[  343.243825]  RSP &lt;ffff88001eb8fdc0&gt;

We don't need to keep these grants if we're disconnecting as frontend might already
forgot about them. Solve the issue by moving xen_blkbk_free_caches() call from
xen_blkif_free() to xen_blkif_disconnect().

Now we can see the following:
[  928.590893] xen:grant_table: WARNING: g.e. 0x587 still in use!
[  928.591861] xen:grant_table: WARNING: g.e. 0x372 still in use!
...
[  929.592146] xen:grant_table: freeing g.e. 0x587
[  929.597174] xen:grant_table: freeing g.e. 0x372
...

Backend does not keep persistent grants any more, reconnect works fine.

CC: stable@vger.kernel.org
Signed-off-by: Vitaly Kuznetsov &lt;vkuznets@redhat.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
blkback does not unmap persistent grants when frontend goes to Closed
state (e.g. when blkfront module is being removed). This leads to the
following in guest's dmesg:

[  343.243825] xen:grant_table: WARNING: g.e. 0x445 still in use!
[  343.243825] xen:grant_table: WARNING: g.e. 0x42a still in use!
...

When load module -&gt; use device -&gt; unload module sequence is performed multiple times
it is possible to hit BUG() condition in blkfront module:

[  343.243825] kernel BUG at drivers/block/xen-blkfront.c:954!
[  343.243825] invalid opcode: 0000 [#1] SMP
[  343.243825] Modules linked in: xen_blkfront(-) ata_generic pata_acpi [last unloaded: xen_blkfront]
...
[  343.243825] Call Trace:
[  343.243825]  [&lt;ffffffff814111ef&gt;] ? unregister_xenbus_watch+0x16f/0x1e0
[  343.243825]  [&lt;ffffffffa0016fbf&gt;] blkfront_remove+0x3f/0x140 [xen_blkfront]
...
[  343.243825] RIP  [&lt;ffffffffa0016aae&gt;] blkif_free+0x34e/0x360 [xen_blkfront]
[  343.243825]  RSP &lt;ffff88001eb8fdc0&gt;

We don't need to keep these grants if we're disconnecting as frontend might already
forgot about them. Solve the issue by moving xen_blkbk_free_caches() call from
xen_blkif_free() to xen_blkif_disconnect().

Now we can see the following:
[  928.590893] xen:grant_table: WARNING: g.e. 0x587 still in use!
[  928.591861] xen:grant_table: WARNING: g.e. 0x372 still in use!
...
[  929.592146] xen:grant_table: freeing g.e. 0x587
[  929.597174] xen:grant_table: freeing g.e. 0x372
...

Backend does not keep persistent grants any more, reconnect works fine.

CC: stable@vger.kernel.org
Signed-off-by: Vitaly Kuznetsov &lt;vkuznets@redhat.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xen-blkback: defer freeing blkif to avoid blocking xenwatch</title>
<updated>2014-05-28T18:17:32+00:00</updated>
<author>
<name>Valentin Priescu</name>
<email>priescuv@amazon.com</email>
</author>
<published>2014-05-20T20:28:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=814d04e7dfc4a9cf7e36656afe2da5c0c08dde2b'/>
<id>814d04e7dfc4a9cf7e36656afe2da5c0c08dde2b</id>
<content type='text'>
Currently xenwatch blocks in VBD disconnect, waiting for all pending I/O
requests to finish. If the VBD is attached to a hot-swappable disk, then
xenwatch can hang for a long period of time, stalling other watches.

 INFO: task xenwatch:39 blocked for more than 120 seconds.
 "echo 0 &gt; /proc/sys/kernel/hung_task_timeout_secs" disables this message.
 ffff880057f01bd0 0000000000000246 ffff880057f01ac0 ffffffff810b0782
 ffff880057f01ad0 00000000000131c0 0000000000000004 ffff880057edb040
 ffff8800344c6080 0000000000000000 ffff880058c00ba0 ffff880057edb040
 Call Trace:
 [&lt;ffffffff810b0782&gt;] ? irq_to_desc+0x12/0x20
 [&lt;ffffffff8128f761&gt;] ? list_del+0x11/0x40
 [&lt;ffffffff8147a080&gt;] ? wait_for_common+0x60/0x160
 [&lt;ffffffff8147bcef&gt;] ? _raw_spin_lock_irqsave+0x2f/0x50
 [&lt;ffffffff8147bd49&gt;] ? _raw_spin_unlock_irqrestore+0x19/0x20
 [&lt;ffffffff8147a26a&gt;] schedule+0x3a/0x60
 [&lt;ffffffffa018fe6a&gt;] xen_blkif_disconnect+0x8a/0x100 [xen_blkback]
 [&lt;ffffffff81079f70&gt;] ? wake_up_bit+0x40/0x40
 [&lt;ffffffffa018ffce&gt;] xen_blkbk_remove+0xae/0x1e0 [xen_blkback]
 [&lt;ffffffff8130b254&gt;] xenbus_dev_remove+0x44/0x90
 [&lt;ffffffff81345cb7&gt;] __device_release_driver+0x77/0xd0
 [&lt;ffffffff81346488&gt;] device_release_driver+0x28/0x40
 [&lt;ffffffff813456e8&gt;] bus_remove_device+0x78/0xe0
 [&lt;ffffffff81342c9f&gt;] device_del+0x12f/0x1a0
 [&lt;ffffffff81342d2d&gt;] device_unregister+0x1d/0x60
 [&lt;ffffffffa0190826&gt;] frontend_changed+0xa6/0x4d0 [xen_blkback]
 [&lt;ffffffffa019c252&gt;] ? frontend_changed+0x192/0x650 [xen_netback]
 [&lt;ffffffff8130ae50&gt;] ? cmp_dev+0x60/0x60
 [&lt;ffffffff81344fe4&gt;] ? bus_for_each_dev+0x94/0xa0
 [&lt;ffffffff8130b06e&gt;] xenbus_otherend_changed+0xbe/0x120
 [&lt;ffffffff8130b4cb&gt;] frontend_changed+0xb/0x10
 [&lt;ffffffff81309c82&gt;] xenwatch_thread+0xf2/0x130
 [&lt;ffffffff81079f70&gt;] ? wake_up_bit+0x40/0x40
 [&lt;ffffffff81309b90&gt;] ? xenbus_directory+0x80/0x80
 [&lt;ffffffff810799d6&gt;] kthread+0x96/0xa0
 [&lt;ffffffff81485934&gt;] kernel_thread_helper+0x4/0x10
 [&lt;ffffffff814839f3&gt;] ? int_ret_from_sys_call+0x7/0x1b
 [&lt;ffffffff8147c17c&gt;] ? retint_restore_args+0x5/0x6
 [&lt;ffffffff81485930&gt;] ? gs_change+0x13/0x13

With this patch, when there is still pending I/O, the actual disconnect
is done by the last reference holder (last pending I/O request). In this
case, xenwatch doesn't block indefinitely.

Signed-off-by: Valentin Priescu &lt;priescuv@amazon.com&gt;
Reviewed-by: Steven Kady &lt;stevkady@amazon.com&gt;
Reviewed-by: Steven Noonan &lt;snoonan@amazon.com&gt;
Reviewed-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently xenwatch blocks in VBD disconnect, waiting for all pending I/O
requests to finish. If the VBD is attached to a hot-swappable disk, then
xenwatch can hang for a long period of time, stalling other watches.

 INFO: task xenwatch:39 blocked for more than 120 seconds.
 "echo 0 &gt; /proc/sys/kernel/hung_task_timeout_secs" disables this message.
 ffff880057f01bd0 0000000000000246 ffff880057f01ac0 ffffffff810b0782
 ffff880057f01ad0 00000000000131c0 0000000000000004 ffff880057edb040
 ffff8800344c6080 0000000000000000 ffff880058c00ba0 ffff880057edb040
 Call Trace:
 [&lt;ffffffff810b0782&gt;] ? irq_to_desc+0x12/0x20
 [&lt;ffffffff8128f761&gt;] ? list_del+0x11/0x40
 [&lt;ffffffff8147a080&gt;] ? wait_for_common+0x60/0x160
 [&lt;ffffffff8147bcef&gt;] ? _raw_spin_lock_irqsave+0x2f/0x50
 [&lt;ffffffff8147bd49&gt;] ? _raw_spin_unlock_irqrestore+0x19/0x20
 [&lt;ffffffff8147a26a&gt;] schedule+0x3a/0x60
 [&lt;ffffffffa018fe6a&gt;] xen_blkif_disconnect+0x8a/0x100 [xen_blkback]
 [&lt;ffffffff81079f70&gt;] ? wake_up_bit+0x40/0x40
 [&lt;ffffffffa018ffce&gt;] xen_blkbk_remove+0xae/0x1e0 [xen_blkback]
 [&lt;ffffffff8130b254&gt;] xenbus_dev_remove+0x44/0x90
 [&lt;ffffffff81345cb7&gt;] __device_release_driver+0x77/0xd0
 [&lt;ffffffff81346488&gt;] device_release_driver+0x28/0x40
 [&lt;ffffffff813456e8&gt;] bus_remove_device+0x78/0xe0
 [&lt;ffffffff81342c9f&gt;] device_del+0x12f/0x1a0
 [&lt;ffffffff81342d2d&gt;] device_unregister+0x1d/0x60
 [&lt;ffffffffa0190826&gt;] frontend_changed+0xa6/0x4d0 [xen_blkback]
 [&lt;ffffffffa019c252&gt;] ? frontend_changed+0x192/0x650 [xen_netback]
 [&lt;ffffffff8130ae50&gt;] ? cmp_dev+0x60/0x60
 [&lt;ffffffff81344fe4&gt;] ? bus_for_each_dev+0x94/0xa0
 [&lt;ffffffff8130b06e&gt;] xenbus_otherend_changed+0xbe/0x120
 [&lt;ffffffff8130b4cb&gt;] frontend_changed+0xb/0x10
 [&lt;ffffffff81309c82&gt;] xenwatch_thread+0xf2/0x130
 [&lt;ffffffff81079f70&gt;] ? wake_up_bit+0x40/0x40
 [&lt;ffffffff81309b90&gt;] ? xenbus_directory+0x80/0x80
 [&lt;ffffffff810799d6&gt;] kthread+0x96/0xa0
 [&lt;ffffffff81485934&gt;] kernel_thread_helper+0x4/0x10
 [&lt;ffffffff814839f3&gt;] ? int_ret_from_sys_call+0x7/0x1b
 [&lt;ffffffff8147c17c&gt;] ? retint_restore_args+0x5/0x6
 [&lt;ffffffff81485930&gt;] ? gs_change+0x13/0x13

With this patch, when there is still pending I/O, the actual disconnect
is done by the last reference holder (last pending I/O request). In this
case, xenwatch doesn't block indefinitely.

Signed-off-by: Valentin Priescu &lt;priescuv@amazon.com&gt;
Reviewed-by: Steven Kady &lt;stevkady@amazon.com&gt;
Reviewed-by: Steven Noonan &lt;snoonan@amazon.com&gt;
Reviewed-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xen/blkback: disable discard feature if requested by toolstack</title>
<updated>2014-05-28T18:17:28+00:00</updated>
<author>
<name>Olaf Hering</name>
<email>olaf@aepfle.de</email>
</author>
<published>2014-05-21T14:32:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c926b701fede80ecd6f68887d5485bb620758721'/>
<id>c926b701fede80ecd6f68887d5485bb620758721</id>
<content type='text'>
Newer toolstacks may provide a boolean property "discard-enable" in the
backend node. Its purpose is to disable discard for file backed storage
to avoid fragmentation. Recognize this setting also for physical
storage.  If that property exists and is false, do not advertise
"feature-discard" to the frontend.

Signed-off-by: Olaf Hering &lt;olaf@aepfle.de&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Newer toolstacks may provide a boolean property "discard-enable" in the
backend node. Its purpose is to disable discard for file backed storage
to avoid fragmentation. Recognize this setting also for physical
storage.  If that property exists and is false, do not advertise
"feature-discard" to the frontend.

Signed-off-by: Olaf Hering &lt;olaf@aepfle.de&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
