<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/md, branch v3.9.6</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/md?h=v3.9.6</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/md?h=v3.9.6'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-05-19T18:38:17Z</updated>
<entry>
<title>dm cache: fix error return code in cache_create</title>
<updated>2013-05-19T18:38:17Z</updated>
<author>
<name>Wei Yongjun</name>
<email>yongjun_wei@trendmicro.com.cn</email>
</author>
<published>2013-05-10T13:37:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3dc73aa4030321924423ebc662dcf6f382fef5b3'/>
<id>urn:sha1:3dc73aa4030321924423ebc662dcf6f382fef5b3</id>
<content type='text'>
commit fa4d683af3693863bec761e2761a07e4c1351f86 upstream.

Return -ENOMEM if memory allocation fails in cache_create
instead of 0 (to avoid NULL pointer dereference).

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>dm snapshot: fix error return code in snapshot_ctr</title>
<updated>2013-05-19T18:38:17Z</updated>
<author>
<name>Wei Yongjun</name>
<email>yongjun_wei@trendmicro.com.cn</email>
</author>
<published>2013-05-10T13:37:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=62253ab07cbbb924ba69cbb4e050b42b008a6884'/>
<id>urn:sha1:62253ab07cbbb924ba69cbb4e050b42b008a6884</id>
<content type='text'>
commit 09e8b813897a0f85bb401435d009228644c81214 upstream.

Return -ENOMEM instead of success if unable to allocate pending
exception mempool in snapshot_ctr.

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>dm bufio: avoid a possible __vmalloc deadlock</title>
<updated>2013-05-19T18:38:16Z</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2013-05-10T13:37:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8f9341a6a18470c0e91ba23c82612c6237c68562'/>
<id>urn:sha1:8f9341a6a18470c0e91ba23c82612c6237c68562</id>
<content type='text'>
commit 502624bdad3dba45dfaacaf36b7d83e39e74b2d2 upstream.

This patch uses memalloc_noio_save to avoid a possible deadlock in
dm-bufio.  (it could happen only with large block size, at most
PAGE_SIZE &lt;&lt; MAX_ORDER (typically 8MiB).

__vmalloc doesn't fully respect gfp flags. The specified gfp flags are
used for allocation of requested pages, structures vmap_area, vmap_block
and vm_struct and the radix tree nodes.

However, the kernel pagetables are allocated always with GFP_KERNEL.
Thus the allocation of pagetables can recurse back to the I/O layer and
cause a deadlock.

This patch uses the function memalloc_noio_save to set per-process
PF_MEMALLOC_NOIO flag and the function memalloc_noio_restore to restore
it. When this flag is set, all allocations in the process are done with
implied GFP_NOIO flag, thus the deadlock can't happen.

This should be backported to stable kernels, but they don't have the
PF_MEMALLOC_NOIO flag and memalloc_noio_save/memalloc_noio_restore
functions. So, PF_MEMALLOC should be set and restored instead.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>dm stripe: fix regression in stripe_width calculation</title>
<updated>2013-05-19T18:38:16Z</updated>
<author>
<name>Mike Snitzer</name>
<email>snitzer@redhat.com</email>
</author>
<published>2013-05-10T13:37:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ce397c5eb27f56a440a22c594293f2f7a56fa821'/>
<id>urn:sha1:ce397c5eb27f56a440a22c594293f2f7a56fa821</id>
<content type='text'>
commit d793e684277124d55c5d2444007e224635821346 upstream.

Fix a regression in the calculation of the stripe_width in the
dm stripe target which led to incorrect processing of device limits.

The stripe_width is the stripe device length divided by the number of
stripes.  The group of commits in the range f14fa69 ("dm stripe: fix
size test") to eb850de ("dm stripe: support for non power of 2
chunksize") interfered with each other (a merging error) and led to the
stripe_width being set incorrectly to the stripe device length divided by
chunk_size * stripe_count.

For example, a stripe device's table with: 0 33553920 striped 3 512 ...
should result in a stripe_width of 11184640 (33553920 / 3), but due to
the bug it was getting set to 21845 (33553920 / (512 * 3)).

The impact of this bug is that device topologies that previously worked
fine with the stripe target are no longer considered valid.  In
particular, there is a higher risk of seeing this issue if one of the
stripe devices has a 4K logical block size.  Resulting in an error
message like this:
"device-mapper: table: 253:4: len=21845 not aligned to h/w logical block size 4096 of dm-1"

The fix is to swap the order of the divisions and to use a temporary
variable for the second one, so that width retains the intended
value.

Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>dm table: fix write same support</title>
<updated>2013-05-19T18:38:15Z</updated>
<author>
<name>Mike Snitzer</name>
<email>snitzer@redhat.com</email>
</author>
<published>2013-05-10T13:37:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e861593f411a2564a3b376144b3a616f3dd2e8d8'/>
<id>urn:sha1:e861593f411a2564a3b376144b3a616f3dd2e8d8</id>
<content type='text'>
commit dc019b21fb92d620a3b52ccecc135ac968a7c7ec upstream.

If device_not_write_same_capable() returns true then the iterate_devices
loop in dm_table_supports_write_same() should return false.

Reported-by: Bharata B Rao &lt;bharata.rao@gmail.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>MD: ignore discard request for hard disks of hybid raid1/raid10 array</title>
<updated>2013-05-08T03:33:13Z</updated>
<author>
<name>Shaohua Li</name>
<email>shli@kernel.org</email>
</author>
<published>2013-04-28T10:26:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4e8ff5541c9a5521f0052e7a68988c3a190af69a'/>
<id>urn:sha1:4e8ff5541c9a5521f0052e7a68988c3a190af69a</id>
<content type='text'>
commit 32f9f570d04461a41bdcd5c1d93b41ebc5ce182a upstream.

In SSD/hard disk hybid storage, discard request should be ignored for hard
disk. We used to be doing this way, but the unplug path forgets it.

This is suitable for stable tree since v3.6.

Reported-and-tested-by: Markus &lt;M4rkusXXL@web.de&gt;
Signed-off-by: Shaohua Li &lt;shli@fusionio.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>md: bad block list should default to disabled.</title>
<updated>2013-05-08T03:33:12Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2013-04-24T01:42:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=aaf49388fdf26e315e62f67614c77dceb319c837'/>
<id>urn:sha1:aaf49388fdf26e315e62f67614c77dceb319c837</id>
<content type='text'>
commit 486adf72ccc0c235754923d47a2270c5dcb0c98b upstream.

Maintenance of a bad-block-list currently defaults to 'enabled'
and is then disabled when it cannot be supported.
This is backwards and causes problem for dm-raid which didn't know
to disable it.

So fix the defaults, and only enabled for v1.x metadata which
explicitly has bad blocks enabled.

The problem with dm-raid has been present since badblock support was
added in v3.1, so this patch is suitable for any -stable from 3.1
onwards.

Reported-by: Jonathan Brassow &lt;jbrassow@redhat.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Revert "block: add missing block_bio_complete() tracepoint"</title>
<updated>2013-04-18T16:00:26Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-04-18T16:00:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0a82a8d132b26d438eb90b3ab35a7016e7227a1d'/>
<id>urn:sha1:0a82a8d132b26d438eb90b3ab35a7016e7227a1d</id>
<content type='text'>
This reverts commit 3a366e614d0837d9fc23f78cdb1a1186ebc3387f.

Wanlong Gao reports that it causes a kernel panic on his machine several
minutes after boot. Reverting it removes the panic.

Jens says:
 "It's not quite clear why that is yet, so I think we should just revert
  the commit for 3.9 final (which I'm assuming is pretty close).

  The wifi is crap at the LSF hotel, so sending this email instead of
  queueing up a revert and pull request."

Reported-by: Wanlong Gao &lt;gaowanlong@cn.fujitsu.com&gt;
Requested-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>dm cache: reduce bio front_pad size in writeback mode</title>
<updated>2013-04-05T14:36:34Z</updated>
<author>
<name>Mike Snitzer</name>
<email>snitzer@redhat.com</email>
</author>
<published>2013-04-05T14:36:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=19b0092e265fe9ab129902373c3127c0e0be3376'/>
<id>urn:sha1:19b0092e265fe9ab129902373c3127c0e0be3376</id>
<content type='text'>
A recent patch to fix the dm cache target's writethrough mode extended
the bio's front_pad to include a 1056-byte struct dm_bio_details.
Writeback mode doesn't need this, so this patch reduces the
per_bio_data_size to 16 bytes in this case instead of 1096.

The dm_bio_details structure was added in "dm cache: fix writes to
cache device in writethrough mode" which fixed commit e2e74d617e ("dm
cache: fix race in writethrough implementation").  In writeback mode
we avoid allocating the writethrough-specific members of the
per_bio_data structure (the dm_bio_details structure included).

Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm cache: fix writes to cache device in writethrough mode</title>
<updated>2013-04-05T14:36:32Z</updated>
<author>
<name>Darrick J. Wong</name>
<email>darrick.wong@oracle.com</email>
</author>
<published>2013-04-05T14:36:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b844fe691897221ad0d5e0279c8ea9e3e4a46982'/>
<id>urn:sha1:b844fe691897221ad0d5e0279c8ea9e3e4a46982</id>
<content type='text'>
The dm-cache writethrough strategy introduced by commit e2e74d617eadc15
("dm cache: fix race in writethrough implementation") issues a bio to
the origin device, remaps and then issues the bio to the cache device.
This more conservative in-series approach was selected to favor
correctness over performance (of the previous parallel writethrough).
However, this in-series implementation that reuses the same bio to write
both the origin and cache device didn't take into account that the block
layer's req_bio_endio() modifies a completing bio's bi_sector and
bi_size.  So the new writethrough strategy needs to preserve these bio
fields, and restore them before submission to the cache device,
otherwise nothing gets written to the cache (because bi_size is 0).

This patch adds a struct dm_bio_details field to struct per_bio_data,
and uses dm_bio_record() and dm_bio_restore() to ensure the bio is
restored before reissuing to the cache device.  Adding such a large
structure to the per_bio_data is not ideal but we can improve this
later, for now correctness is the important thing.

This problem initially went unnoticed because the dm-cache test-suite
uses a linear DM device for the dm-cache device's origin device.
Writethrough worked as expected because DM submits a *clone* of the
original bio, so the original bio which was reused for the cache was
never touched.

Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Signed-off-by: Joe Thornber &lt;ejt@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
</content>
</entry>
</feed>
