Skip to content

reiser4: precise discard: fixes on top of everything

Ivan Shapovalov reiserfs-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3reiser4: discard: signify non-idempotence of check_free_blocks() by changing its name.fs/reiser4/discard.c+10 -50 replies
2/3reiser4: discard: avoid checking same blocks multiple times.fs/reiser4/discard.c+156 -261 reply
3/3reiser4: discard: handle incomplete erase units at the end of a partition.fs/reiser4/discard.c+2 -11 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] reiser4: precise discard: fixes on top of everything

Here we fix two bugs in the precise discard implementation.
The first one is handling of "nearby" tail and head paddings which are parts of the same disk block. Our block checking function is not idempotent, and repeatedly calling it on the same block results in a false-negative. The fix is to remember the last checked range (the tail padding) of an extent, and then use this information during checking the head padding of the next extent. Information about preceding blocks is never needed.

The second one is handling of discard extents at the end of the partition: we must avoid checking blocks outside of the partition. The similar check already exists for the first erase unit in the partition.

Ivan Shapovalov (3):
reiser4: discard: signify non-idempotence of check_free_blocks() by changing its name.
reiser4: discard: avoid checking same blocks multiple times.
reiser4: discard: handle incomplete erase units at the end of a partition.

 fs/reiser4/discard.c | 194 +++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 165 insertions(+), 29 deletions(-)
Signature · 1 line
2.3.0