Bob Peterson c4a9d1892f GFS2: Fix non-recursive truncate bug
Before this patch if you truncated a file to a smaller size it
wasn't freeing all the blocks properly. There are two reasons.

First, the metapath comparison was not comparing previous heights.
I added a function, mp_eq_to_hgt, which checks the metapath at
all heights prior to the target height.

Second, in function find_nonnull_ptr, it needed to zero out all
pointers for heights following the target height. Translated into
decimal integer terms, this way a number like 299, when incremented,
becomes 300, not 399. The 2 gets incremented to 3, and the following
digits need to be reset.

These two things allow the truncate state machine to properly find
the blocks it needs to delete.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
2017-08-30 13:29:22 -05:00
..
2017-05-05 15:24:52 -04:00
2017-05-12 15:57:15 -07:00
2017-06-14 19:37:23 +02:00
2017-06-09 09:27:32 -06:00
2017-08-30 13:29:22 -05:00
2017-07-06 16:24:35 -07:00
2017-07-03 09:55:26 -07:00
2017-07-05 17:09:27 -07:00
2017-06-27 17:02:36 -07:00
2017-06-09 11:27:20 +02:00
2017-04-17 12:52:27 -04:00
2017-07-07 19:38:17 -07:00
2017-07-07 13:48:18 -07:00
2017-05-08 17:15:12 -07:00
2017-06-09 16:28:01 -04:00
2017-07-05 18:44:23 -04:00