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
..
2016-05-12 22:28:05 -04:00
2017-08-30 13:29:22 -05:00
2014-03-03 13:50:12 +00:00
2016-06-27 09:47:09 -05:00
2017-07-21 07:48:22 -05:00
2016-06-27 09:47:08 -05:00
2017-07-17 13:39:15 -05:00
2008-06-27 09:39:44 +01:00
2017-08-30 08:14:39 -05:00
2017-08-10 10:42:11 -05:00
2017-08-09 09:36:39 -05:00
2016-08-02 12:05:27 -05:00
2013-06-03 14:20:18 -07:00
2017-08-25 18:47:18 -05:00
2014-05-14 10:04:34 +01:00
2016-06-07 13:41:38 -06:00
2011-05-10 13:12:49 +01:00
2017-08-30 08:14:27 -05:00
2017-04-19 08:25:43 -04:00
2012-01-11 09:23:05 +00:00
2017-08-25 18:47:18 -05:00
2017-08-25 18:47:18 -05:00
2015-12-06 21:25:17 -05:00