]> git.baikalelectronics.ru Git - kernel.git/commit
exofs: Fix truncate for the raid-groups case
authorBoaz Harrosh <bharrosh@panasas.com>
Thu, 4 Aug 2011 03:44:16 +0000 (20:44 -0700)
committerBoaz Harrosh <bharrosh@panasas.com>
Thu, 4 Aug 2011 19:35:25 +0000 (12:35 -0700)
commit6a1648573d0b341b41223d42f120f8c184345178
tree0fbbcf34fbbaed8e2c57ea2f1fd061dcbcd8f511
parent1968c60d2c1c97a3183d03cf5ee26b377ff9d0a5
exofs: Fix truncate for the raid-groups case

In the general raid-group case the truncate was wrong in that
it did not also fix the object length of the neighboring groups.

There are two bad cases in the old code:
1. Space that should be freed was not.
2. If a file That was big is truncated small, then made bigger
   again, the holes would not contain zeros but could expose old data.
   (If the growing of the file expands to more than a full
    groups cycle + group size (> S + T))

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
fs/exofs/ios.c