diff options
Diffstat (limited to 'fs/ubifs/find.c')
| -rw-r--r-- | fs/ubifs/find.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/ubifs/find.c b/fs/ubifs/find.c index 10394c548367..c70c7679c1bf 100644 --- a/fs/ubifs/find.c +++ b/fs/ubifs/find.c | |||
| @@ -290,9 +290,14 @@ int ubifs_find_dirty_leb(struct ubifs_info *c, struct ubifs_lprops *ret_lp, | |||
| 290 | idx_lp = idx_heap->arr[0]; | 290 | idx_lp = idx_heap->arr[0]; |
| 291 | sum = idx_lp->free + idx_lp->dirty; | 291 | sum = idx_lp->free + idx_lp->dirty; |
| 292 | /* | 292 | /* |
| 293 | * Since we reserve twice as more space for the index than it | 293 | * Since we reserve trice as more space for the index than it |
| 294 | * actually takes, it does not make sense to pick indexing LEBs | 294 | * actually takes, it does not make sense to pick indexing LEBs |
| 295 | * with less than half LEB of dirty space. | 295 | * with less than, say, half LEB of dirty space. May be half is |
| 296 | * not the optimal boundary - this should be tested and | ||
| 297 | * checked. This boundary should determine how much we use | ||
| 298 | * in-the-gaps to consolidate the index comparing to how much | ||
| 299 | * we use garbage collector to consolidate it. The "half" | ||
| 300 | * criteria just feels to be fine. | ||
| 296 | */ | 301 | */ |
| 297 | if (sum < min_space || sum < c->half_leb_size) | 302 | if (sum < min_space || sum < c->half_leb_size) |
| 298 | idx_lp = NULL; | 303 | idx_lp = NULL; |
