Whamcloud - gitweb
LU-4423 ptlrpc: use 64-bit times in ptlrpc_enc_page_pool
[fs/lustre-release.git] / ldiskfs / README
1 This directory contains the patches needed to convert ext4 into ldiskfs.
2 They are applied automatically during the ldiskfs build process and
3 should not be applied to the core kernel directly.
4
5 We need to be able to create a version of ldiskfs from the ext4 source
6 code found in multiple versions of the kernel.  That ext4 source code can
7 vary quite a bit between different versions of the kernel, which means
8 that it is impossible to maintain one set of patches that will cleanly
9 apply to all versions of ext4.
10
11 Where to put a new patch
12 ------------------------
13
14 Therefore, we split the patches into multiple subdirectories in the
15 "kernel_patches/patches" directory.  These subdirecotories are named
16 after the version of the Linux distribution against which they were
17 developed.  For instance, "patches/rhel6.3" and "patches/sles11sp1".
18
19 When creating a new patch, put it in the subdirectory for the
20 distribution for which it was first created.
21
22 Sharing patches
23 ---------------
24
25 Often a patch will apply cleanly to multiple kernel's ext4 code.
26
27 If a patch from a different distribution's subdirectory applies cleanly,
28 it should be included directly in that distribution's series file rather
29 than making a copy of the patch.  As an example, lets consider two
30 distribution directories:
31
32   patches/rhel6.3
33   patches/sles11sp1
34
35 If a patch named "patches/rhel6.3/foo.patch" applies cleanly and is
36 needed by the sles11sp1 ext4 code, the sles11sp1 series file should
37 directly list "patches/rhel6.3/foo.patch".  A copy of the same patch
38 should only be made when the patch will not apply without changes.
39
40 Updating patches for a new kernel/distribution
41 ------------------------------------------------
42
43 When adding support for a new OS distribution release and its new
44 version of the kernel, it is common to begin by copying the patch
45 series file from a similar OS release.  For instance, when beginning
46 to add support for the RHEL 6.4 kernel, one might copy the
47 kernel_patches/series/ldiskfs-2.6-rhel6.3.series file to the new name
48 kernel_patches/series/ldiskfs-2.6-rhel6.4.series.
49
50 When applying that series, some patches are likely to succeed and others
51 to fail to apply.  When a patch fails to apply, a copy of it should be
52 made into a new distribution subdirectory before refreshing that patch.
53 In this way, support for the new kernel may be added without breaking
54 support for the previous kernel.  As an example, if the patch:
55
56   patches/rhel6.3/foo.patch
57
58 fails to apply as part of series/ldiskfs-2.6-rhel6.4.series, the developer
59 would copy the patch to:
60
61   patches/rhel6.4/foo.patch
62
63 The next step would be to edit series/ldiskfs-2.6-rhel6.4.series to point
64 to the new patch.  Finally, the developer may edit files and "quilt refresh"
65 the new patch.
66
67 Detecting which patch series to apply
68 -------------------------------------
69
70 If a new kernel/distro is being added, in order for these patches to be
71 applied during the build process, the kernel version needs to map to a
72 specific series.  This is done in config/lustre-build-ldiskfs.m4 in the
73 LDISKFS_LINUX_SERIES check.