1- OpenZFS Patches
1+ illumos Patches
22===============
33
4- The ZFS on Linux project is an adaptation of the upstream `OpenZFS
5- repository <https://github.com/openzfs/openzfs/> `__ designed to work in
6- a Linux environment. This upstream repository acts as a location where
7- new features, bug fixes, and performance improvements from all the
8- OpenZFS platforms can be integrated. Each platform is responsible for
9- tracking the OpenZFS repository and merging the relevant improvements
10- back in to their release.
11-
12- For the ZFS on Linux project this tracking is managed through an
13- `OpenZFS tracking <http://build.zfsonlinux.org/openzfs-tracking.html >`__
14- page. The page is updated regularly and shows a list of OpenZFS commits
15- and their status in regard to the ZFS on Linux master branch.
16-
17- This page describes the process of applying outstanding OpenZFS commits
18- to ZFS on Linux and submitting those changes for inclusion. As a
19- developer this is a great way to familiarize yourself with ZFS on Linux
4+ OpenZFS tracks illumos ZFS patches at the
5+ `illumos Tracking <http://build.zfsonlinux.org/openzfs-tracking.html >`__
6+ page. The page shows a list of illumos commits and their status in regard to
7+ the OpenZFS master branch. This page is no longer regularly updated.
8+
9+ This page describes the process of applying outstanding illumos commits
10+ to OpenZFS and submitting those changes for inclusion. As a
11+ developer this is a great way to familiarize yourself with OpenZFS
2012and to begin quickly making a valuable contribution to the project. The
2113following guide assumes you have a `github
2214account <https://help.github.com/articles/signing-up-for-a-new-github-account/> `__,
2315are familiar with git, and are used to developing in a Linux
2416environment.
2517
26- Porting OpenZFS changes to ZFS on Linux
27- ---------------------------------------
18+ Porting illumos changes to OpenZFS
19+ ----------------------------------
2820
2921Setup the Environment
3022~~~~~~~~~~~~~~~~~~~~~
3123
3224**Clone the source. ** Start by making a local clone of the
33- `spl <https://github.com/zfsonlinux/spl >`__ and
34- `zfs <https://github.com/zfsonlinux/zfs >`__ repositories.
25+ `zfs <https://github.com/zfsonlinux/zfs >`__ repository.
3526
3627::
3728
38- $ git clone -o zfsonlinux https://github.com/zfsonlinux/spl.git
3929 $ git clone -o zfsonlinux https://github.com/zfsonlinux/zfs.git
4030
4131**Add remote repositories. ** Using the GitHub web interface
4232`fork <https://help.github.com/articles/fork-a-repo/ >`__ the
4333`zfs <https://github.com/zfsonlinux/zfs >`__ repository in to your
4434personal GitHub account. Add your new zfs fork and the
45- `openzfs <https://github.com/openzfs/openzfs / >`__ repository as remotes
46- and then fetch both repositories. The OpenZFS repository is large and
47- the initial fetch may take some time over a slow connection.
35+ `illumos-gate <https://github.com/illumos/illumos-gat / >`__ repository as
36+ remotes and then fetch both repositories. The illumos-gate repository is large
37+ and the initial fetch may take some time over a slow connection.
4838
4939::
5040
5141 $ cd zfs
5242 $ git remote add <your-github-account> [email protected] :<your-github-account>/zfs.git 53- $ git remote add openzfs https://github.com/openzfs/openzfs .git
43+ $ git remote add illumos-gate https://github.com/illumos/illumos-gate .git
5444 $ git fetch --all
5545
56- **Build the source. ** Compile the spl and zfs master branches. These
57- branches are always kept stable and this is a useful verification that
46+ **Build the source. ** Compile the zfs master branch. This branch
47+ is always kept stable and this is a useful verification that
5848you have a full build environment installed and all the required
5949dependencies are available. This may also speed up the compile time
6050latter for small patches where incremental builds are an option.
6151
6252::
6353
64- $ cd ../spl
65- $ sh autogen.sh && ./configure --enable-debug && make -s -j$(nproc)
66- $
6754 $ cd ../zfs
6855 $ sh autogen.sh && ./configure --enable-debug && make -s -j$(nproc)
6956
7057Pick a patch
7158~~~~~~~~~~~~
7259
73- Consult the `OpenZFS
60+ Consult the `illumos
7461tracking <http://build.zfsonlinux.org/openzfs-tracking.html> `__ page and
7562select a patch which has not yet been applied. For your first patch you
7663will want to select a small patch to familiarize yourself with the
@@ -123,7 +110,7 @@ Download the script:
123110 ./openzfs-merge.sh -d path_to_zfs_folder -c openzfs_commit_hash
124111
125112This command will fetch all repositories, create a new branch
126- ``autoport-ozXXXX `` (XXXX - OpenZFS issue number), try to cherry-pick,
113+ ``autoport-ozXXXX `` (XXXX - illumos issue number), try to cherry-pick,
127114compile and check cstyle on success.
128115
129116If it succeeds without any merge conflicts - go to ``autoport-ozXXXX ``
@@ -161,21 +148,21 @@ Manual merge
161148^^^^^^^^^^^^
162149
163150**Create a new branch. ** It is important to create a new branch for
164- every commit you port to ZFS on Linux . This will allow you to easily
151+ every commit you port to OpenZFS . This will allow you to easily
165152submit your work as a GitHub pull request and it makes it possible to
166153work on multiple OpenZFS changes concurrently. All development branches
167- need to be based off of the ZFS master branch and it's helpful to name
154+ need to be based off of the OpenZFS master branch and it's helpful to name
168155the branches after the issue number you're working on.
169156
170157::
171158
172- $ git checkout -b openzfs -<issue-nr> master
159+ $ git checkout -b illumos -<issue-nr> master
173160
174161**Generate a patch. ** One of the first things you'll notice about the
175- ZFS on Linux repository is that it is laid out differently than the
176- OpenZFS repository. Organizationally it is much flatter, this is
162+ OpenZFS repository is that it is laid out differently than the
163+ illumos-gate repository. Organizationally it is much flatter, this is
177164possible because it only contains the code for OpenZFS not an entire OS.
178- That means that in order to apply a patch from OpenZFS the path names in
165+ That means that in order to apply a patch from illumos the path names in
179166the patch must be changed. A script called zfs2zol-patch.sed has been
180167provided to perform this translation. Use the ``git format-patch ``
181168command and this script to generate a patch.
@@ -197,51 +184,54 @@ cleanly while preserving the its original intent.
197184
198185::
199186
200- $ git am ./openzfs -<commit-nr>.diff
187+ $ git am ./illumos -<commit-nr>.diff
201188
202189**Update the commit message. ** By using ``git format-patch `` to generate
203190the patch and then ``git am `` to apply it the original comment and
204191authorship will be preserved. However, due to the formatting of the
205- OpenZFS commit you will likely find that the entire commit comment has
192+ illumos commit you will likely find that the entire commit comment has
206193been squashed in to the subject line. Use ``git commit --amend `` to
207194cleanup the comment and be careful to follow `these standard
208195guidelines <http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html> `__.
209196
210- The summary line of an OpenZFS commit is often very long and you should
197+ The summary line of an illumos commit is often very long and you should
211198truncate it to 50 characters. This is useful because it preserves the
212199correct formatting of ``git log --pretty=oneline `` command. Make sure to
213200leave a blank line between the summary and body of the commit. Then
214- include the full OpenZFS commit message wrapping any lines which exceed
201+ include the full illumos commit message wrapping any lines which exceed
21520272 characters. Finally, add a ``Ported-by `` tag with your contact
216- information and both a ``OpenZFS -issue `` and ``OpenZFS -commit `` tag with
203+ information and both a ``illumos -issue `` and ``illumos -commit `` tag with
217204appropriate links. You'll want to verify your commit contains all of the
218205following information:
219206
220- - The subject line from the original OpenZFS patch in the form:
221- "OpenZFS <issue-nr> - short description".
207+ - The subject line from the original illumos patch in the form:
208+ "illumos <issue-nr> - short description".
222209- The original patch authorship should be preserved.
223- - The OpenZFS commit message.
210+ - The illumos commit message.
224211- The following tags:
225212
226213 - **Authored by: ** Original patch author
227- - **Reviewed by: ** All OpenZFS reviewers from the original patch.
228- - **Approved by: ** All OpenZFS reviewers from the original patch.
214+ - **Reviewed by: ** All illumos reviewers from the original patch.
215+ - **Approved by: ** All illumos reviewers from the original patch.
229216 - **Ported-by: ** Your name and email address.
230- - **OpenZFS -issue: ** https ://www.illumos.org/issues/issue
231- - **OpenZFS -commit: ** https
232- ://github.com/openzfs/openzfs /commit/hash
217+ - **illumos -issue: ** https ://www.illumos.org/issues/issue
218+ - **illumos -commit: ** https
219+ ://github.com/illumos/illumos-gate /commit/hash
233220
234221- **Porting Notes: ** An optional section describing any changes
235222 required when porting.
236223
237- For example, OpenZFS issue 6873 was `applied to
238- Linux <https://github.com/zfsonlinux/zfs/commit/b3744ae> `__ from this
239- upstream `OpenZFS
240- commit <https://github.com/openzfs/openzfs/commit/ee06391> `__.
224+ For example, illumos issue 6873 was `applied to
225+ OpenZFS <https://github.com/openzfs/openzfs/commit/b3744ae> `__ from this
226+ upstream `illumos
227+ commit <https://github.com/illumos/illumos-gate/commit/ee06391> `__. Note
228+ that this example predates the OpenZFS renaming, so the real commit uses
229+ "OpenZFS" instead of "illumos"; the example below show how it should look
230+ if done today.
241231
242232::
243233
244- OpenZFS 6873 - zfs_destroy_snaps_nvl leaks errlist
234+ illumos 6873 - zfs_destroy_snaps_nvl leaks errlist
245235
246236 Authored by: Chris Williamson <[email protected] > 247237 Reviewed by: Matthew Ahrens <[email protected] > @@ -251,8 +241,8 @@ commit <https://github.com/openzfs/openzfs/commit/ee06391>`__.
251241 lzc_destroy_snaps() returns an nvlist in errlist.
252242 zfs_destroy_snaps_nvl() should nvlist_free() it before returning.
253243
254- OpenZFS -issue: https://www.illumos.org/issues/6873
255- OpenZFS -commit: https://github.com/openzfs/openzfs/commit/ee06391
244+ illumos -issue: https://www.illumos.org/issues/6873
245+ illumos -commit: https://github.com/openzfs/openzfs/commit/ee06391
256246
257247Testing a Patch
258248~~~~~~~~~~~~~~~
@@ -275,7 +265,7 @@ checker, the command should return without printing any output.
275265style checks `open a new pull
276266request <https://help.github.com/articles/creating-a-pull-request/> `__.
277267The pull request will be queued for `automated
278- testing <https://github.com/zfsonlinux /zfs-buildbot/> `__. As part of the
268+ testing <https://github.com/openzfs /zfs-buildbot/> `__. As part of the
279269testing the change is built for a wide range of Linux distributions and
280270a battery of functional and stress tests are run to detect regressions.
281271
@@ -285,10 +275,10 @@ a battery of functional and stress tests are run to detect regressions.
285275
286276**Fix any issues. ** Testing takes approximately 2 hours to fully
287277complete and the results are posted in the GitHub `pull
288- request <https://github.com/zfsonlinux /zfs/pull/4594> `__. All the tests
278+ request <https://github.com/openzfs /zfs/pull/4594> `__. All the tests
289279are expected to pass and you should investigate and resolve any test
290280failures. The `test
291- scripts <https://github.com/zfsonlinux /zfs-buildbot/tree/master/scripts> `__
281+ scripts <https://github.com/openzfs /zfs-buildbot/tree/master/scripts> `__
292282are all available and designed to run locally in order reproduce an
293283issue. Once you've resolved the issue force update the pull request to
294284trigger a new round of testing. Iterate until all the tests are passing.
@@ -302,17 +292,8 @@ trigger a new round of testing. Iterate until all the tests are passing.
302292Merging the Patch
303293~~~~~~~~~~~~~~~~~
304294
305- **Review. ** Lastly one of the ZFS on Linux maintainers will make a final
295+ **Review. ** Lastly one of the OpenZFS maintainers will make a final
306296review of the patch and may request additional changes. Once the
307297maintainer is happy with the final version of the patch they will add
308298their signed-off-by, merge it to the master branch, mark it complete on
309299the tracking page, and thank you for your contribution to the project!
310-
311- Porting ZFS on Linux changes to OpenZFS
312- ---------------------------------------
313-
314- Often an issue will be first fixed in ZFS on Linux or a new feature
315- developed. Changes which are not Linux specific should be submitted
316- upstream to the OpenZFS GitHub repository for review. The process for
317- this is described in the `OpenZFS
318- README <https://github.com/openzfs/openzfs/> `__.
0 commit comments