On Thu, Dec 04 2014 at 10:33am -0500, Mike Snitzer <snitzer@xxxxxxxxxx> wrote: > From: Mike Snitzer <snitzer@xxxxxxxxxx> > Date: Thu, 4 Dec 2014 10:18:32 -0500 > Subject: [PATCH] dm thin: optimize away writing all zeroes to unprovisioned blocks > > Introduce bio_is_zero_filled() and use it to optimize away writing all > zeroes to unprovisioned blocks. Subsequent reads to the associated > unprovisioned blocks will be zero filled. > > Signed-off-by: Mike Snitzer <snitzer@xxxxxxxxxx> > Cc: Eric Wheeler <ewheeler@xxxxxxxxxxxx> > Cc: Jens Axboe <axboe@xxxxxxxxx> In testing this patch it is now quite clear that this change seriously impacts test coverage in the device-mapper-test-suite because dmts' wipe_device() uses /dev/zero as the ifile for dd to write to the disk. As such, with this patch all tests expecting to see provisioned blocks as a side-effect of wipe_device now fail (e.g. DiscardQuickTests). So this change won't go upstream until full test coverage can be restored in dmts. I'll see what I can come up with but it is low priority. BTW, this also makes me wonder if this change will be extremely unintuitive to existing or future user of DM thinp. So much so that it might be best to require a new thin-pool feature flag to enable this optimization. Mike -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel