]> git.karo-electronics.de Git - karo-tx-linux.git/commit
The dm thin pool target claims to support the zeroing of discarded
authorMike Snitzer <snitzer@redhat.com>
Tue, 2 Oct 2012 00:01:03 +0000 (10:01 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 2 Oct 2012 00:01:03 +0000 (10:01 +1000)
commit10d4b2421021603f0d328161569018dbf097b74e
treeaafcfd07d76c6e569fdf870bf57c4b9e3ceea6ec
parent454832b8eeb292d0efea792d4620912ab0e114ef
The dm thin pool target claims to support the zeroing of discarded
data areas.  This turns out to be incorrect when processing discards
that do not exactly cover a complete number of blocks, so the target
must always set discard_zeroes_data_unsupported.

The thin pool target will zero blocks when they are allocated if the
skip_block_zeroing feature is not specified.  The block layer
may send a discard that only partly covers a block.  If a thin pool
block is partially discarded then there is no guarantee that the
discarded data will get zeroed before it is accessed again.
Due to this, thin devices cannot claim discards will always zero data.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Joe Thornber <ejt@redhat.com>
Cc: stable@vger.kernel.org # 3.4+
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-thin.c