<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/block, branch mybooklive-amatus</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/block?h=mybooklive-amatus</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/block?h=mybooklive-amatus'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-07-23T22:10:54Z</updated>
<entry>
<title>zram: avoid lockdep splat by revalidate_disk</title>
<updated>2014-07-23T22:10:54Z</updated>
<author>
<name>Minchan Kim</name>
<email>minchan@kernel.org</email>
</author>
<published>2014-07-23T21:00:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b4c5c60920e3b0c4598f43e7317559f6aec51531'/>
<id>urn:sha1:b4c5c60920e3b0c4598f43e7317559f6aec51531</id>
<content type='text'>
Sasha reported lockdep warning [1] introduced by [2].

It could be fixed by doing disk revalidation out of the init_lock.  It's
okay because disk capacity change is protected by init_lock so that
revalidate_disk always sees up-to-date value so there is no race.

[1] https://lkml.org/lkml/2014/7/3/735
[2] zram: revalidate disk after capacity change

Fixes 2e32baea46ce ("zram: revalidate disk after capacity change").

Signed-off-by: Minchan Kim &lt;minchan@kernel.org&gt;
Reported-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Cc: "Alexander E. Patrakov" &lt;patrakov@gmail.com&gt;
Cc: Nitin Gupta &lt;ngupta@vflare.org&gt;
Cc: Jerome Marchand &lt;jmarchan@redhat.com&gt;
Cc: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;
CC: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>drbd: fix regression 'out of mem, failed to invoke fence-peer helper'</title>
<updated>2014-07-10T09:06:03Z</updated>
<author>
<name>Lars Ellenberg</name>
<email>lars.ellenberg@linbit.com</email>
</author>
<published>2014-07-09T19:18:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bbc1c5e8ad6dfebf9d13b8a4ccdf66c92913eac9'/>
<id>urn:sha1:bbc1c5e8ad6dfebf9d13b8a4ccdf66c92913eac9</id>
<content type='text'>
Since linux kernel 3.13, kthread_run() internally uses
wait_for_completion_killable().  We sometimes may use kthread_run()
while we still have a signal pending, which we used to kick our threads
out of potentially blocking network functions, causing kthread_run() to
mistake that as a new fatal signal and fail.

Fix: flush_signals() before kthread_run().

Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>zram: revalidate disk after capacity change</title>
<updated>2014-07-03T16:21:53Z</updated>
<author>
<name>Minchan Kim</name>
<email>minchan@kernel.org</email>
</author>
<published>2014-07-02T22:22:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2e32baea46ce542c561a519414c840295b229c8f'/>
<id>urn:sha1:2e32baea46ce542c561a519414c840295b229c8f</id>
<content type='text'>
Alexander reported mkswap on /dev/zram0 is failed if other process is
opening the block device file.

Step is as follows,

0. Reset the unused zram device.
1. Use a program that opens /dev/zram0 with O_RDWR and sleeps
   until killed.
2. While that program sleeps, echo the correct value to
   /sys/block/zram0/disksize.
3. Verify (e.g. in /proc/partitions) that the disk size is applied
   correctly. It is.
4. While that program still sleeps, attempt to mkswap /dev/zram0.
   This fails: mkswap: error: swap area needs to be at least 40 KiB

When I investigated, the size get by ioctl(fd, BLKGETSIZE64, xxx) on
mkswap to get a size of blockdev was zero although zram0 has right size by
2.

The reason is zram didn't revalidate disk after changing capacity so that
size of blockdev's inode is not uptodate until all of file is close.

This patch should fix the BUG.

Signed-off-by: Minchan Kim &lt;minchan@kernel.org&gt;
Reported-by: Alexander E. Patrakov &lt;patrakov@gmail.com&gt;
Tested-by: Alexander E. Patrakov &lt;patrakov@gmail.com&gt;
Reviewed-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;
Cc: Nitin Gupta &lt;ngupta@vflare.org&gt;
Acked-by: Jerome Marchand &lt;jmarchan@redhat.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.dk/linux-block</title>
<updated>2014-06-26T20:06:13Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-06-26T20:06:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3493860c76eb4e5b222f1016d1458615afac9fc4'/>
<id>urn:sha1:3493860c76eb4e5b222f1016d1458615afac9fc4</id>
<content type='text'>
Pull block fixes from Jens Axboe:
 "A small collection of fixes/changes for the current series.  This
  contains:

   - Removal of dead code from Gu Zheng.

   - Revert of two bad fixes that went in earlier in this round, marking
     things as __init that were not purely used from init.

   - A fix for blk_mq_start_hw_queue() using the __blk_mq_run_hw_queue(),
     which could place us wrongly.  Make it use the non __ variant,
     which handles cases where we are called from the wrong CPU set.
     From me.

   - A fix for drbd, which allocates discard requests without room for
     the SCSI payload.  From Lars Ellenberg.

   - A fix for user-after-free in the blkcg code from Tejun.

   - Addition of limiting gaps in SG lists, if the hardware needs it.
     This is the last pre-req patch for blk-mq to enable the full NVMe
     conversion.  Could wait until 3.17, but it's simple enough so would
     be nice to have everything we need for the NVMe port in the 3.17
     release.  From me"

* 'for-linus' of git://git.kernel.dk/linux-block:
  drbd: fix NULL pointer deref in blk_add_request_payload
  blk-mq: blk_mq_start_hw_queue() should use blk_mq_run_hw_queue()
  block: add support for limiting gaps in SG lists
  bio: remove unused macro bip_vec_idx()
  Revert "block: add __init to elv_register"
  Revert "block: add __init to blkcg_policy_register"
  blkcg: fix use-after-free in __blkg_release_rcu() by making blkcg_gq refcnt an atomic_t
  floppy: format block0 read error message properly
</content>
</entry>
<entry>
<title>drbd: fix NULL pointer deref in blk_add_request_payload</title>
<updated>2014-06-25T15:53:47Z</updated>
<author>
<name>Lars Ellenberg</name>
<email>lars.ellenberg@linbit.com</email>
</author>
<published>2014-06-25T15:52:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=54ed4ed8f9a5071a3bbae2e037376d8c02b9629b'/>
<id>urn:sha1:54ed4ed8f9a5071a3bbae2e037376d8c02b9629b</id>
<content type='text'>
Discards don't have any payload.
But the scsi layer still expects a bio_vec it can use internally,
see sd_setup_discard_cmnd() and blk_add_request_payload().

Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>rbd: handle parent_overlap on writes correctly</title>
<updated>2014-06-23T08:55:37Z</updated>
<author>
<name>Ilya Dryomov</name>
<email>ilya.dryomov@inktank.com</email>
</author>
<published>2014-06-10T09:53:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9638556a276125553549fdfe349c464481ec2f39'/>
<id>urn:sha1:9638556a276125553549fdfe349c464481ec2f39</id>
<content type='text'>
The following check in rbd_img_obj_request_submit()

    rbd_dev-&gt;parent_overlap &lt;= obj_request-&gt;img_offset

allows the fall through to the non-layered write case even if both
parent_overlap and obj_request-&gt;img_offset belong to the same RADOS
object.  This leads to data corruption, because the area to the left of
parent_overlap ends up unconditionally zero-filled instead of being
populated with parent data.  Suppose we want to write 1M to offset 6M
of image bar, which is a clone of foo@snap; object_size is 4M,
parent_overlap is 5M:

    rbd_data.&lt;id&gt;.0000000000000001
     ---------------------|----------------------|------------
    | should be copyup'ed | should be zeroed out | write ...
     ---------------------|----------------------|------------
   4M                    5M                     6M
                    parent_overlap    obj_request-&gt;img_offset

4..5M should be copyup'ed from foo, yet it is zero-filled, just like
5..6M is.

Given that the only striping mode kernel client currently supports is
chunking (i.e. stripe_unit == object_size, stripe_count == 1), round
parent_overlap up to the next object boundary for the purposes of the
overlap check.

Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Ilya Dryomov &lt;ilya.dryomov@inktank.com&gt;
Reviewed-by: Josh Durgin &lt;josh.durgin@inktank.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.dk/linux-block</title>
<updated>2014-06-20T03:56:43Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-06-20T03:56:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f1d702487b3bc16466ad9b4e5c76277b6829d34c'/>
<id>urn:sha1:f1d702487b3bc16466ad9b4e5c76277b6829d34c</id>
<content type='text'>
Pull block fixes from Jens Axboe:
 "A smaller collection of fixes for the block core that would be nice to
  have in -rc2.  This pull request contains:

   - Fixes for races in the wait/wakeup logic used in blk-mq from
     Alexander.  No issues have been observed, but it is definitely a
     bit flakey currently.  Alternatively, we may drop the cyclic
     wakeups going forward, but that needs more testing.

   - Some cleanups from Christoph.

   - Fix for an oops in null_blk if queue_mode=1 and softirq completions
     are used.  From me.

   - A fix for a regression caused by the chunk size setting.  It
     inadvertently used max_hw_sectors instead of max_sectors, which is
     incorrect, and causes hangs on btrfs multi-disk setups (where hw
     sectors apparently isn't set).  From me.

   - Removal of WQ_POWER_EFFICIENT in the kblockd creation.  This was a
     recent addition as well, but it actually breaks blk-mq which relies
     on strict scheduling.  If the workqueue power_efficient mode is
     turned on, this breaks blk-mq.  From Matias.

   - null_blk module parameter description fix from Mike"

* 'for-linus' of git://git.kernel.dk/linux-block:
  blk-mq: bitmap tag: fix races in bt_get() function
  blk-mq: bitmap tag: fix race on blk_mq_bitmap_tags::wake_cnt
  blk-mq: bitmap tag: fix races on shared ::wake_index fields
  block: blk_max_size_offset() should check -&gt;max_sectors
  null_blk: fix softirq completions for queue_mode == 1
  blk-mq: merge blk_mq_drain_queue and __blk_mq_drain_queue
  blk-mq: properly drain stopped queues
  block: remove WQ_POWER_EFFICIENT from kblockd
  null_blk: fix name and description of 'queue_mode' module parameter
  block: remove elv_abort_queue and blk_abort_flushes
</content>
</entry>
<entry>
<title>Merge branch 'for-jens' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/linux-block into for-linus</title>
<updated>2014-06-18T17:30:22Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@fb.com</email>
</author>
<published>2014-06-18T17:30:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e64d4687730cf47bd0c59e9ed76b52ca0c0f44c0'/>
<id>urn:sha1:e64d4687730cf47bd0c59e9ed76b52ca0c0f44c0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>floppy: format block0 read error message properly</title>
<updated>2014-06-18T11:44:18Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2014-06-18T11:44:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1c65df3d7b1b311a73f5636a4ad6611f067baf1e'/>
<id>urn:sha1:1c65df3d7b1b311a73f5636a4ad6611f067baf1e</id>
<content type='text'>
In case reading of block 0 fails, line without trailing newline
is printed causing dmesg to look horrible.

Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>null_blk: fix softirq completions for queue_mode == 1</title>
<updated>2014-06-16T17:40:25Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@fb.com</email>
</author>
<published>2014-06-16T17:40:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d891fa70876b37941a5c5bed813e73beb53ebcf7'/>
<id>urn:sha1:d891fa70876b37941a5c5bed813e73beb53ebcf7</id>
<content type='text'>
Only blk-mq completions have payload attached to the request, for
request_fn mode we have stored it in req-&gt;special. This fixes an
oops with queue_mode=1 and softirq completions.

Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
</feed>
