mirror of
https://codeberg.org/shufflecake/shufflecake-c.git
synced 2026-01-11 13:31:21 -05:00
doc: Add comments in src files of Lite
One comment is a TODO about the possibility of doing slice garbage collection dynamically instead of requiring a reload. The other is a warning about the importance of terminating a TRIM bio before it reaches the block device, otherwise plausible deniability might break.
This commit is contained in:
parent
550a4a5804
commit
f0288879c4
2 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue