[LU-1892] In-tree documentation improvements Created: 11/Sep/12  Updated: 07/Jun/16

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Ned Bass Assignee: Peter Jones
Resolution: Unresolved Votes: 0
Labels: documentation

Sub-Tasks:
Key
Summary
Type
Status
Assignee
LU-1914 Doxygen comments - ldlm module Technical task Resolved Ned Bass  
LU-1939 Doxygen comments - libcfs module Technical task Resolved Peter Jones  
LU-2220 Add CLIO documentation to doc directory Technical task Closed Ned Bass  
LU-4974 Doxygen comments - lod module Technical task Resolved Andreas Dilger  
LU-4975 Doxygen comments - ofd module Technical task Resolved Richard Henwood  
LU-4976 Doxygen comments - osp module Technical task Resolved Richard Henwood  
LU-4932 include design documentation in with ... Technical task Resolved Richard Henwood  
Rank (Obsolete): 10217

 Description   

The Lustre code base has a number undocumented areas, making it difficult for new developers to get their bearings. This issue is to track patches that add comments and documentation to the Lustre source tree, and to discuss how to approach the problem of documenting the code better. In particular, I have in mind the following types of improvements.

  • Doxygen comment headers on all non-trivial functions (See guidelines)
  • More thorough high-level description at the top of each file stating its reason for existing
  • Description of how the code is organized, i.e. what each directory is for
  • High level overview of Lustre internal architecture
  • Deep-dives into specific subsystems (i.e. http://wiki.lustre.org/images/3/37/CLIO-TOI-notes.pdf for CLIO)

While one could argue that the architectural content belongs in an external developers manual, developing it in-tree has several benefits

  • It is easier for someone poking around in the code to quickly come up to speed
  • Code changes can include corresponding documentation updates in the same patch
  • Plain text documentation can be evolved rapidly and informally and later incorporated into a formal manual
  • It is consistent with how the Documentation directory is used in the Linux kernel


 Comments   
Comment by Andreas Dilger [ 11/Sep/12 ]

Ned, I was poking around Bugzilla last week, and in fact there appear to be a number of bugs with patches for DOxygen comments in them that are still open. It would probably make a lot of sense to take a look at those patches, and either determine they have already landed and close the bugs, or update the patches for master under this patch (and still close those bugs).

Comment by Ned Bass [ 11/Sep/12 ]

Good idea, I'll search for them and start evaluating.

Comment by Ned Bass [ 11/Sep/12 ]

Here are the open tickets I found and their status.

bz summary patch status Assignee/Author
20943 Doxygen comments - ldlm module inspection+/not landed Oleg
20969 Doxygen comments - ptlrpc module landed Oleg
20973 Doxygen comments - lnet module landed Isaac Huang
20974 Doxygen comments - libcfs module inspection+/not landed Maxim Patlasov
20976 Doxygen comments - liblustre module nonexistent Oleg
21833 Doxygen comments - lustre target code inspection-/not landed Mikhail
23011 Doxygen comments - OSD module nonexistent Mikhail
23718 Doxygen style comments on gss/kerberos code landed Eric Mei
Comment by Cory Spitz [ 29/Apr/14 ]

FYI: Hugo F. took an action item from the CDWG LUG meeting to work out whether we can start building on the LID (http://wiki.lustre.org/lid) as part of the lustre.org asset assignment to OpenSFS and EOFS.

Comment by Ned Bass [ 23/Jul/14 ]

After reviewing many of the patches in the sub-task issues, I think we could standardize and improve how we use the doxygen command \retval. The format should be as follows (see manual)

\retval <return value> { description }

Where the first two fields are separated by a single space, <return value> is a single word (positive, negative, pointer, size, etc.), and the description is tab-indented. For example,

 * \retval 0                 FID lookup succeeded
 * \retval negative          negated errno if lookup failed

This convention would improve code readability and the quality of automatically generated documentation.

Comment by Gerrit Updater [ 04/Dec/14 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12659/
Subject: LU-1892 osp: Fix Doxygen warnings for osp_trans.c
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 99a05bdd378be62c31e0e2320310871eb9c9b68b

Generated at Sat Feb 10 01:20:36 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.