reiser4: iterate over extents in discard_atom
cover reiser4: iterate over extents in discard_atom
In this version we support all erase units (not only ones, which are powers of 2). I put a restriction 1MiB for erase units just to filter possible garbage. We can increase this boundary, if needed.
Alignments with (bdev_discard_alignment() % s_blocksize != 0) are still unsupported.
I have added mount options to specify erase unit and alignment in bytes. This is only for debugging purposes (to emulate real situations). Usage is the following:
mount /dev/xxx -o discard,discard.unit=yyy,discard.offset=zzz /mnt
Thanks,
Edward.