<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/block, branch v3.6-rc1</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/block?h=v3.6-rc1</id>
<link rel='self' href='https://git.amat.us/linux/atom/block?h=v3.6-rc1'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-08-01T16:06:47Z</updated>
<entry>
<title>Merge branch 'for-3.6/drivers' of git://git.kernel.dk/linux-block</title>
<updated>2012-08-01T16:06:47Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-08-01T16:06:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=eff0d13f3823f35d70228cd151d2a2c89288ff32'/>
<id>urn:sha1:eff0d13f3823f35d70228cd151d2a2c89288ff32</id>
<content type='text'>
Pull block driver changes from Jens Axboe:

 - Making the plugging support for drivers a bit more sane from Neil.
   This supersedes the plugging change from Shaohua as well.

 - The usual round of drbd updates.

 - Using a tail add instead of a head add in the request completion for
   ndb, making us find the most completed request more quickly.

 - A few floppy changes, getting rid of a duplicated flag and also
   running the floppy init async (since it takes forever in boot terms)
   from Andi.

* 'for-3.6/drivers' of git://git.kernel.dk/linux-block:
  floppy: remove duplicated flag FD_RAW_NEED_DISK
  blk: pass from_schedule to non-request unplug functions.
  block: stack unplug
  blk: centralize non-request unplug handling.
  md: remove plug_cnt feature of plugging.
  block/nbd: micro-optimization in nbd request completion
  drbd: announce FLUSH/FUA capability to upper layers
  drbd: fix max_bio_size to be unsigned
  drbd: flush drbd work queue before invalidate/invalidate remote
  drbd: fix potential access after free
  drbd: call local-io-error handler early
  drbd: do not reset rs_pending_cnt too early
  drbd: reset congestion information before reporting it in /proc/drbd
  drbd: report congestion if we are waiting for some userland callback
  drbd: differentiate between normal and forced detach
  drbd: cleanup, remove two unused global flags
  floppy: Run floppy initialization asynchronous
</content>
</entry>
<entry>
<title>Merge branch 'for-3.6/core' of git://git.kernel.dk/linux-block</title>
<updated>2012-08-01T16:02:41Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-08-01T16:02:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8cf1a3fce0b95050b63d451c9d561da0da2aa4d6'/>
<id>urn:sha1:8cf1a3fce0b95050b63d451c9d561da0da2aa4d6</id>
<content type='text'>
Pull core block IO bits from Jens Axboe:
 "The most complicated part if this is the request allocation rework by
  Tejun, which has been queued up for a long time and has been in
  for-next ditto as well.

  There are a few commits from yesterday and today, mostly trivial and
  obvious fixes.  So I'm pretty confident that it is sound.  It's also
  smaller than usual."

* 'for-3.6/core' of git://git.kernel.dk/linux-block:
  block: remove dead func declaration
  block: add partition resize function to blkpg ioctl
  block: uninitialized ioc-&gt;nr_tasks triggers WARN_ON
  block: do not artificially constrain max_sectors for stacking drivers
  blkcg: implement per-blkg request allocation
  block: prepare for multiple request_lists
  block: add q-&gt;nr_rqs[] and move q-&gt;rq.elvpriv to q-&gt;nr_rqs_elvpriv
  blkcg: inline bio_blkcg() and friends
  block: allocate io_context upfront
  block: refactor get_request[_wait]()
  block: drop custom queue draining used by scsi_transport_{iscsi|fc}
  mempool: add @gfp_mask to mempool_create_node()
  blkcg: make root blkcg allocation use %GFP_KERNEL
  blkcg: __blkg_lookup_create() doesn't need radix preload
</content>
</entry>
<entry>
<title>block: remove dead func declaration</title>
<updated>2012-08-01T10:25:54Z</updated>
<author>
<name>Yuanhan Liu</name>
<email>yuanhan.liu@linux.intel.com</email>
</author>
<published>2012-08-01T10:25:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=80799fbb7d10c30df78015b3fa21f7ffcfc0eb2c'/>
<id>urn:sha1:80799fbb7d10c30df78015b3fa21f7ffcfc0eb2c</id>
<content type='text'>
__generic_unplug_device() function is removed with commit
7eaceaccab5f40bbfda044629a6298616aeaed50, which forgot to
remove the declaration at meantime. Here remove it.

Signed-off-by: Yuanhan Liu &lt;yuanhan.liu@linux.intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: add partition resize function to blkpg ioctl</title>
<updated>2012-08-01T10:24:18Z</updated>
<author>
<name>Vivek Goyal</name>
<email>vgoyal@redhat.com</email>
</author>
<published>2012-08-01T10:24:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c83f6bf98dc1f1a194118b3830706cebbebda8c4'/>
<id>urn:sha1:c83f6bf98dc1f1a194118b3830706cebbebda8c4</id>
<content type='text'>
Add a new operation code (BLKPG_RESIZE_PARTITION) to the BLKPG ioctl that
allows altering the size of an existing partition, even if it is currently
in use.

This patch converts hd_struct-&gt;nr_sects into sequence counter because
One might extend a partition while IO is happening to it and update of
nr_sects can be non-atomic on 32bit machines with 64bit sector_t. This
can lead to issues like reading inconsistent size of a partition. Sequence
counter have been used so that readers don't have to take bdev mutex lock
as we call sector_in_part() very frequently.

Now all the access to hd_struct-&gt;nr_sects should happen using sequence
counter read/update helper functions part_nr_sects_read/part_nr_sects_write.
There is one exception though, set_capacity()/get_capacity(). I think
theoritically race should exist there too but this patch does not
modify set_capacity()/get_capacity() due to sheer number of call sites
and I am afraid that change might break something. I have left that as a
TODO item. We can handle it later if need be. This patch does not introduce
any new races as such w.r.t set_capacity()/get_capacity().

v2: Add CONFIG_LBDAF test to UP preempt case as suggested by Phillip.

Signed-off-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Signed-off-by: Phillip Susi &lt;psusi@ubuntu.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: uninitialized ioc-&gt;nr_tasks triggers WARN_ON</title>
<updated>2012-08-01T10:17:27Z</updated>
<author>
<name>Olof Johansson</name>
<email>olof@lixom.net</email>
</author>
<published>2012-08-01T10:17:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4638a83e8615de9c16c39dfed234951d0f468cf1'/>
<id>urn:sha1:4638a83e8615de9c16c39dfed234951d0f468cf1</id>
<content type='text'>
Hi,

I'm using the old-fashioned 'dump' backup tool, and I noticed that it spews the
below warning as of 3.5-rc1 and later (3.4 is fine):

[   10.886893] ------------[ cut here ]------------
[   10.886904] WARNING: at include/linux/iocontext.h:140 copy_process+0x1488/0x1560()
[   10.886905] Hardware name: Bochs
[   10.886906] Modules linked in:
[   10.886908] Pid: 2430, comm: dump Not tainted 3.5.0-rc7+ #27
[   10.886908] Call Trace:
[   10.886911]  [&lt;ffffffff8107ce8a&gt;] warn_slowpath_common+0x7a/0xb0
[   10.886912]  [&lt;ffffffff8107ced5&gt;] warn_slowpath_null+0x15/0x20
[   10.886913]  [&lt;ffffffff8107c088&gt;] copy_process+0x1488/0x1560
[   10.886914]  [&lt;ffffffff8107c244&gt;] do_fork+0xb4/0x340
[   10.886918]  [&lt;ffffffff8108effa&gt;] ? recalc_sigpending+0x1a/0x50
[   10.886919]  [&lt;ffffffff8108f6b2&gt;] ? __set_task_blocked+0x32/0x80
[   10.886920]  [&lt;ffffffff81091afa&gt;] ? __set_current_blocked+0x3a/0x60
[   10.886923]  [&lt;ffffffff81051db3&gt;] sys_clone+0x23/0x30
[   10.886925]  [&lt;ffffffff8179bd73&gt;] stub_clone+0x13/0x20
[   10.886927]  [&lt;ffffffff8179baa2&gt;] ? system_call_fastpath+0x16/0x1b
[   10.886928] ---[ end trace 32a14af7ee6a590b ]---

Reproducing is easy, I can hit it on a KVM system with a very basic
config (x86_64 make defconfig + enable the drivers needed). To hit it,
just install dump (on debian/ubuntu, not sure what the package might be
called on Fedora), and:

dump -o -f /tmp/foo /

You'll see the warning in dmesg once it forks off the I/O process and
starts dumping filesystem contents.

I bisected it down to the following commit:

commit f6e8d01bee036460e03bd4f6a79d014f98ba712e
Author: Tejun Heo &lt;tj@kernel.org&gt;
Date:   Mon Mar 5 13:15:26 2012 -0800

    block: add io_context-&gt;active_ref

    Currently ioc-&gt;nr_tasks is used to decide two things - whether an ioc
    is done issuing IOs and whether it's shared by multiple tasks.  This
    patch separate out the first into ioc-&gt;active_ref, which is acquired
    and released using {get|put}_io_context_active() respectively.

    This will be used to associate bio's with a given task.  This patch
    doesn't introduce any visible behavior change.

    Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
    Cc: Vivek Goyal &lt;vgoyal@redhat.com&gt;
    Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;

It seems like the init of ioc-&gt;nr_tasks was removed in that patch,
so it starts out at 0 instead of 1.

Tejun, is the right thing here to add back the init, or should something else
be done?

The below patch removes the warning, but I haven't done any more extensive
testing on it.

Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: stable@kernel.org
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: do not artificially constrain max_sectors for stacking drivers</title>
<updated>2012-08-01T08:44:28Z</updated>
<author>
<name>Mike Snitzer</name>
<email>snitzer@redhat.com</email>
</author>
<published>2012-08-01T08:44:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fe86cdcef73ba19a2246a124f0ddbd19b14fb549'/>
<id>urn:sha1:fe86cdcef73ba19a2246a124f0ddbd19b14fb549</id>
<content type='text'>
blk_set_stacking_limits is intended to allow stacking drivers to build
up the limits of the stacked device based on the underlying devices'
limits.  But defaulting 'max_sectors' to BLK_DEF_MAX_SECTORS (1024)
doesn't allow the stacking driver to inherit a max_sectors larger than
1024 -- due to blk_stack_limits' use of min_not_zero.

It is now clear that this artificial limit is getting in the way so
change blk_set_stacking_limits's max_sectors to UINT_MAX (which allows
stacking drivers like dm-multipath to inherit 'max_sectors' from the
underlying paths).

Reported-by: Vijay Chauhan &lt;vijay.chauhan@netapp.com&gt;
Tested-by: Vijay Chauhan &lt;vijay.chauhan@netapp.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>blk: pass from_schedule to non-request unplug functions.</title>
<updated>2012-07-31T07:08:15Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-07-31T07:08:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=74018dc3063a2c729fc73041c0a9f03aac995920'/>
<id>urn:sha1:74018dc3063a2c729fc73041c0a9f03aac995920</id>
<content type='text'>
This will allow md/raid to know why the unplug was called,
and will be able to act according - if !from_schedule it
is safe to perform tasks which could themselves schedule.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: stack unplug</title>
<updated>2012-07-31T07:08:15Z</updated>
<author>
<name>Shaohua Li</name>
<email>shli@kernel.org</email>
</author>
<published>2012-07-31T07:08:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2a7d5559b346574057dce4672d1ed9aaa9d1e685'/>
<id>urn:sha1:2a7d5559b346574057dce4672d1ed9aaa9d1e685</id>
<content type='text'>
MD raid1 prepares to dispatch request in unplug callback. If make_request in
low level queue also uses unplug callback to dispatch request, the low level
queue's unplug callback will not be called. Recheck the callback list helps
this case.

Signed-off-by: Shaohua Li &lt;shli@fusionio.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>blk: centralize non-request unplug handling.</title>
<updated>2012-07-31T07:08:14Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-07-31T07:08:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9cbb17508808f8a6bdd83354b61e126ac4fa6fed'/>
<id>urn:sha1:9cbb17508808f8a6bdd83354b61e126ac4fa6fed</id>
<content type='text'>
Both md and umem has similar code for getting notified on an
blk_finish_plug event.
Centralize this code in block/ and allow each driver to
provide its distinctive difference.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>[SCSI] block: Fix blk_execute_rq_nowait() dead queue handling</title>
<updated>2012-07-20T07:58:39Z</updated>
<author>
<name>Muthukumar Ratty</name>
<email>muthur@gmail.com</email>
</author>
<published>2012-06-29T15:31:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e81ca6fe85b77109a32489a5db82f575d51dfc98'/>
<id>urn:sha1:e81ca6fe85b77109a32489a5db82f575d51dfc98</id>
<content type='text'>
If the queue is dead blk_execute_rq_nowait() doesn't invoke the done()
callback function. That will result in blk_execute_rq() being stuck
in wait_for_completion(). Avoid this by initializing rq-&gt;end_io to the
done() callback before we check the queue state. Also, make sure the
queue lock is held around the invocation of the done() callback. Found
this through source code review.

Signed-off-by: Muthukumar Ratty &lt;muthur@gmail.com&gt;
Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Reviewed-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
</feed>
