]> git.proxmox.com Git - mirror_zfs.git/blame - .github/CONTRIBUTING.md
Add CONTRIBUTING information and templates
[mirror_zfs.git] / .github / CONTRIBUTING.md
CommitLineData
d57f03e4
GM
1# Contributing to ZFS on Linux
2<p align="center"><img src="http://zfsonlinux.org/images/zfs-linux.png"/></p>
3
4*First of all, thank you for taking the time to contribute!*
5
6By using the following guidelines, you can help us make ZFS on Linux even
7better.
8
9## Table Of Contents
10[What should I know before I get
11started?](#what-should-i-know-before-i-get-started)
12
13 * [Get ZFS](#get-zfs)
14 * [Debug ZFS](#debug-zfs)
15 * [Where can I ask for help?](#where-can-I-ask-for-help)
16
17[How Can I Contribute?](#how-can-i-contribute)
18
19 * [Reporting Bugs](#reporting-bugs)
20 * [Suggesting Enhancements](#suggesting-enhancements)
21 * [Pull Requests](#pull-requests)
22 * [Testing](#testing)
23
24[Style Guides](#style-guides)
25
26 * [Coding Conventions](#coding-conventions)
27
28Helpful resources
29
30 * [ZFS on Linux wiki](https://github.com/zfsonlinux/zfs/wiki)
31 * [OpenZFS Documentation](http://open-zfs.org/wiki/Developer_resources)
32
33## What should I know before I get started?
34
35### Get ZFS
36You can build zfs packages by following [these
37instructions](https://github.com/zfsonlinux/zfs/wiki/Building-ZFS),
38or install stable packages from [your distribution's
39repository](https://github.com/zfsonlinux/zfs/wiki/Getting-Started).
40
41### Debug ZFS
42A variety of methods and tools are available to aid ZFS developers.
43It's strongly recommended that when developing a patch the `--enable-debug`
44configure option should be set. This will enable additional correctness
45checks and all the ASSERTs to help quickly catch potential issues.
46
47In addition, there are numerous utilities and debugging files which
48provide visibility in to the inner workings of ZFS. The most useful
49of these tools are discussed in detail on the [debugging ZFS wiki
50page](https://github.com/zfsonlinux/zfs/wiki/Debugging).
51
52### Where can I ask for help?
53The [mailing list](https://github.com/zfsonlinux/zfs/wiki/Mailing-Lists)
54is the best place to ask for help.
55
56## How Can I Contribute?
57
58### Reporting Bugs
59*Please* contact us via the [mailing
60list](https://github.com/zfsonlinux/zfs/wiki/Mailing-Lists) if you aren't
61certain that you are experiencing a bug.
62
63If you run into an issue, please search our [issue
64tracker](https://github.com/zfsonlinux/zfs/issues) *first* to ensure the
65issue hasn't been reported before. Open a new issue only if you haven't
66found anything similar to your issue.
67
68You can open a new issue and search existing issues using the public [issue
69tracker](https://github.com/zfsonlinux/zfs/issues).
70
71#### When opening a new issue, please include the following information at the top of the issue:
72* What distribution (with version) you are using.
73* The spl and zfs versions you are using, installation method (repository
74or manual compilation).
75* Describe the issue you are experiencing.
76* Describe how to reproduce the issue.
77* Including any warning/errors/backtraces from the system logs.
78
79When a new issue is opened, it is not uncommon for developers to request
80additional information.
81
82In general, the more detail you share about a problem the quicker a
83developer can resolve it. For example, providing a simple test case is always
84exceptionally helpful.
85
86Be prepared to work with the developers investigating your issue. Your
87assistance is crucial in providing a quick solution. They may ask for
88information like:
89
90* Your pool configuration as reported by `zdb` or `zpool status`.
91* Your hardware configuration, such as
92 * Number of CPUs.
93 * Amount of memory.
94 * Whether your system has ECC memory.
95 * Whether it is running under a VMM/Hypervisor.
96 * Kernel version.
97 * Values of the spl/zfs module parameters.
98* Stack traces which may be logged to `dmesg`.
99
100### Suggesting Enhancements
101ZFS on Linux is a widely deployed production filesystem which is under
102active development. The team's primary focus is on fixing known issues,
103improving performance, and adding compelling new features.
104
105You can view the list of proposed features
106by filtering the issue tracker by the ["Feature"
107label](https://github.com/zfsonlinux/zfs/issues?q=is%3Aopen+is%3Aissue+label%3AFeature).
108If you have an idea for a feature first check this list. If your idea already
109appears then add a +1 to the top most comment, this helps us gauge interest
110in that feature.
111
112Otherwise, open a new issue and describe your proposed feature. Why is this
113feature needed? What problem does it solve?
114
115### Pull Requests
116* All pull requests must be based on the current master branch and apply
117without conflicts.
118* Please attempt to limit pull requests to a single commit which resolves
119one specific issue.
120* When updating a pull request squash multiple commits by performing a
121[rebase](https://git-scm.com/docs/git-rebase) (squash).
122* For large pull requests consider structuring your changes as a stack of
123logically independent patches which build on each other. This makes large
124changes easier to review and approve which speeds up the merging process.
125* Try to keep pull requests simple. Simple code with comments is much easier
126to review and approve.
127* Test cases should be provided when appropriate.
128* If your pull request improves performance, please include some benchmarks.
129* The pull request must pass all required [ZFS
130Buildbot](http://build.zfsonlinux.org/) builders before
131being accepted. If you are experiencing intermittent TEST
132builder failures, you may be experiencing a [test suite
133issue](https://github.com/zfsonlinux/zfs/issues?q=is%3Aissue+is%3Aopen+label%3A%22Test+Suite%22).
134* All proposed changes must be approved by a ZFS on Linux organization member.
135
136### Testing
137All help is appreciated! If you're in a position to run the latest code
138consider helping us by reporting any functional problems, performance
139regressions or other suspected issues. By running the latest code to a wide
140range of realistic workloads, configurations and architectures we're better
141able quickly identify and resolve potential issues.
142
143Users can also run the [ZFS Test
144Suite](https://github.com/zfsonlinux/zfs/tree/master/tests) on their systems
145to verify ZFS is behaving as intended.
146
147## Style Guides
148
149### Coding Conventions
150We currently use [C Style and Coding Standards for
151SunOS](http://www.cis.upenn.edu/%7Elee/06cse480/data/cstyle.ms.pdf) as our
152coding convention.