diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-12-16 10:52:35 -0500 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-12-23 05:23:08 -0500 |
commit | d3cf502b6ccee1c52890d42cd18cbc98b7526126 (patch) | |
tree | 4c8c0c8db4e7ee3782421a11b00bab2b8b153bd3 /fs | |
parent | 21a60258976227daaf7a4c35e96c3d77d4988b15 (diff) |
UBIFS: various comment improvements and fixes
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ubifs/lprops.c | 12 | ||||
-rw-r--r-- | fs/ubifs/ubifs.h | 34 |
2 files changed, 24 insertions, 22 deletions
diff --git a/fs/ubifs/lprops.c b/fs/ubifs/lprops.c index 10ba663eb329..dfd2bcece27a 100644 --- a/fs/ubifs/lprops.c +++ b/fs/ubifs/lprops.c | |||
@@ -520,13 +520,13 @@ static int is_lprops_dirty(struct ubifs_info *c, struct ubifs_lprops *lprops) | |||
520 | * @flags: new flags | 520 | * @flags: new flags |
521 | * @idx_gc_cnt: change to the count of idx_gc list | 521 | * @idx_gc_cnt: change to the count of idx_gc list |
522 | * | 522 | * |
523 | * This function changes LEB properties. This function does not change a LEB | 523 | * This function changes LEB properties (@free, @dirty or @flag). However, the |
524 | * property (@free, @dirty or @flag) if the value passed is %LPROPS_NC. | 524 | * property which has the %LPROPS_NC value is not changed. Returns a pointer to |
525 | * the updated LEB properties on success and a negative error code on failure. | ||
525 | * | 526 | * |
526 | * This function returns a pointer to the updated LEB properties on success | 527 | * Note, the LEB properties may have had to be copied (due to COW) and |
527 | * and a negative error code on failure. N.B. the LEB properties may have had to | 528 | * consequently the pointer returned may not be the same as the pointer |
528 | * be copied (due to COW) and consequently the pointer returned may not be the | 529 | * passed. |
529 | * same as the pointer passed. | ||
530 | */ | 530 | */ |
531 | const struct ubifs_lprops *ubifs_change_lp(struct ubifs_info *c, | 531 | const struct ubifs_lprops *ubifs_change_lp(struct ubifs_info *c, |
532 | const struct ubifs_lprops *lp, | 532 | const struct ubifs_lprops *lp, |
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h index e61c08106b47..f8ef7c1def1f 100644 --- a/fs/ubifs/ubifs.h +++ b/fs/ubifs/ubifs.h | |||
@@ -482,24 +482,26 @@ struct ubifs_lpt_lprops { | |||
482 | * @empty_lebs: number of empty LEBs | 482 | * @empty_lebs: number of empty LEBs |
483 | * @taken_empty_lebs: number of taken LEBs | 483 | * @taken_empty_lebs: number of taken LEBs |
484 | * @idx_lebs: number of indexing LEBs | 484 | * @idx_lebs: number of indexing LEBs |
485 | * @total_free: total free space in bytes | 485 | * @total_free: total free space in bytes (includes all LEBs) |
486 | * @total_dirty: total dirty space in bytes | 486 | * @total_dirty: total dirty space in bytes (includes all LEBs) |
487 | * @total_used: total used space in bytes (includes only data LEBs) | 487 | * @total_used: total used space in bytes (does not include index LEBs) |
488 | * @total_dead: total dead space in bytes (includes only data LEBs) | 488 | * @total_dead: total dead space in bytes (does not include index LEBs) |
489 | * @total_dark: total dark space in bytes (includes only data LEBs) | 489 | * @total_dark: total dark space in bytes (does not include index LEBs) |
490 | * | 490 | * |
491 | * N.B. total_dirty and total_used are different to other total_* fields, | 491 | * The @taken_empty_lebs field counts the LEBs that are in the transient state |
492 | * because they account _all_ LEBs, not just data LEBs. | 492 | * of having been "taken" for use but not yet written to. @taken_empty_lebs is |
493 | * needed to account correctly for @gc_lnum, otherwise @empty_lebs could be | ||
494 | * used by itself (in which case 'unused_lebs' would be a better name). In the | ||
495 | * case of @gc_lnum, it is "taken" at mount time or whenever a LEB is retained | ||
496 | * by GC, but unlike other empty LEBs that are "taken", it may not be written | ||
497 | * straight away (i.e. before the next commit start or unmount), so either | ||
498 | * @gc_lnum must be specially accounted for, or the current approach followed | ||
499 | * i.e. count it under @taken_empty_lebs. | ||
493 | * | 500 | * |
494 | * 'taken_empty_lebs' counts the LEBs that are in the transient state of having | 501 | * @empty_lebs includes @taken_empty_lebs. |
495 | * been 'taken' for use but not yet written to. 'taken_empty_lebs' is needed | 502 | * |
496 | * to account correctly for gc_lnum, otherwise 'empty_lebs' could be used | 503 | * @total_used, @total_dead and @total_dark fields do not account indexing |
497 | * by itself (in which case 'unused_lebs' would be a better name). In the case | 504 | * LEBs. |
498 | * of gc_lnum, it is 'taken' at mount time or whenever a LEB is retained by GC, | ||
499 | * but unlike other empty LEBs that are 'taken', it may not be written straight | ||
500 | * away (i.e. before the next commit start or unmount), so either gc_lnum must | ||
501 | * be specially accounted for, or the current approach followed i.e. count it | ||
502 | * under 'taken_empty_lebs'. | ||
503 | */ | 505 | */ |
504 | struct ubifs_lp_stats { | 506 | struct ubifs_lp_stats { |
505 | int empty_lebs; | 507 | int empty_lebs; |