<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/md, branch v5.0</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=v5.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-02-15T17:12:28Z</updated>
<entry>
<title>Merge tag 'for-linus-20190215' of git://git.kernel.dk/linux-block</title>
<updated>2019-02-15T17:12:28Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-02-15T17:12:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=24f0a48743a256bdec1bcb80708bc309da4aa261'/>
<id>urn:sha1:24f0a48743a256bdec1bcb80708bc309da4aa261</id>
<content type='text'>
Pull block fixes from Jens Axboe:

 - Ensure we insert into the hctx dispatch list, if a request is marked
   as DONTPREP (Jianchao)

 - NVMe pull request, single missing unlock on error fix (Keith)

 - MD pull request, single fix for a potentially data corrupting issue
   (Nate)

 - Floppy check_events regression fix (Yufen)

* tag 'for-linus-20190215' of git://git.kernel.dk/linux-block:
  md/raid1: don't clear bitmap bits on interrupted recovery.
  floppy: check_events callback should not return a negative number
  nvme-pci: add missing unlock for reset error
  blk-mq: insert rq with DONTPREP to hctx dispatch list when requeue
</content>
</entry>
<entry>
<title>dm thin: fix bug where bio that overwrites thin block ignores FUA</title>
<updated>2019-02-15T00:02:29Z</updated>
<author>
<name>Nikos Tsironis</name>
<email>ntsironis@arrikto.com</email>
</author>
<published>2019-02-14T18:38:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4ae280b4ee3463fa57bbe6eede26b97daff8a0f1'/>
<id>urn:sha1:4ae280b4ee3463fa57bbe6eede26b97daff8a0f1</id>
<content type='text'>
When provisioning a new data block for a virtual block, either because
the block was previously unallocated or because we are breaking sharing,
if the whole block of data is being overwritten the bio that triggered
the provisioning is issued immediately, skipping copying or zeroing of
the data block.

When this bio completes the new mapping is inserted in to the pool's
metadata by process_prepared_mapping(), where the bio completion is
signaled to the upper layers.

This completion is signaled without first committing the metadata.  If
the bio in question has the REQ_FUA flag set and the system crashes
right after its completion and before the next metadata commit, then the
write is lost despite the REQ_FUA flag requiring that I/O completion for
this request must only be signaled after the data has been committed to
non-volatile storage.

Fix this by deferring the completion of overwrite bios, with the REQ_FUA
flag set, until after the metadata has been committed.

Cc: stable@vger.kernel.org
Signed-off-by: Nikos Tsironis &lt;ntsironis@arrikto.com&gt;
Acked-by: Joe Thornber &lt;ejt@redhat.com&gt;
Acked-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
<entry>
<title>md/raid1: don't clear bitmap bits on interrupted recovery.</title>
<updated>2019-02-12T22:06:58Z</updated>
<author>
<name>Nate Dailey</name>
<email>nate.dailey@stratus.com</email>
</author>
<published>2019-02-07T19:19:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dfcc34c99f3ebc16b787b118763bf9cb6b1efc7a'/>
<id>urn:sha1:dfcc34c99f3ebc16b787b118763bf9cb6b1efc7a</id>
<content type='text'>
sync_request_write no longer submits writes to a Faulty device. This has
the unfortunate side effect that bitmap bits can be incorrectly cleared
if a recovery is interrupted (previously, end_sync_write would have
prevented this). This means the next recovery may not copy everything
it should, potentially corrupting data.

Add a function for doing the proper md_bitmap_end_sync, called from
end_sync_write and the Faulty case in sync_request_write.

backport note to 4.14: s/md_bitmap_end_sync/bitmap_end_sync
Cc: stable@vger.kernel.org 4.14+
Fixes: 0c9d5b127f69 ("md/raid1: avoid reusing a resync bio after error handling.")
Reviewed-by: Jack Wang &lt;jinpu.wang@cloud.ionos.com&gt;
Tested-by: Jack Wang &lt;jinpu.wang@cloud.ionos.com&gt;
Signed-off-by: Nate Dailey &lt;nate.dailey@stratus.com&gt;
Signed-off-by: Song Liu &lt;songliubraving@fb.com&gt;
</content>
</entry>
<entry>
<title>dm crypt: don't overallocate the integrity tag space</title>
<updated>2019-02-11T17:06:48Z</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2019-02-08T15:52:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ff0c129d3b5ecb3df7c8f5e2236582bf745b6c5f'/>
<id>urn:sha1:ff0c129d3b5ecb3df7c8f5e2236582bf745b6c5f</id>
<content type='text'>
bio_sectors() returns the value in the units of 512-byte sectors (no
matter what the real sector size of the device).  dm-crypt multiplies
bio_sectors() by on_disk_tag_size to calculate the space allocated for
integrity tags.  If dm-crypt is running with sector size larger than
512b, it allocates more data than is needed.

Device Mapper trims the extra space when passing the bio to
dm-integrity, so this bug didn't result in any visible misbehavior.
But it must be fixed to avoid wasteful memory allocation for the block
integrity payload.

Fixes: ef43aa38063a6 ("dm crypt: add cryptographic data integrity protection (authenticated encryption)")
Cc: stable@vger.kernel.org # 4.12+
Reported-by: Milan Broz &lt;mbroz@redhat.com&gt;
Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm: don't use bio_trim() afterall</title>
<updated>2019-02-06T22:24:37Z</updated>
<author>
<name>Mike Snitzer</name>
<email>snitzer@redhat.com</email>
</author>
<published>2019-02-05T22:07:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fa8db4948f5224dae33a0e783e7dec682e145f88'/>
<id>urn:sha1:fa8db4948f5224dae33a0e783e7dec682e145f88</id>
<content type='text'>
bio_trim() has an early return, which makes it _not_ idempotent, if the
offset is 0 and the bio's bi_size already matches the requested size.
Prior to DM, all users of bio_trim() were fine with this.  But DM has
exposed the fact that bio_trim()'s early return is incompatible with a
cloned bio whose integrity payload must be trimmed via
bio_integrity_trim().

Fix this by reverting DM back to doing the equivalent of bio_trim() but
in an idempotent manner (so bio_integrity_trim is always performed).

Follow-on work is needed to assess what benefit bio_trim()'s early
return is providing to its existing callers.

Reported-by: Milan Broz &lt;gmazyland@gmail.com&gt;
Fixes: 57c36519e4b94 ("dm: fix clone_bio() to trigger blk_recount_segments()")
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm: add memory barrier before waitqueue_active</title>
<updated>2019-02-06T22:24:37Z</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2019-02-05T10:09:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=645efa84f6c7566ea863ed37a8b3247247f72e02'/>
<id>urn:sha1:645efa84f6c7566ea863ed37a8b3247247f72e02</id>
<content type='text'>
Block core changes to switch bio-based IO accounting to be percpu had a
side-effect of altering DM core to now rely on calling waitqueue_active
(in both bio-based and request-based) to check if another task is in
dm_wait_for_completion().

A memory barrier is needed before calling waitqueue_active().  DM core
doesn't piggyback on a preceding memory barrier so it must explicitly
use its own.

For more details on why using waitqueue_active() without a preceding
barrier is unsafe, please see the comment before the waitqueue_active()
definition in include/linux/wait.h.

Add the missing memory barrier by switching to using wq_has_sleeper().

Fixes: 6f75723190d8 ("dm: remove the pending IO accounting")
Fixes: c4576aed8d85 ("dm: fix request-based dm's use of dm_wait_for_completion")
Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
<entry>
<title>md/raid5: fix 'out of memory' during raid cache recovery</title>
<updated>2019-01-28T19:44:40Z</updated>
<author>
<name>Alexei Naberezhnov</name>
<email>anaberezhnov@fb.com</email>
</author>
<published>2018-03-27T23:54:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=483cbbeddd5fe2c80fd4141ff0748fa06c4ff146'/>
<id>urn:sha1:483cbbeddd5fe2c80fd4141ff0748fa06c4ff146</id>
<content type='text'>
This fixes the case when md array assembly fails because of raid cache recovery
unable to allocate a stripe, despite attempts to replay stripes and increase
cache size. This happens because stripes released by r5c_recovery_replay_stripes
and raid5_set_cache_size don't become available for allocation immediately.
Released stripes first are placed on conf-&gt;released_stripes list and require
md thread to merge them on conf-&gt;inactive_list before they can be allocated.

Patch allows final allocation attempt during cache recovery to wait for
new stripes to become availabe for allocation.

Cc: linux-raid@vger.kernel.org
Cc: Shaohua Li &lt;shli@kernel.org&gt;
Cc: linux-stable &lt;stable@vger.kernel.org&gt; # 4.10+
Fixes: b4c625c67362 ("md/r5cache: r5cache recovery: part 1")
Signed-off-by: Alexei Naberezhnov &lt;anaberezhnov@fb.com&gt;
Signed-off-by: Song Liu &lt;songliubraving@fb.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for-5.0/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm</title>
<updated>2019-01-24T20:07:18Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-01-24T20:07:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cffd425b90147296c627dfb13f7ea8f361d962b2'/>
<id>urn:sha1:cffd425b90147296c627dfb13f7ea8f361d962b2</id>
<content type='text'>
Pull device mapper fixes from Mike Snitzer:

 - Fix DM crypt's parsing of extended IV arguments.

 - Fix DM thinp's discard passdown to properly account for extra
   reference that is taken to guard against reallocating a block before
   a discard has been issued.

 - Fix bio-based DM's redundant IO accounting that was occurring for
   bios that must be split due to the nature of the DM target (e.g.
   dm-stripe, dm-thinp, etc).

* tag 'for-5.0/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
  dm: add missing trace_block_split() to __split_and_process_bio()
  dm: fix dm_wq_work() to only use __split_and_process_bio() if appropriate
  dm: fix redundant IO accounting for bios that need splitting
  dm: fix clone_bio() to trigger blk_recount_segments()
  dm thin: fix passdown_double_checking_shared_status()
  dm crypt: fix parsing of extended IV arguments
</content>
</entry>
<entry>
<title>dm: add missing trace_block_split() to __split_and_process_bio()</title>
<updated>2019-01-22T18:41:48Z</updated>
<author>
<name>Mike Snitzer</name>
<email>snitzer@redhat.com</email>
</author>
<published>2019-01-18T06:21:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=075c18c3e124a1511ebc10a89f1858c8a77dcb01'/>
<id>urn:sha1:075c18c3e124a1511ebc10a89f1858c8a77dcb01</id>
<content type='text'>
Provides useful context about bio splits in blktrace.

Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm: fix dm_wq_work() to only use __split_and_process_bio() if appropriate</title>
<updated>2019-01-22T18:41:40Z</updated>
<author>
<name>Mike Snitzer</name>
<email>snitzer@redhat.com</email>
</author>
<published>2019-01-17T19:33:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6548c7c538e5658cbce686c2dd1a9b4f5398bf34'/>
<id>urn:sha1:6548c7c538e5658cbce686c2dd1a9b4f5398bf34</id>
<content type='text'>
Otherwise targets that don't support/expect IO splitting could resubmit
bios using code paths with unnecessary IO splitting complexity.

Depends-on: 24113d487843 ("dm: avoid indirect call in __dm_make_request")
Fixes: 978e51ba38e00 ("dm: optimize bio-based NVMe IO submission")
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
</feed>
