Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add comments about patch series

...

All patches that land on the main release branches in the fs/lustre-release repository must conform to the Lustre Coding Guidelines, pass the standard Lustre regression tests. All patches should be associated with a Lustre Jira ticket, and by signed off by the developer. Bug fixes should include additional regression tests that confirm the problem exists before the fix is landed, and verify the patch resolves the problem afterward. Feature patches should include new regression tests to exercise the feature, and potentially performance or load tests as appropriate for the change. All changes submitted to the fs/lustre-release repository will be tested automatically with the Lustre regression tests in lustre/tests and a link to the test results (saved in Maloo) and a pass/fail review comment will be added to the Gerrit change. For additional tests run outside of autotest, the results can either be sent to Maloo manually, or test results can be posted into the Jira ticket associated with the patch.

If there are a series of changes being made to the code (e.g. code style fixes, renaming some functions, adding function parameters, moving code from one file to another, making the actual fix for a bug, making some additional fixes to other defects found during coding), these should all go into separate patches for inspection and testing. Having a series of smaller patches, each of which makes a single, clearly understood change speeds up inspection significantly. Ordering uncontroversial and easy-to-inspect changes first in a patch series ensures that they are only inspected a single time, and can land quickly. Ordering complex changes at the end of the patch series ensures that if changes are requested by the inspectors for these patches, the earlier ones do not need to be re-inspected and re-tested for each update. Following this patch submission model speeds up patch landing, and reduces the burden on the patch inspector, and test systems, and reduces the time that the patch submitter needs to spend waiting or rebasing in order to get their patches accepted.

If there are a number of patches on a git branch, pushing the changes to Gerrit will result in the entire series of patches being sent, with a separate change for each patch. Gerrit correctly tracks dependencies for these patches. If the patches are rebased, either on a new Lustre version, or one of the earlier patches in the series is modified, then all modified patches will be resubmitted to Gerrit for re-inspection, build, and testing.

Any patches that require updates to the Lustre manual will also need to submit documentation updates when the patch is ready for submission. See the link Making changes to the Lustre Manual.

For code that requires modifications or additions to the existing suite of automated Lustre tests, the new or modified test scripts must be submitted with the patch. If there is a defect in the existing code, it means that there is no regression test that covers this code path. A new test should be written that confirms the problem be hit by the test before the fix is landed, and verifies the patch resolves the problem afterward. Any additional testing that cannot be covered by the existing automated Lustre tests must also be documented with a clear, step-by-step test plan, and arrangements must be made with the Lustre test team to execute these plans.

...

The first line of the commit comment is the commit summary of the change. Changes submitted to the fs/lustre-release branch also require a Lustre Jira issue tag at the beginning of the first line of the commit summary. A Lustre Jira ticket is one that begins with LU and is therefore part of the Lustre project within Jira. If the patch is submitted for the fs/lustre-release repository without a Lustre Jira ID in the first line, then it will automatically receive a -2 review which will prevent the patch from being submitted to a release branch. You will get an e-mail about this rejection at which time you can add the line and resubmit the patch. The commit summary should also have a component: field immediately following the Jira issue tag that indicates which Lustre subsystem that the commit is related to. Example Lustre subsystems relate to modules like llite, lov, osc, mdc, lmv, ldlm, ptlrpc, mds, oss, mdd, osd, ldiskfs, lnet, libcfs, socklnd, o2iblnd; functional components like recovery, quota, grant; or auxiliary components like build, testtests, docdocs. This subsystem list is not exhaustive, but should be used as provides a good guideline for consistency.

The rest of the comments should be wrapped to 70 columns or less. This allows for the first line to be used a subject in emails, and also for the entire body to be displayed using tools like "git log" or git shortlog in an 80 column window.

Please make sure the Change-Id: line and Signed-off-by: lines are at the bottom of the comment. This is required by the fs/lustre-release project (at least) in order for the patch to be approved. If your comments are missing either of these lines the patch will be automatically be rejected at submission time. See Using Gerrit for a description of the Change-Id: line .

...

No Format
LU-999 component: short description of change under 64 columns

A more detailed explanation.  This can be as detailed as you'd like.
Please explain both what problem was solved and a good high-level
description of how it was solved.  Wrap lines at 72 columns or less.

Signed-off-by: Random J Developer <random@developer.example.org>
Change-Id: Ica9ed1612eab0c4673dee088f8b441d806c64932

An example of a good commit comments are:

No Format

LU-477 ldiskfs: allocate s_group_desc/s_group_info by vmalloc()
    
Add the patch to the RHEL6 ldiskfs patch series.
    
Large kmalloc() for sbi->s_group_desc and sbi->s_group_info can fail
for large filesystems, which will cause the "not enough memory" error
while mounting. This patch makes it fall back to vmalloc() if the
kmalloc() failed, as what was done for sbi->s_flex_groups.
    
To avoid colliding with an valid on-disk inode number, EXT4_BAD_INO
is used as the number of the buddy cache inode.
    
The patch also incorporates the following upstream kernel fix:
    
commit 32a9bb57d7c1fd04ae0f72b8f671501f000a0e9f
ext4: fix missing iput of root inode for some mount error paths
https://bugzilla.kernel.org/show_bug.cgi?id=26752
No Format

LU-64 utils: make "lfs getstripe" directory output consistent.
    
"lfs getstripe" should report the global default for any fields with
a value that means "use the default". This patch introduces the
following functionality:
    
1. If "lfs getstripe" is called on a directory and finds that striping
   EA is not set, the filesystem's defaults are looked up and printed.
2. If the striping EA is set, but the striping count and/or striping
   size has a value that means "use the default" (count = 0 and/or
   size = 0), the filesystem's default for that specific striping
   attribute is looked up and printed.
3. A new option to "lfs getstripe" is introduced; the "--raw" or
   "-R" option. If this option is specified, the previous two checks
   are skipped. In other words, if the striping EA is not set, 0, 0,
   -1, will be printed for the striping count, size, and offset
   respectively. Also, if the striping EA is set, the values will be
   printed without first converting them into their respective
   defaults.
    
This patch relies on the /proc filesystem to determine each
filesystem's default striping attributes, and a cache is maintained
which holds the default values for the last filesystem queried.
    
See Also:
Bugzilla #23802, https://bugzilla.lustre.org/show_bug.cgi?id=23802

Submitting a change to a Lustre Release

...

  1. Test and commit your patch locally.
  2. Verify patch follows Lustre Coding Guidelines with git show | build/checkpatch.pl -
  3. Push your patch to Gerrit for inspection, and specify request at least two inspectors (preferably with experience in this area of code).
  4. Test your patch on real cluster and upload your test results to Maloo.
  5. Add a comment on Gerrit with the Maloo link to indicate that the patch works, and set the Verified flag.
  6. Add the branch gatekeeper as inspector on Gerrit to notify him/her that the patch is ready.
  7. The branch gatekeeper will review the patch, confirm the test results, and submit it when everything goes well.
  8. If the submission failed due to conflict(s), the gatekeeper will ask you to rebase your patch with the target branch and repeat above steps.
  9. If your patch is useful for other branch(es), please repeat above steps against corresponding branch(es).