UBIFS: various comment improvements and fixes

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
This commit is contained in:
Artem Bityutskiy 2008-12-16 17:52:35 +02:00
parent 21a6025897
commit d3cf502b6c
2 changed files with 24 additions and 22 deletions

View File

@ -520,13 +520,13 @@ static int is_lprops_dirty(struct ubifs_info *c, struct ubifs_lprops *lprops)
* @flags: new flags
* @idx_gc_cnt: change to the count of idx_gc list
*
* This function changes LEB properties. This function does not change a LEB
* property (@free, @dirty or @flag) if the value passed is %LPROPS_NC.
* This function changes LEB properties (@free, @dirty or @flag). However, the
* property which has the %LPROPS_NC value is not changed. Returns a pointer to
* the updated LEB properties on success and a negative error code on failure.
*
* This function returns a pointer to the updated LEB properties on success
* and a negative error code on failure. N.B. the LEB properties may have had to
* be copied (due to COW) and consequently the pointer returned may not be the
* same as the pointer passed.
* Note, the LEB properties may have had to be copied (due to COW) and
* consequently the pointer returned may not be the same as the pointer
* passed.
*/
const struct ubifs_lprops *ubifs_change_lp(struct ubifs_info *c,
const struct ubifs_lprops *lp,

View File

@ -482,24 +482,26 @@ struct ubifs_lpt_lprops {
* @empty_lebs: number of empty LEBs
* @taken_empty_lebs: number of taken LEBs
* @idx_lebs: number of indexing LEBs
* @total_free: total free space in bytes
* @total_dirty: total dirty space in bytes
* @total_used: total used space in bytes (includes only data LEBs)
* @total_dead: total dead space in bytes (includes only data LEBs)
* @total_dark: total dark space in bytes (includes only data LEBs)
* @total_free: total free space in bytes (includes all LEBs)
* @total_dirty: total dirty space in bytes (includes all LEBs)
* @total_used: total used space in bytes (does not include index LEBs)
* @total_dead: total dead space in bytes (does not include index LEBs)
* @total_dark: total dark space in bytes (does not include index LEBs)
*
* N.B. total_dirty and total_used are different to other total_* fields,
* because they account _all_ LEBs, not just data LEBs.
* The @taken_empty_lebs field counts the LEBs that are in the transient state
* of having been "taken" for use but not yet written to. @taken_empty_lebs is
* needed to account correctly for @gc_lnum, otherwise @empty_lebs could be
* used by itself (in which case 'unused_lebs' would be a better name). In the
* case of @gc_lnum, it is "taken" at mount time or whenever a LEB is retained
* by GC, but unlike other empty LEBs that are "taken", it may not be written
* straight away (i.e. before the next commit start or unmount), so either
* @gc_lnum must be specially accounted for, or the current approach followed
* i.e. count it under @taken_empty_lebs.
*
* 'taken_empty_lebs' counts the LEBs that are in the transient state of having
* been 'taken' for use but not yet written to. 'taken_empty_lebs' is needed
* to account correctly for gc_lnum, otherwise 'empty_lebs' could be used
* by itself (in which case 'unused_lebs' would be a better name). In the case
* of gc_lnum, it is 'taken' at mount time or whenever a LEB is retained by GC,
* but unlike other empty LEBs that are 'taken', it may not be written straight
* away (i.e. before the next commit start or unmount), so either gc_lnum must
* be specially accounted for, or the current approach followed i.e. count it
* under 'taken_empty_lebs'.
* @empty_lebs includes @taken_empty_lebs.
*
* @total_used, @total_dead and @total_dark fields do not account indexing
* LEBs.
*/
struct ubifs_lp_stats {
int empty_lebs;