Commit graph android_kernel_sony_sdm845/drivers/md/persistent-data/dm-array.c
Message SHA1
dm array: if resizing the array is a noop set the new root to the old one
This could've been quite bad (to return success but not update the new
root to point at the old) but in practice the only known consumer of the
dm array code is the DM cache target.  And the DM cache target passes in
the same old root to array_resize() anyway.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>

Joe Thornber   authored and   Mike Snitzer   commited 2014-12-01 11:30:07 -05:00
8001e87d0e
dm array: fix a reference counting bug in shadow_ablock
An old array block could have its reference count decremented below
zero when it is being replaced in the btree by a new array block.

The fix is to increment the old ablock's reference count just before
inserting a new ablock into the btree.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org # 3.9+

Joe Thornber   authored and   Mike Snitzer   commited 2013-12-13 14:22:10 -05:00
ed9571f0cf
dm array: fix bug in growing array
Entries would be lost if the old tail block was partially filled.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org # 3.9+

Joe Thornber   authored and   Mike Snitzer   commited 2013-11-05 11:20:50 -05:00
9c1d4de560
dm persistent data: add transactional array
Add a transactional array.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>

Joe Thornber   authored and   Alasdair G Kergon   commited 2013-03-01 22:45:51 +00:00
6513c29f44