<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/block, branch v3.4.43</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/block?h=v3.4.43</id>
<link rel='self' href='https://git.amat.us/linux/atom/block?h=v3.4.43'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-04-12T16:38:46Z</updated>
<entry>
<title>block: avoid using uninitialized value in from queue_var_store</title>
<updated>2013-04-12T16:38:46Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2013-04-03T19:53:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2570f532003a1e9b955799e3c48041e08e9a189e'/>
<id>urn:sha1:2570f532003a1e9b955799e3c48041e08e9a189e</id>
<content type='text'>
commit c678ef5286ddb5cf70384ad5af286b0afc9b73e1 upstream.

As found by gcc-4.8, the QUEUE_SYSFS_BIT_FNS macro creates functions
that use a value generated by queue_var_store independent of whether
that value was set or not.

block/blk-sysfs.c: In function 'queue_store_nonrot':
block/blk-sysfs.c:244:385: warning: 'val' may be used uninitialized in this function [-Wmaybe-uninitialized]

Unlike most other such warnings, this one is not a false positive,
writing any non-number string into the sysfs files indeed has
an undefined result, rather than returning an error.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>block: fix synchronization and limit check in blk_alloc_devt()</title>
<updated>2013-03-03T22:06:41Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2013-02-28T01:03:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=303ee54c72f488b90c2355977c1619a08db6ed9c'/>
<id>urn:sha1:303ee54c72f488b90c2355977c1619a08db6ed9c</id>
<content type='text'>
commit ce23bba842aee98092225d9576dba47c82352521 upstream.

idr allocation in blk_alloc_devt() wasn't synchronized against lookup
and removal, and its limit check was off by one - 1 &lt;&lt; MINORBITS is
the number of minors allowed, not the maximum allowed minor.

Add locking and rename MAX_EXT_DEVT to NR_EXT_DEVT and fix limit
checking.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>block: fix ext_devt_idr handling</title>
<updated>2013-03-03T22:06:40Z</updated>
<author>
<name>Tomas Henzl</name>
<email>thenzl@redhat.com</email>
</author>
<published>2013-02-28T01:03:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6ee1df3bff435d169d0ab93420bd02b4f9392e66'/>
<id>urn:sha1:6ee1df3bff435d169d0ab93420bd02b4f9392e66</id>
<content type='text'>
commit 7b74e912785a11572da43292786ed07ada7e3e0c upstream.

While adding and removing a lot of disks disks and partitions this
sometimes shows up:

  WARNING: at fs/sysfs/dir.c:512 sysfs_add_one+0xc9/0x130() (Not tainted)
  Hardware name:
  sysfs: cannot create duplicate filename '/dev/block/259:751'
  Modules linked in: raid1 autofs4 bnx2fc cnic uio fcoe libfcoe libfc 8021q scsi_transport_fc scsi_tgt garp stp llc sunrpc cpufreq_ondemand powernow_k8 freq_table mperf ipv6 dm_mirror dm_region_hash dm_log power_meter microcode dcdbas serio_raw amd64_edac_mod edac_core edac_mce_amd i2c_piix4 i2c_core k10temp bnx2 sg ixgbe dca mdio ext4 mbcache jbd2 dm_round_robin sr_mod cdrom sd_mod crc_t10dif ata_generic pata_acpi pata_atiixp ahci mptsas mptscsih mptbase scsi_transport_sas dm_multipath dm_mod [last unloaded: scsi_wait_scan]
  Pid: 44103, comm: async/16 Not tainted 2.6.32-195.el6.x86_64 #1
  Call Trace:
    warn_slowpath_common+0x87/0xc0
    warn_slowpath_fmt+0x46/0x50
    sysfs_add_one+0xc9/0x130
    sysfs_do_create_link+0x12b/0x170
    sysfs_create_link+0x13/0x20
    device_add+0x317/0x650
    idr_get_new+0x13/0x50
    add_partition+0x21c/0x390
    rescan_partitions+0x32b/0x470
    sd_open+0x81/0x1f0 [sd_mod]
    __blkdev_get+0x1b6/0x3c0
    blkdev_get+0x10/0x20
    register_disk+0x155/0x170
    add_disk+0xa6/0x160
    sd_probe_async+0x13b/0x210 [sd_mod]
    add_wait_queue+0x46/0x60
    async_thread+0x102/0x250
    default_wake_function+0x0/0x20
    async_thread+0x0/0x250
    kthread+0x96/0xa0
    child_rip+0xa/0x20
    kthread+0x0/0xa0
    child_rip+0x0/0x20

This most likely happens because dev_t is freed while the number is
still used and idr_get_new() is not protected on every use.  The fix
adds a mutex where it wasn't before and moves the dev_t free function so
it is called after device del.

Signed-off-by: Tomas Henzl &lt;thenzl@redhat.com&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>scsi: Silence unnecessary warnings about ioctl to partition</title>
<updated>2012-12-03T19:47:11Z</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2012-06-15T10:52:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5042a551a4805f73c82b5fba0a3c4cc2e372665c'/>
<id>urn:sha1:5042a551a4805f73c82b5fba0a3c4cc2e372665c</id>
<content type='text'>
commit 6d9359280753d2955f86d6411047516a9431eb51 upstream.

Sometimes, warnings about ioctls to partition happen often enough that they
form majority of the warnings in the kernel log and users complain. In some
cases warnings are about ioctls such as SG_IO so it's not good to get rid of
the warnings completely as they can ease debugging of userspace problems
when ioctl is refused.

Since I have seen warnings from lots of commands, including some proprietary
userspace applications, I don't think disallowing the ioctls for processes
with CAP_SYS_RAWIO will happen in the near future if ever. So lets just
stop warning for processes with CAP_SYS_RAWIO for which ioctl is allowed.

Acked-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
CC: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
CC: James Bottomley &lt;JBottomley@parallels.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: satoru takeuchi &lt;satoru.takeuchi@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>block: fix request_queue-&gt;flags initialization</title>
<updated>2012-10-21T16:27:59Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2012-09-20T21:09:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7fce34e1a40c49a2f579ffd1342884cf8bca8e96'/>
<id>urn:sha1:7fce34e1a40c49a2f579ffd1342884cf8bca8e96</id>
<content type='text'>
commit 60ea8226cbd5c8301f9a39edc574ddabcb8150e0 upstream.

A queue newly allocated with blk_alloc_queue_node() has only
QUEUE_FLAG_BYPASS set.  For request-based drivers,
blk_init_allocated_queue() is called and q-&gt;queue_flags is overwritten
with QUEUE_FLAG_DEFAULT which doesn't include BYPASS even though the
initial bypass is still in effect.

In blk_init_allocated_queue(), or QUEUE_FLAG_DEFAULT to q-&gt;queue_flags
instead of overwriting.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>block: fix buffer overflow when printing partition UUIDs</title>
<updated>2012-05-15T06:22:04Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2012-05-15T06:22:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=05c69d298c96703741cac9a5cbbf6c53bd55a6e2'/>
<id>urn:sha1:05c69d298c96703741cac9a5cbbf6c53bd55a6e2</id>
<content type='text'>
6d1d8050b4bc8 "block, partition: add partition_meta_info to hd_struct"
added part_unpack_uuid() which assumes that the passed in buffer has
enough space for sprintfing "%pU" - 37 characters including '\0'.

Unfortunately, b5af921ec0233 "init: add support for root devices
specified by partition UUID" supplied 33 bytes buffer to the function
leading to the following panic with stackprotector enabled.

  Kernel panic - not syncing: stack-protector: Kernel stack corrupted in: ffffffff81b14c7e

  [&lt;ffffffff815e226b&gt;] panic+0xba/0x1c6
  [&lt;ffffffff81b14c7e&gt;] ? printk_all_partitions+0x259/0x26xb
  [&lt;ffffffff810566bb&gt;] __stack_chk_fail+0x1b/0x20
  [&lt;ffffffff81b15c7e&gt;] printk_all_paritions+0x259/0x26xb
  [&lt;ffffffff81aedfe0&gt;] mount_block_root+0x1bc/0x27f
  [&lt;ffffffff81aee0fa&gt;] mount_root+0x57/0x5b
  [&lt;ffffffff81aee23b&gt;] prepare_namespace+0x13d/0x176
  [&lt;ffffffff8107eec0&gt;] ? release_tgcred.isra.4+0x330/0x30
  [&lt;ffffffff81aedd60&gt;] kernel_init+0x155/0x15a
  [&lt;ffffffff81087b97&gt;] ? schedule_tail+0x27/0xb0
  [&lt;ffffffff815f4d24&gt;] kernel_thread_helper+0x5/0x10
  [&lt;ffffffff81aedc0b&gt;] ? start_kernel+0x3c5/0x3c5
  [&lt;ffffffff815f4d20&gt;] ? gs_change+0x13/0x13

Increase the buffer size, remove the dangerous part_unpack_uuid() and
use snprintf() directly from printk_all_partitions().

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: Szymon Gruszczynski &lt;sz.gruszczynski@googlemail.com&gt;
Cc: Will Drewry &lt;wad@chromium.org&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-3.4/core' of git://git.kernel.dk/linux-block</title>
<updated>2012-04-14T01:07:19Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-04-14T01:07:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d8dd0b6d4836bce81cece60509ef3b157a420776'/>
<id>urn:sha1:d8dd0b6d4836bce81cece60509ef3b157a420776</id>
<content type='text'>
Pull block core bits from Jens Axboe:
 "It's a nice and quiet round this time, since most of the tricky stuff
  has been pushed to 3.5 to give it more time to mature.  After a few
  hectic block IO core changes for 3.3 and 3.2, I'm quite happy with a
  slow round.

  Really minor stuff in here, the only real functional change is making
  the auto-unplug threshold a per-queue entity.  The threshold is set so
  that it's low enough that we don't hold off IO for too long, but still
  big enough to get a nice benefit from the batched insert (and hence
  queue lock cost reduction).  For raid configurations, this currently
  breaks down."

* 'for-3.4/core' of git://git.kernel.dk/linux-block:
  block: make auto block plug flush threshold per-disk based
  Documentation: Add sysfs ABI change for cfq's target latency.
  block: Make cfq_target_latency tunable through sysfs.
  block: use lockdep_assert_held for queue locking
  block: blk_alloc_queue_node(): use caller's GFP flags instead of GFP_KERNEL
</content>
</entry>
<entry>
<title>block: make auto block plug flush threshold per-disk based</title>
<updated>2012-04-06T17:37:47Z</updated>
<author>
<name>Shaohua Li</name>
<email>shli@fusionio.com</email>
</author>
<published>2012-04-06T17:37:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1b2e19f17ed327af6add02978efdf354e4f8e4df'/>
<id>urn:sha1:1b2e19f17ed327af6add02978efdf354e4f8e4df</id>
<content type='text'>
We do auto block plug flush to reduce latency, the threshold is 16
requests. This works well if the task is accessing one or two drives.
The problem is if the task is accessing a raid 0 device and the raid
disk number is big, say 8 or 16, 16/8 = 2 or 16/16=1, we will have
heavy lock contention.

This patch makes the threshold per-disk based. The latency should be
still ok accessing one or two drives. The setup with application
accessing a lot of drives in the meantime uaually is big machine,
avoiding lock contention is more important, because any contention
will actually increase latency.

Signed-off-by: Shaohua Li &lt;shli@fusionio.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: Make cfq_target_latency tunable through sysfs.</title>
<updated>2012-04-01T21:33:39Z</updated>
<author>
<name>Tao Ma</name>
<email>boyu.mt@taobao.com</email>
</author>
<published>2012-04-01T21:33:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5bf14c0727a07ded1bd9fa6d77923d7e6dc32833'/>
<id>urn:sha1:5bf14c0727a07ded1bd9fa6d77923d7e6dc32833</id>
<content type='text'>
In cfq, when we calculate a time slice for a process(or a cfqq to
be precise), we have to consider the cfq_target_latency so that all the
sync request have an estimated latency(300ms) and it is controlled by
cfq_target_latency. But in some hadoop test, we have found that if
there are many processes doing sequential read(24 for example), the
throughput is bad because every process can only work for about 25ms
and the cfqq is switched. That leads to a higher disk seek. We can
achive the good throughput by setting low_latency=0, but then some
read's latency is too much for the application.

So this patch makes cfq_target_latency tunable through sysfs so that
we can tune it and find some magic number which is not bad for both
the throughput and the read latency.

Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Tao Ma &lt;boyu.mt@taobao.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: use lockdep_assert_held for queue locking</title>
<updated>2012-03-30T10:33:28Z</updated>
<author>
<name>Andi Kleen</name>
<email>ak@linux.intel.com</email>
</author>
<published>2012-03-30T10:33:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8bcb6c7d48eb341b1f49f814cdcbe05eb6f15680'/>
<id>urn:sha1:8bcb6c7d48eb341b1f49f814cdcbe05eb6f15680</id>
<content type='text'>
Instead of an ugly open coded variant.

Cc: axboe@kernel.dk
Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
