diff --git a/dm-sflc/src/lite/discard.c b/dm-sflc/src/lite/discard.c index 172257c..d41d59b 100644 --- a/dm-sflc/src/lite/discard.c +++ b/dm-sflc/src/lite/discard.c @@ -60,6 +60,9 @@ unlock: up_read(&svol->posmap.flush_lock); /* Done */ + /* WARNING: it is crucial that the original bio is terminated here and never + reaches the block device, otherwise the effect of a TRIM on the block device + would be obvious, and likely to break plausible deniability */ bio_endio(orig_bio); return; } diff --git a/dm-sflc/src/lite/posmap.c b/dm-sflc/src/lite/posmap.c index 95c46e9..8c0b57a 100644 --- a/dm-sflc/src/lite/posmap.c +++ b/dm-sflc/src/lite/posmap.c @@ -127,6 +127,8 @@ int sflite_destroy_local_slice_mapping(struct sflite_volume *svol, u32 lsi) so the counters must remain untouched to avoid confusion. */ // sdev->nr_free_slices++; // svol->posmap.nr_mapped_slices--; + /* TODO: possible to improve by freeing up slices dynamically instead of + requiring reload/close-open? */ /* Set the dirty bit in position map */ __set_bit(lsi/SFLITE_PSIS_PER_BLOCK, svol->posmap.dirty_bitmap);