<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/block, branch v3.6</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=v3.6</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-09-18T09:56:29Z</updated>
<entry>
<title>blk: add an upper sanity check on partition adding</title>
<updated>2012-09-18T09:56:29Z</updated>
<author>
<name>Alan Cox</name>
<email>alan@linux.intel.com</email>
</author>
<published>2012-09-17T10:47:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2bd6efad25d7c1950008e2ab4e2d6796001919fc'/>
<id>urn:sha1:2bd6efad25d7c1950008e2ab4e2d6796001919fc</id>
<content type='text'>
65536 should be ludicrous anyway but without it we overflow the
memory computation doing the allocation and badness occurs.

Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: rate-limit the error message from failing commands</title>
<updated>2012-08-30T23:26:25Z</updated>
<author>
<name>Yi Zou</name>
<email>yi.zou@intel.com</email>
</author>
<published>2012-08-30T23:26:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=37d7b34f05b7bcca364bdf47d8955e766094a244'/>
<id>urn:sha1:37d7b34f05b7bcca364bdf47d8955e766094a244</id>
<content type='text'>
When performing a cable pull test w/ active stress I/O using fio over
a dual port Intel 82599 FCoE CNA, w/ 256LUNs on one port and about 32LUNs
on the other, it is observed that the system becomes not usable due to
scsi-ml being busy printing the error messages for all the failing commands.
I don't believe this problem is specific to FCoE and these commands are
anyway failing due to link being down (DID_NO_CONNECT), just rate-limit
the messages here to solve this issue.

v2-&gt;v1: use __ratelimit() as Tomas Henzl mentioned as the proper way for
rate-limit per function. However, in this case, the failed i/o gets to
blk_end_request_err() and then blk_update_request(), which also has to
be rate-limited, as added in the v2 of this patch.

v3-v2: resolved conflict to apply on current 3.6-rc3 upstream tip.

Signed-off-by: Yi Zou &lt;yi.zou@intel.com&gt;
Cc: www.Open-FCoE.org &lt;devel@open-fcoe.org&gt;
Cc: Tomas Henzl &lt;thenzl@redhat.com&gt;
Cc: &lt;linux-scsi@vger.kernel.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: Don't use static to define "void *p" in show_partition_start()</title>
<updated>2012-08-03T08:42:00Z</updated>
<author>
<name>Jianpeng Ma</name>
<email>majianpeng@gmail.com</email>
</author>
<published>2012-08-03T08:42:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0676806707281e27b13d44323bed580a8160b7a4'/>
<id>urn:sha1:0676806707281e27b13d44323bed580a8160b7a4</id>
<content type='text'>
I met a odd prblem:read /proc/partitions may return zero.

I wrote a file test.c:
int main()
{
	char buff[4096];
	int ret;
	int fd;
	printf("pid=%d\n",getpid());
	while (1) {
		fd = open("/proc/partitions", O_RDONLY);
		if (fd &lt; 0) {
			printf("open error %s\n", strerror(errno));
			return 0;
		}
		ret = read(fd, buff, 4096);
		if (ret &lt;= 0)
			printf("ret=%d, %s, %ld\n", ret,
				strerror(errno), lseek(fd,0,SEEK_CUR));
		close(fd);
	}
	exit(0);
}

You can reproduce by:
1:while true;do cat /proc/partitions &gt; /dev/null ;done
2:./test

I reviewed the code and found:

&gt;&gt; static void *show_partition_start(struct seq_file *seqf, loff_t *pos)
&gt;&gt; {
&gt;&gt; 	static void *p;
&gt;&gt;
&gt;&gt; 	p = disk_seqf_start(seqf, pos);
&gt;&gt; 	if (!IS_ERR_OR_NULL(p) &amp;&amp; !*pos)
&gt;&gt; 		seq_puts(seqf, "major minor  #blocks  name\n\n");
&gt;&gt; 	return p;
&gt;&gt; }
		test								cat /proc/partitions
	p = disk_seqf_start()(Not NULL)
									p = disk_seqf_start()(NULL because pos)
	if (!IS_ERR_OR_NULL(p) &amp;&amp; !*pos)

Signed-off-by: Jianpeng Ma &lt;majianpeng@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: Add blk_bio_map_sg() helper</title>
<updated>2012-08-02T21:42:04Z</updated>
<author>
<name>Asias He</name>
<email>asias@redhat.com</email>
</author>
<published>2012-08-02T21:42:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=85b9f66a41eb8ee3f1dfc95707412705463cdd97'/>
<id>urn:sha1:85b9f66a41eb8ee3f1dfc95707412705463cdd97</id>
<content type='text'>
Add a helper to map a bio to a scatterlist, modelled after
blk_rq_map_sg.

This helper is useful for any driver that wants to create
a scatterlist from its -&gt;make_request_fn method.

Changes in v2:
 - Use __blk_segment_map_sg to avoid duplicated code
 - Add cocbook style function comment

Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Shaohua Li &lt;shli@kernel.org&gt;
Cc: "Michael S. Tsirkin" &lt;mst@redhat.com&gt;
Cc: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: virtualization@lists.linux-foundation.org
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Minchan Kim &lt;minchan.kim@gmail.com&gt;
Signed-off-by: Asias He &lt;asias@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: Introduce __blk_segment_map_sg() helper</title>
<updated>2012-08-02T21:42:03Z</updated>
<author>
<name>Asias He</name>
<email>asias@redhat.com</email>
</author>
<published>2012-08-02T21:42:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=963ab9e5da95c654bb3ab937cc478de4f7088a96'/>
<id>urn:sha1:963ab9e5da95c654bb3ab937cc478de4f7088a96</id>
<content type='text'>
Split the mapping code in blk_rq_map_sg() to a helper
__blk_segment_map_sg(), so that other mapping function, e.g.
blk_bio_map_sg(), can share the code.

Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Shaohua Li &lt;shli@kernel.org&gt;
Cc: "Michael S. Tsirkin" &lt;mst@redhat.com&gt;
Cc: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: virtualization@lists.linux-foundation.org
Suggested-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Suggested-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Asias He &lt;asias@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: split discard into aligned requests</title>
<updated>2012-08-02T07:48:50Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2012-08-02T07:48:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c6e666345e1b79c62ba82339cc7d55a89cb73f88'/>
<id>urn:sha1:c6e666345e1b79c62ba82339cc7d55a89cb73f88</id>
<content type='text'>
When a disk has large discard_granularity and small max_discard_sectors,
discards are not split with optimal alignment.  In the limit case of
discard_granularity == max_discard_sectors, no request could be aligned
correctly, so in fact you might end up with no discarded logical blocks
at all.

Another example that helps showing the condition in the patch is with
discard_granularity == 64, max_discard_sectors == 128.  A request that is
submitted for 256 sectors 2..257 will be split in two: 2..129, 130..257.
However, only 2 aligned blocks out of 3 are included in the request;
128..191 may be left intact and not discarded.  With this patch, the
first request will be truncated to ensure good alignment of what's left,
and the split will be 2..127, 128..255, 256..257.  The patch will also
take into account the discard_alignment.

At most one extra request will be introduced, because the first request
will be reduced by at most granularity-1 sectors, and granularity
must be less than max_discard_sectors.  Subsequent requests will run
on round_down(max_discard_sectors, granularity) sectors, as in the
current code.

Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Acked-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Tested-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: reorganize rounding of max_discard_sectors</title>
<updated>2012-08-02T07:48:49Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2012-08-02T07:48:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f6ff53d3611b564661896be23369b54d84941a0e'/>
<id>urn:sha1:f6ff53d3611b564661896be23369b54d84941a0e</id>
<content type='text'>
Mostly a preparation for the next patch.

In principle this fixes an infinite loop if max_discard_sectors &lt; granularity,
but that really shouldn't happen.

Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Acked-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Tested-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<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.shady.money/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.shady.money/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.shady.money/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>
</feed>
