diff options
author | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-04-18 16:29:24 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-07-15 08:20:26 -0400 |
commit | 39443104c7d3f2b05a4a330fbcef6da68f80d60b (patch) | |
tree | 4405b2a60e9fa358522e4b90f564b135ff638c02 | |
parent | e0ae154404c33477473244f286b1193364144289 (diff) |
docs: blockdev: convert to ReST
Rename the blockdev documentation files to ReST, add an
index for them and adjust in order to produce a nice html
output via the Sphinx build system.
The drbd sub-directory contains some graphs and data flows.
Add those too to the documentation.
At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rw-r--r-- | Documentation/admin-guide/kernel-parameters.txt | 18 | ||||
-rw-r--r-- | Documentation/blockdev/drbd/data-structure-v9.rst (renamed from Documentation/blockdev/drbd/data-structure-v9.txt) | 6 | ||||
-rw-r--r-- | Documentation/blockdev/drbd/figures.rst | 28 | ||||
-rw-r--r-- | Documentation/blockdev/drbd/index.rst (renamed from Documentation/blockdev/drbd/README.txt) | 15 | ||||
-rw-r--r-- | Documentation/blockdev/floppy.rst (renamed from Documentation/blockdev/floppy.txt) | 88 | ||||
-rw-r--r-- | Documentation/blockdev/index.rst | 16 | ||||
-rw-r--r-- | Documentation/blockdev/nbd.rst (renamed from Documentation/blockdev/nbd.txt) | 2 | ||||
-rw-r--r-- | Documentation/blockdev/paride.rst (renamed from Documentation/blockdev/paride.txt) | 196 | ||||
-rw-r--r-- | Documentation/blockdev/ramdisk.rst (renamed from Documentation/blockdev/ramdisk.txt) | 55 | ||||
-rw-r--r-- | Documentation/blockdev/zram.rst (renamed from Documentation/blockdev/zram.txt) | 195 | ||||
-rw-r--r-- | MAINTAINERS | 8 | ||||
-rw-r--r-- | drivers/block/Kconfig | 8 | ||||
-rw-r--r-- | drivers/block/floppy.c | 2 | ||||
-rw-r--r-- | drivers/block/zram/Kconfig | 6 | ||||
-rw-r--r-- | tools/testing/selftests/zram/README | 2 |
15 files changed, 399 insertions, 246 deletions
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index a342dd5c95a9..6b2adda1cc03 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt | |||
@@ -1249,7 +1249,7 @@ | |||
1249 | See also Documentation/fault-injection/. | 1249 | See also Documentation/fault-injection/. |
1250 | 1250 | ||
1251 | floppy= [HW] | 1251 | floppy= [HW] |
1252 | See Documentation/blockdev/floppy.txt. | 1252 | See Documentation/blockdev/floppy.rst. |
1253 | 1253 | ||
1254 | force_pal_cache_flush | 1254 | force_pal_cache_flush |
1255 | [IA-64] Avoid check_sal_cache_flush which may hang on | 1255 | [IA-64] Avoid check_sal_cache_flush which may hang on |
@@ -2234,7 +2234,7 @@ | |||
2234 | memblock=debug [KNL] Enable memblock debug messages. | 2234 | memblock=debug [KNL] Enable memblock debug messages. |
2235 | 2235 | ||
2236 | load_ramdisk= [RAM] List of ramdisks to load from floppy | 2236 | load_ramdisk= [RAM] List of ramdisks to load from floppy |
2237 | See Documentation/blockdev/ramdisk.txt. | 2237 | See Documentation/blockdev/ramdisk.rst. |
2238 | 2238 | ||
2239 | lockd.nlm_grace_period=P [NFS] Assign grace period. | 2239 | lockd.nlm_grace_period=P [NFS] Assign grace period. |
2240 | Format: <integer> | 2240 | Format: <integer> |
@@ -3268,7 +3268,7 @@ | |||
3268 | 3268 | ||
3269 | pcd. [PARIDE] | 3269 | pcd. [PARIDE] |
3270 | See header of drivers/block/paride/pcd.c. | 3270 | See header of drivers/block/paride/pcd.c. |
3271 | See also Documentation/blockdev/paride.txt. | 3271 | See also Documentation/blockdev/paride.rst. |
3272 | 3272 | ||
3273 | pci=option[,option...] [PCI] various PCI subsystem options. | 3273 | pci=option[,option...] [PCI] various PCI subsystem options. |
3274 | 3274 | ||
@@ -3512,7 +3512,7 @@ | |||
3512 | needed on a platform with proper driver support. | 3512 | needed on a platform with proper driver support. |
3513 | 3513 | ||
3514 | pd. [PARIDE] | 3514 | pd. [PARIDE] |
3515 | See Documentation/blockdev/paride.txt. | 3515 | See Documentation/blockdev/paride.rst. |
3516 | 3516 | ||
3517 | pdcchassis= [PARISC,HW] Disable/Enable PDC Chassis Status codes at | 3517 | pdcchassis= [PARISC,HW] Disable/Enable PDC Chassis Status codes at |
3518 | boot time. | 3518 | boot time. |
@@ -3527,10 +3527,10 @@ | |||
3527 | and performance comparison. | 3527 | and performance comparison. |
3528 | 3528 | ||
3529 | pf. [PARIDE] | 3529 | pf. [PARIDE] |
3530 | See Documentation/blockdev/paride.txt. | 3530 | See Documentation/blockdev/paride.rst. |
3531 | 3531 | ||
3532 | pg. [PARIDE] | 3532 | pg. [PARIDE] |
3533 | See Documentation/blockdev/paride.txt. | 3533 | See Documentation/blockdev/paride.rst. |
3534 | 3534 | ||
3535 | pirq= [SMP,APIC] Manual mp-table setup | 3535 | pirq= [SMP,APIC] Manual mp-table setup |
3536 | See Documentation/x86/i386/IO-APIC.rst. | 3536 | See Documentation/x86/i386/IO-APIC.rst. |
@@ -3642,7 +3642,7 @@ | |||
3642 | 3642 | ||
3643 | prompt_ramdisk= [RAM] List of RAM disks to prompt for floppy disk | 3643 | prompt_ramdisk= [RAM] List of RAM disks to prompt for floppy disk |
3644 | before loading. | 3644 | before loading. |
3645 | See Documentation/blockdev/ramdisk.txt. | 3645 | See Documentation/blockdev/ramdisk.rst. |
3646 | 3646 | ||
3647 | psi= [KNL] Enable or disable pressure stall information | 3647 | psi= [KNL] Enable or disable pressure stall information |
3648 | tracking. | 3648 | tracking. |
@@ -3664,7 +3664,7 @@ | |||
3664 | pstore.backend= Specify the name of the pstore backend to use | 3664 | pstore.backend= Specify the name of the pstore backend to use |
3665 | 3665 | ||
3666 | pt. [PARIDE] | 3666 | pt. [PARIDE] |
3667 | See Documentation/blockdev/paride.txt. | 3667 | See Documentation/blockdev/paride.rst. |
3668 | 3668 | ||
3669 | pti= [X86_64] Control Page Table Isolation of user and | 3669 | pti= [X86_64] Control Page Table Isolation of user and |
3670 | kernel address spaces. Disabling this feature | 3670 | kernel address spaces. Disabling this feature |
@@ -3693,7 +3693,7 @@ | |||
3693 | See Documentation/admin-guide/md.rst. | 3693 | See Documentation/admin-guide/md.rst. |
3694 | 3694 | ||
3695 | ramdisk_size= [RAM] Sizes of RAM disks in kilobytes | 3695 | ramdisk_size= [RAM] Sizes of RAM disks in kilobytes |
3696 | See Documentation/blockdev/ramdisk.txt. | 3696 | See Documentation/blockdev/ramdisk.rst. |
3697 | 3697 | ||
3698 | random.trust_cpu={on,off} | 3698 | random.trust_cpu={on,off} |
3699 | [KNL] Enable or disable trusting the use of the | 3699 | [KNL] Enable or disable trusting the use of the |
diff --git a/Documentation/blockdev/drbd/data-structure-v9.txt b/Documentation/blockdev/drbd/data-structure-v9.rst index 1e52a0e32624..66036b901644 100644 --- a/Documentation/blockdev/drbd/data-structure-v9.txt +++ b/Documentation/blockdev/drbd/data-structure-v9.rst | |||
@@ -1,3 +1,7 @@ | |||
1 | ================================ | ||
2 | kernel data structure for DRBD-9 | ||
3 | ================================ | ||
4 | |||
1 | This describes the in kernel data structure for DRBD-9. Starting with | 5 | This describes the in kernel data structure for DRBD-9. Starting with |
2 | Linux v3.14 we are reorganizing DRBD to use this data structure. | 6 | Linux v3.14 we are reorganizing DRBD to use this data structure. |
3 | 7 | ||
@@ -10,7 +14,7 @@ device is represented by a block device locally. | |||
10 | 14 | ||
11 | The DRBD objects are interconnected to form a matrix as depicted below; a | 15 | The DRBD objects are interconnected to form a matrix as depicted below; a |
12 | drbd_peer_device object sits at each intersection between a drbd_device and a | 16 | drbd_peer_device object sits at each intersection between a drbd_device and a |
13 | drbd_connection: | 17 | drbd_connection:: |
14 | 18 | ||
15 | /--------------+---------------+.....+---------------\ | 19 | /--------------+---------------+.....+---------------\ |
16 | | resource | device | | device | | 20 | | resource | device | | device | |
diff --git a/Documentation/blockdev/drbd/figures.rst b/Documentation/blockdev/drbd/figures.rst new file mode 100644 index 000000000000..3e3fd4b8a478 --- /dev/null +++ b/Documentation/blockdev/drbd/figures.rst | |||
@@ -0,0 +1,28 @@ | |||
1 | .. The here included files are intended to help understand the implementation | ||
2 | |||
3 | Data flows that Relate some functions, and write packets | ||
4 | ======================================================== | ||
5 | |||
6 | .. kernel-figure:: DRBD-8.3-data-packets.svg | ||
7 | :alt: DRBD-8.3-data-packets.svg | ||
8 | :align: center | ||
9 | |||
10 | .. kernel-figure:: DRBD-data-packets.svg | ||
11 | :alt: DRBD-data-packets.svg | ||
12 | :align: center | ||
13 | |||
14 | |||
15 | Sub graphs of DRBD's state transitions | ||
16 | ====================================== | ||
17 | |||
18 | .. kernel-figure:: conn-states-8.dot | ||
19 | :alt: conn-states-8.dot | ||
20 | :align: center | ||
21 | |||
22 | .. kernel-figure:: disk-states-8.dot | ||
23 | :alt: disk-states-8.dot | ||
24 | :align: center | ||
25 | |||
26 | .. kernel-figure:: node-states-8.dot | ||
27 | :alt: node-states-8.dot | ||
28 | :align: center | ||
diff --git a/Documentation/blockdev/drbd/README.txt b/Documentation/blockdev/drbd/index.rst index 627b0a1bf35e..68ecd5c113e9 100644 --- a/Documentation/blockdev/drbd/README.txt +++ b/Documentation/blockdev/drbd/index.rst | |||
@@ -1,4 +1,9 @@ | |||
1 | ========================================== | ||
2 | Distributed Replicated Block Device - DRBD | ||
3 | ========================================== | ||
4 | |||
1 | Description | 5 | Description |
6 | =========== | ||
2 | 7 | ||
3 | DRBD is a shared-nothing, synchronously replicated block device. It | 8 | DRBD is a shared-nothing, synchronously replicated block device. It |
4 | is designed to serve as a building block for high availability | 9 | is designed to serve as a building block for high availability |
@@ -7,10 +12,8 @@ Description | |||
7 | 12 | ||
8 | Please visit http://www.drbd.org to find out more. | 13 | Please visit http://www.drbd.org to find out more. |
9 | 14 | ||
10 | The here included files are intended to help understand the implementation | 15 | .. toctree:: |
11 | 16 | :maxdepth: 1 | |
12 | DRBD-8.3-data-packets.svg, DRBD-data-packets.svg | ||
13 | relates some functions, and write packets. | ||
14 | 17 | ||
15 | conn-states-8.dot, disk-states-8.dot, node-states-8.dot | 18 | data-structure-v9 |
16 | The sub graphs of DRBD's state transitions | 19 | figures |
diff --git a/Documentation/blockdev/floppy.txt b/Documentation/blockdev/floppy.rst index e2240f5ab64d..4a8f31cf4139 100644 --- a/Documentation/blockdev/floppy.txt +++ b/Documentation/blockdev/floppy.rst | |||
@@ -1,35 +1,37 @@ | |||
1 | This file describes the floppy driver. | 1 | ============= |
2 | Floppy Driver | ||
3 | ============= | ||
2 | 4 | ||
3 | FAQ list: | 5 | FAQ list: |
4 | ========= | 6 | ========= |
5 | 7 | ||
6 | A FAQ list may be found in the fdutils package (see below), and also | 8 | A FAQ list may be found in the fdutils package (see below), and also |
7 | at <http://fdutils.linux.lu/faq.html>. | 9 | at <http://fdutils.linux.lu/faq.html>. |
8 | 10 | ||
9 | 11 | ||
10 | LILO configuration options (Thinkpad users, read this) | 12 | LILO configuration options (Thinkpad users, read this) |
11 | ====================================================== | 13 | ====================================================== |
12 | 14 | ||
13 | The floppy driver is configured using the 'floppy=' option in | 15 | The floppy driver is configured using the 'floppy=' option in |
14 | lilo. This option can be typed at the boot prompt, or entered in the | 16 | lilo. This option can be typed at the boot prompt, or entered in the |
15 | lilo configuration file. | 17 | lilo configuration file. |
16 | 18 | ||
17 | Example: If your kernel is called linux-2.6.9, type the following line | 19 | Example: If your kernel is called linux-2.6.9, type the following line |
18 | at the lilo boot prompt (if you have a thinkpad): | 20 | at the lilo boot prompt (if you have a thinkpad):: |
19 | 21 | ||
20 | linux-2.6.9 floppy=thinkpad | 22 | linux-2.6.9 floppy=thinkpad |
21 | 23 | ||
22 | You may also enter the following line in /etc/lilo.conf, in the description | 24 | You may also enter the following line in /etc/lilo.conf, in the description |
23 | of linux-2.6.9: | 25 | of linux-2.6.9:: |
24 | 26 | ||
25 | append = "floppy=thinkpad" | 27 | append = "floppy=thinkpad" |
26 | 28 | ||
27 | Several floppy related options may be given, example: | 29 | Several floppy related options may be given, example:: |
28 | 30 | ||
29 | linux-2.6.9 floppy=daring floppy=two_fdc | 31 | linux-2.6.9 floppy=daring floppy=two_fdc |
30 | append = "floppy=daring floppy=two_fdc" | 32 | append = "floppy=daring floppy=two_fdc" |
31 | 33 | ||
32 | If you give options both in the lilo config file and on the boot | 34 | If you give options both in the lilo config file and on the boot |
33 | prompt, the option strings of both places are concatenated, the boot | 35 | prompt, the option strings of both places are concatenated, the boot |
34 | prompt options coming last. That's why there are also options to | 36 | prompt options coming last. That's why there are also options to |
35 | restore the default behavior. | 37 | restore the default behavior. |
@@ -38,21 +40,23 @@ restore the default behavior. | |||
38 | Module configuration options | 40 | Module configuration options |
39 | ============================ | 41 | ============================ |
40 | 42 | ||
41 | If you use the floppy driver as a module, use the following syntax: | 43 | If you use the floppy driver as a module, use the following syntax:: |
42 | modprobe floppy floppy="<options>" | ||
43 | 44 | ||
44 | Example: | 45 | modprobe floppy floppy="<options>" |
45 | modprobe floppy floppy="omnibook messages" | ||
46 | 46 | ||
47 | If you need certain options enabled every time you load the floppy driver, | 47 | Example:: |
48 | you can put: | ||
49 | 48 | ||
50 | options floppy floppy="omnibook messages" | 49 | modprobe floppy floppy="omnibook messages" |
50 | |||
51 | If you need certain options enabled every time you load the floppy driver, | ||
52 | you can put:: | ||
53 | |||
54 | options floppy floppy="omnibook messages" | ||
51 | 55 | ||
52 | in a configuration file in /etc/modprobe.d/. | 56 | in a configuration file in /etc/modprobe.d/. |
53 | 57 | ||
54 | 58 | ||
55 | The floppy driver related options are: | 59 | The floppy driver related options are: |
56 | 60 | ||
57 | floppy=asus_pci | 61 | floppy=asus_pci |
58 | Sets the bit mask to allow only units 0 and 1. (default) | 62 | Sets the bit mask to allow only units 0 and 1. (default) |
@@ -70,8 +74,7 @@ in a configuration file in /etc/modprobe.d/. | |||
70 | Tells the floppy driver that you have only one floppy controller. | 74 | Tells the floppy driver that you have only one floppy controller. |
71 | (default) | 75 | (default) |
72 | 76 | ||
73 | floppy=two_fdc | 77 | floppy=two_fdc / floppy=<address>,two_fdc |
74 | floppy=<address>,two_fdc | ||
75 | Tells the floppy driver that you have two floppy controllers. | 78 | Tells the floppy driver that you have two floppy controllers. |
76 | The second floppy controller is assumed to be at <address>. | 79 | The second floppy controller is assumed to be at <address>. |
77 | This option is not needed if the second controller is at address | 80 | This option is not needed if the second controller is at address |
@@ -84,8 +87,7 @@ in a configuration file in /etc/modprobe.d/. | |||
84 | floppy=0,thinkpad | 87 | floppy=0,thinkpad |
85 | Tells the floppy driver that you don't have a Thinkpad. | 88 | Tells the floppy driver that you don't have a Thinkpad. |
86 | 89 | ||
87 | floppy=omnibook | 90 | floppy=omnibook / floppy=nodma |
88 | floppy=nodma | ||
89 | Tells the floppy driver not to use Dma for data transfers. | 91 | Tells the floppy driver not to use Dma for data transfers. |
90 | This is needed on HP Omnibooks, which don't have a workable | 92 | This is needed on HP Omnibooks, which don't have a workable |
91 | DMA channel for the floppy driver. This option is also useful | 93 | DMA channel for the floppy driver. This option is also useful |
@@ -144,14 +146,16 @@ in a configuration file in /etc/modprobe.d/. | |||
144 | described in the physical CMOS), or if your BIOS uses | 146 | described in the physical CMOS), or if your BIOS uses |
145 | non-standard CMOS types. The CMOS types are: | 147 | non-standard CMOS types. The CMOS types are: |
146 | 148 | ||
147 | 0 - Use the value of the physical CMOS | 149 | == ================================== |
148 | 1 - 5 1/4 DD | 150 | 0 Use the value of the physical CMOS |
149 | 2 - 5 1/4 HD | 151 | 1 5 1/4 DD |
150 | 3 - 3 1/2 DD | 152 | 2 5 1/4 HD |
151 | 4 - 3 1/2 HD | 153 | 3 3 1/2 DD |
152 | 5 - 3 1/2 ED | 154 | 4 3 1/2 HD |
153 | 6 - 3 1/2 ED | 155 | 5 3 1/2 ED |
154 | 16 - unknown or not installed | 156 | 6 3 1/2 ED |
157 | 16 unknown or not installed | ||
158 | == ================================== | ||
155 | 159 | ||
156 | (Note: there are two valid types for ED drives. This is because 5 was | 160 | (Note: there are two valid types for ED drives. This is because 5 was |
157 | initially chosen to represent floppy *tapes*, and 6 for ED drives. | 161 | initially chosen to represent floppy *tapes*, and 6 for ED drives. |
@@ -162,8 +166,7 @@ in a configuration file in /etc/modprobe.d/. | |||
162 | Print a warning message when an unexpected interrupt is received. | 166 | Print a warning message when an unexpected interrupt is received. |
163 | (default) | 167 | (default) |
164 | 168 | ||
165 | floppy=no_unexpected_interrupts | 169 | floppy=no_unexpected_interrupts / floppy=L40SX |
166 | floppy=L40SX | ||
167 | Don't print a message when an unexpected interrupt is received. This | 170 | Don't print a message when an unexpected interrupt is received. This |
168 | is needed on IBM L40SX laptops in certain video modes. (There seems | 171 | is needed on IBM L40SX laptops in certain video modes. (There seems |
169 | to be an interaction between video and floppy. The unexpected | 172 | to be an interaction between video and floppy. The unexpected |
@@ -199,47 +202,54 @@ in a configuration file in /etc/modprobe.d/. | |||
199 | Sets the floppy DMA channel to <nr> instead of 2. | 202 | Sets the floppy DMA channel to <nr> instead of 2. |
200 | 203 | ||
201 | floppy=slow | 204 | floppy=slow |
202 | Use PS/2 stepping rate: | 205 | Use PS/2 stepping rate:: |
203 | " PS/2 floppies have much slower step rates than regular floppies. | 206 | |
207 | PS/2 floppies have much slower step rates than regular floppies. | ||
204 | It's been recommended that take about 1/4 of the default speed | 208 | It's been recommended that take about 1/4 of the default speed |
205 | in some more extreme cases." | 209 | in some more extreme cases. |
206 | 210 | ||
207 | 211 | ||
208 | Supporting utilities and additional documentation: | 212 | Supporting utilities and additional documentation: |
209 | ================================================== | 213 | ================================================== |
210 | 214 | ||
211 | Additional parameters of the floppy driver can be configured at | 215 | Additional parameters of the floppy driver can be configured at |
212 | runtime. Utilities which do this can be found in the fdutils package. | 216 | runtime. Utilities which do this can be found in the fdutils package. |
213 | This package also contains a new version of mtools which allows to | 217 | This package also contains a new version of mtools which allows to |
214 | access high capacity disks (up to 1992K on a high density 3 1/2 disk!). | 218 | access high capacity disks (up to 1992K on a high density 3 1/2 disk!). |
215 | It also contains additional documentation about the floppy driver. | 219 | It also contains additional documentation about the floppy driver. |
216 | 220 | ||
217 | The latest version can be found at fdutils homepage: | 221 | The latest version can be found at fdutils homepage: |
222 | |||
218 | http://fdutils.linux.lu | 223 | http://fdutils.linux.lu |
219 | 224 | ||
220 | The fdutils releases can be found at: | 225 | The fdutils releases can be found at: |
226 | |||
221 | http://fdutils.linux.lu/download.html | 227 | http://fdutils.linux.lu/download.html |
228 | |||
222 | http://www.tux.org/pub/knaff/fdutils/ | 229 | http://www.tux.org/pub/knaff/fdutils/ |
230 | |||
223 | ftp://metalab.unc.edu/pub/Linux/utils/disk-management/ | 231 | ftp://metalab.unc.edu/pub/Linux/utils/disk-management/ |
224 | 232 | ||
225 | Reporting problems about the floppy driver | 233 | Reporting problems about the floppy driver |
226 | ========================================== | 234 | ========================================== |
227 | 235 | ||
228 | If you have a question or a bug report about the floppy driver, mail | 236 | If you have a question or a bug report about the floppy driver, mail |
229 | me at Alain.Knaff@poboxes.com . If you post to Usenet, preferably use | 237 | me at Alain.Knaff@poboxes.com . If you post to Usenet, preferably use |
230 | comp.os.linux.hardware. As the volume in these groups is rather high, | 238 | comp.os.linux.hardware. As the volume in these groups is rather high, |
231 | be sure to include the word "floppy" (or "FLOPPY") in the subject | 239 | be sure to include the word "floppy" (or "FLOPPY") in the subject |
232 | line. If the reported problem happens when mounting floppy disks, be | 240 | line. If the reported problem happens when mounting floppy disks, be |
233 | sure to mention also the type of the filesystem in the subject line. | 241 | sure to mention also the type of the filesystem in the subject line. |
234 | 242 | ||
235 | Be sure to read the FAQ before mailing/posting any bug reports! | 243 | Be sure to read the FAQ before mailing/posting any bug reports! |
236 | 244 | ||
237 | Alain | 245 | Alain |
238 | 246 | ||
239 | Changelog | 247 | Changelog |
240 | ========= | 248 | ========= |
241 | 249 | ||
242 | 10-30-2004 : Cleanup, updating, add reference to module configuration. | 250 | 10-30-2004 : |
251 | Cleanup, updating, add reference to module configuration. | ||
243 | James Nelson <james4765@gmail.com> | 252 | James Nelson <james4765@gmail.com> |
244 | 253 | ||
245 | 6-3-2000 : Original Document | 254 | 6-3-2000 : |
255 | Original Document | ||
diff --git a/Documentation/blockdev/index.rst b/Documentation/blockdev/index.rst new file mode 100644 index 000000000000..a9af6ed8b4aa --- /dev/null +++ b/Documentation/blockdev/index.rst | |||
@@ -0,0 +1,16 @@ | |||
1 | :orphan: | ||
2 | |||
3 | =========================== | ||
4 | The Linux RapidIO Subsystem | ||
5 | =========================== | ||
6 | |||
7 | .. toctree:: | ||
8 | :maxdepth: 1 | ||
9 | |||
10 | floppy | ||
11 | nbd | ||
12 | paride | ||
13 | ramdisk | ||
14 | zram | ||
15 | |||
16 | drbd/index | ||
diff --git a/Documentation/blockdev/nbd.txt b/Documentation/blockdev/nbd.rst index db242ea2bce8..d78dfe559dcf 100644 --- a/Documentation/blockdev/nbd.txt +++ b/Documentation/blockdev/nbd.rst | |||
@@ -1,3 +1,4 @@ | |||
1 | ================================== | ||
1 | Network Block Device (TCP version) | 2 | Network Block Device (TCP version) |
2 | ================================== | 3 | ================================== |
3 | 4 | ||
@@ -28,4 +29,3 @@ max_part | |||
28 | 29 | ||
29 | nbds_max | 30 | nbds_max |
30 | Number of block devices that should be initialized (default: 16). | 31 | Number of block devices that should be initialized (default: 16). |
31 | |||
diff --git a/Documentation/blockdev/paride.txt b/Documentation/blockdev/paride.rst index ee6717e3771d..87b4278bf314 100644 --- a/Documentation/blockdev/paride.txt +++ b/Documentation/blockdev/paride.rst | |||
@@ -1,15 +1,17 @@ | |||
1 | 1 | =================================== | |
2 | Linux and parallel port IDE devices | 2 | Linux and parallel port IDE devices |
3 | =================================== | ||
3 | 4 | ||
4 | PARIDE v1.03 (c) 1997-8 Grant Guenther <grant@torque.net> | 5 | PARIDE v1.03 (c) 1997-8 Grant Guenther <grant@torque.net> |
5 | 6 | ||
6 | 1. Introduction | 7 | 1. Introduction |
8 | =============== | ||
7 | 9 | ||
8 | Owing to the simplicity and near universality of the parallel port interface | 10 | Owing to the simplicity and near universality of the parallel port interface |
9 | to personal computers, many external devices such as portable hard-disk, | 11 | to personal computers, many external devices such as portable hard-disk, |
10 | CD-ROM, LS-120 and tape drives use the parallel port to connect to their | 12 | CD-ROM, LS-120 and tape drives use the parallel port to connect to their |
11 | host computer. While some devices (notably scanners) use ad-hoc methods | 13 | host computer. While some devices (notably scanners) use ad-hoc methods |
12 | to pass commands and data through the parallel port interface, most | 14 | to pass commands and data through the parallel port interface, most |
13 | external devices are actually identical to an internal model, but with | 15 | external devices are actually identical to an internal model, but with |
14 | a parallel-port adapter chip added in. Some of the original parallel port | 16 | a parallel-port adapter chip added in. Some of the original parallel port |
15 | adapters were little more than mechanisms for multiplexing a SCSI bus. | 17 | adapters were little more than mechanisms for multiplexing a SCSI bus. |
@@ -28,47 +30,50 @@ were to open up a parallel port CD-ROM drive, for instance, one would | |||
28 | find a standard ATAPI CD-ROM drive, a power supply, and a single adapter | 30 | find a standard ATAPI CD-ROM drive, a power supply, and a single adapter |
29 | that interconnected a standard PC parallel port cable and a standard | 31 | that interconnected a standard PC parallel port cable and a standard |
30 | IDE cable. It is usually possible to exchange the CD-ROM device with | 32 | IDE cable. It is usually possible to exchange the CD-ROM device with |
31 | any other device using the IDE interface. | 33 | any other device using the IDE interface. |
32 | 34 | ||
33 | The document describes the support in Linux for parallel port IDE | 35 | The document describes the support in Linux for parallel port IDE |
34 | devices. It does not cover parallel port SCSI devices, "ditto" tape | 36 | devices. It does not cover parallel port SCSI devices, "ditto" tape |
35 | drives or scanners. Many different devices are supported by the | 37 | drives or scanners. Many different devices are supported by the |
36 | parallel port IDE subsystem, including: | 38 | parallel port IDE subsystem, including: |
37 | 39 | ||
38 | MicroSolutions backpack CD-ROM | 40 | - MicroSolutions backpack CD-ROM |
39 | MicroSolutions backpack PD/CD | 41 | - MicroSolutions backpack PD/CD |
40 | MicroSolutions backpack hard-drives | 42 | - MicroSolutions backpack hard-drives |
41 | MicroSolutions backpack 8000t tape drive | 43 | - MicroSolutions backpack 8000t tape drive |
42 | SyQuest EZ-135, EZ-230 & SparQ drives | 44 | - SyQuest EZ-135, EZ-230 & SparQ drives |
43 | Avatar Shark | 45 | - Avatar Shark |
44 | Imation Superdisk LS-120 | 46 | - Imation Superdisk LS-120 |
45 | Maxell Superdisk LS-120 | 47 | - Maxell Superdisk LS-120 |
46 | FreeCom Power CD | 48 | - FreeCom Power CD |
47 | Hewlett-Packard 5GB and 8GB tape drives | 49 | - Hewlett-Packard 5GB and 8GB tape drives |
48 | Hewlett-Packard 7100 and 7200 CD-RW drives | 50 | - Hewlett-Packard 7100 and 7200 CD-RW drives |
49 | 51 | ||
50 | as well as most of the clone and no-name products on the market. | 52 | as well as most of the clone and no-name products on the market. |
51 | 53 | ||
52 | To support such a wide range of devices, PARIDE, the parallel port IDE | 54 | To support such a wide range of devices, PARIDE, the parallel port IDE |
53 | subsystem, is actually structured in three parts. There is a base | 55 | subsystem, is actually structured in three parts. There is a base |
54 | paride module which provides a registry and some common methods for | 56 | paride module which provides a registry and some common methods for |
55 | accessing the parallel ports. The second component is a set of | 57 | accessing the parallel ports. The second component is a set of |
56 | high-level drivers for each of the different types of supported devices: | 58 | high-level drivers for each of the different types of supported devices: |
57 | 59 | ||
60 | === ============= | ||
58 | pd IDE disk | 61 | pd IDE disk |
59 | pcd ATAPI CD-ROM | 62 | pcd ATAPI CD-ROM |
60 | pf ATAPI disk | 63 | pf ATAPI disk |
61 | pt ATAPI tape | 64 | pt ATAPI tape |
62 | pg ATAPI generic | 65 | pg ATAPI generic |
66 | === ============= | ||
63 | 67 | ||
64 | (Currently, the pg driver is only used with CD-R drives). | 68 | (Currently, the pg driver is only used with CD-R drives). |
65 | 69 | ||
66 | The high-level drivers function according to the relevant standards. | 70 | The high-level drivers function according to the relevant standards. |
67 | The third component of PARIDE is a set of low-level protocol drivers | 71 | The third component of PARIDE is a set of low-level protocol drivers |
68 | for each of the parallel port IDE adapter chips. Thanks to the interest | 72 | for each of the parallel port IDE adapter chips. Thanks to the interest |
69 | and encouragement of Linux users from many parts of the world, | 73 | and encouragement of Linux users from many parts of the world, |
70 | support is available for almost all known adapter protocols: | 74 | support is available for almost all known adapter protocols: |
71 | 75 | ||
76 | ==== ====================================== ==== | ||
72 | aten ATEN EH-100 (HK) | 77 | aten ATEN EH-100 (HK) |
73 | bpck Microsolutions backpack (US) | 78 | bpck Microsolutions backpack (US) |
74 | comm DataStor (old-type) "commuter" adapter (TW) | 79 | comm DataStor (old-type) "commuter" adapter (TW) |
@@ -83,9 +88,11 @@ support is available for almost all known adapter protocols: | |||
83 | ktti KT Technology PHd adapter (SG) | 88 | ktti KT Technology PHd adapter (SG) |
84 | on20 OnSpec 90c20 (US) | 89 | on20 OnSpec 90c20 (US) |
85 | on26 OnSpec 90c26 (US) | 90 | on26 OnSpec 90c26 (US) |
91 | ==== ====================================== ==== | ||
86 | 92 | ||
87 | 93 | ||
88 | 2. Using the PARIDE subsystem | 94 | 2. Using the PARIDE subsystem |
95 | ============================= | ||
89 | 96 | ||
90 | While configuring the Linux kernel, you may choose either to build | 97 | While configuring the Linux kernel, you may choose either to build |
91 | the PARIDE drivers into your kernel, or to build them as modules. | 98 | the PARIDE drivers into your kernel, or to build them as modules. |
@@ -94,10 +101,10 @@ In either case, you will need to select "Parallel port IDE device support" | |||
94 | as well as at least one of the high-level drivers and at least one | 101 | as well as at least one of the high-level drivers and at least one |
95 | of the parallel port communication protocols. If you do not know | 102 | of the parallel port communication protocols. If you do not know |
96 | what kind of parallel port adapter is used in your drive, you could | 103 | what kind of parallel port adapter is used in your drive, you could |
97 | begin by checking the file names and any text files on your DOS | 104 | begin by checking the file names and any text files on your DOS |
98 | installation floppy. Alternatively, you can look at the markings on | 105 | installation floppy. Alternatively, you can look at the markings on |
99 | the adapter chip itself. That's usually sufficient to identify the | 106 | the adapter chip itself. That's usually sufficient to identify the |
100 | correct device. | 107 | correct device. |
101 | 108 | ||
102 | You can actually select all the protocol modules, and allow the PARIDE | 109 | You can actually select all the protocol modules, and allow the PARIDE |
103 | subsystem to try them all for you. | 110 | subsystem to try them all for you. |
@@ -105,8 +112,9 @@ subsystem to try them all for you. | |||
105 | For the "brand-name" products listed above, here are the protocol | 112 | For the "brand-name" products listed above, here are the protocol |
106 | and high-level drivers that you would use: | 113 | and high-level drivers that you would use: |
107 | 114 | ||
115 | ================ ============ ====== ======== | ||
108 | Manufacturer Model Driver Protocol | 116 | Manufacturer Model Driver Protocol |
109 | 117 | ================ ============ ====== ======== | |
110 | MicroSolutions CD-ROM pcd bpck | 118 | MicroSolutions CD-ROM pcd bpck |
111 | MicroSolutions PD drive pf bpck | 119 | MicroSolutions PD drive pf bpck |
112 | MicroSolutions hard-drive pd bpck | 120 | MicroSolutions hard-drive pd bpck |
@@ -119,8 +127,10 @@ and high-level drivers that you would use: | |||
119 | Hewlett-Packard 5GB Tape pt epat | 127 | Hewlett-Packard 5GB Tape pt epat |
120 | Hewlett-Packard 7200e (CD) pcd epat | 128 | Hewlett-Packard 7200e (CD) pcd epat |
121 | Hewlett-Packard 7200e (CD-R) pg epat | 129 | Hewlett-Packard 7200e (CD-R) pg epat |
130 | ================ ============ ====== ======== | ||
122 | 131 | ||
123 | 2.1 Configuring built-in drivers | 132 | 2.1 Configuring built-in drivers |
133 | --------------------------------- | ||
124 | 134 | ||
125 | We recommend that you get to know how the drivers work and how to | 135 | We recommend that you get to know how the drivers work and how to |
126 | configure them as loadable modules, before attempting to compile a | 136 | configure them as loadable modules, before attempting to compile a |
@@ -143,7 +153,7 @@ protocol identification number and, for some devices, the drive's | |||
143 | chain ID. While your system is booting, a number of messages are | 153 | chain ID. While your system is booting, a number of messages are |
144 | displayed on the console. Like all such messages, they can be | 154 | displayed on the console. Like all such messages, they can be |
145 | reviewed with the 'dmesg' command. Among those messages will be | 155 | reviewed with the 'dmesg' command. Among those messages will be |
146 | some lines like: | 156 | some lines like:: |
147 | 157 | ||
148 | paride: bpck registered as protocol 0 | 158 | paride: bpck registered as protocol 0 |
149 | paride: epat registered as protocol 1 | 159 | paride: epat registered as protocol 1 |
@@ -158,10 +168,10 @@ the last two digits of the drive's serial number (but read MicroSolutions' | |||
158 | documentation about this). | 168 | documentation about this). |
159 | 169 | ||
160 | As an example, let's assume that you have a MicroSolutions PD/CD drive | 170 | As an example, let's assume that you have a MicroSolutions PD/CD drive |
161 | with unit ID number 36 connected to the parallel port at 0x378, a SyQuest | 171 | with unit ID number 36 connected to the parallel port at 0x378, a SyQuest |
162 | EZ-135 connected to the chained port on the PD/CD drive and also an | 172 | EZ-135 connected to the chained port on the PD/CD drive and also an |
163 | Imation Superdisk connected to port 0x278. You could give the following | 173 | Imation Superdisk connected to port 0x278. You could give the following |
164 | options on your boot command: | 174 | options on your boot command:: |
165 | 175 | ||
166 | pd.drive0=0x378,1 pf.drive0=0x278,1 pf.drive1=0x378,0,36 | 176 | pd.drive0=0x378,1 pf.drive0=0x278,1 pf.drive1=0x378,0,36 |
167 | 177 | ||
@@ -169,24 +179,27 @@ In the last option, pf.drive1 configures device /dev/pf1, the 0x378 | |||
169 | is the parallel port base address, the 0 is the protocol registration | 179 | is the parallel port base address, the 0 is the protocol registration |
170 | number and 36 is the chain ID. | 180 | number and 36 is the chain ID. |
171 | 181 | ||
172 | Please note: while PARIDE will work both with and without the | 182 | Please note: while PARIDE will work both with and without the |
173 | PARPORT parallel port sharing system that is included by the | 183 | PARPORT parallel port sharing system that is included by the |
174 | "Parallel port support" option, PARPORT must be included and enabled | 184 | "Parallel port support" option, PARPORT must be included and enabled |
175 | if you want to use chains of devices on the same parallel port. | 185 | if you want to use chains of devices on the same parallel port. |
176 | 186 | ||
177 | 2.2 Loading and configuring PARIDE as modules | 187 | 2.2 Loading and configuring PARIDE as modules |
188 | ---------------------------------------------- | ||
178 | 189 | ||
179 | It is much faster and simpler to get to understand the PARIDE drivers | 190 | It is much faster and simpler to get to understand the PARIDE drivers |
180 | if you use them as loadable kernel modules. | 191 | if you use them as loadable kernel modules. |
181 | 192 | ||
182 | Note 1: using these drivers with the "kerneld" automatic module loading | 193 | Note 1: |
183 | system is not recommended for beginners, and is not documented here. | 194 | using these drivers with the "kerneld" automatic module loading |
195 | system is not recommended for beginners, and is not documented here. | ||
184 | 196 | ||
185 | Note 2: if you build PARPORT support as a loadable module, PARIDE must | 197 | Note 2: |
186 | also be built as loadable modules, and PARPORT must be loaded before the | 198 | if you build PARPORT support as a loadable module, PARIDE must |
187 | PARIDE modules. | 199 | also be built as loadable modules, and PARPORT must be loaded before |
200 | the PARIDE modules. | ||
188 | 201 | ||
189 | To use PARIDE, you must begin by | 202 | To use PARIDE, you must begin by:: |
190 | 203 | ||
191 | insmod paride | 204 | insmod paride |
192 | 205 | ||
@@ -195,8 +208,8 @@ among other tasks. | |||
195 | 208 | ||
196 | Then, load as many of the protocol modules as you think you might need. | 209 | Then, load as many of the protocol modules as you think you might need. |
197 | As you load each module, it will register the protocols that it supports, | 210 | As you load each module, it will register the protocols that it supports, |
198 | and print a log message to your kernel log file and your console. For | 211 | and print a log message to your kernel log file and your console. For |
199 | example: | 212 | example:: |
200 | 213 | ||
201 | # insmod epat | 214 | # insmod epat |
202 | paride: epat registered as protocol 0 | 215 | paride: epat registered as protocol 0 |
@@ -205,22 +218,22 @@ example: | |||
205 | paride: k971 registered as protocol 2 | 218 | paride: k971 registered as protocol 2 |
206 | 219 | ||
207 | Finally, you can load high-level drivers for each kind of device that | 220 | Finally, you can load high-level drivers for each kind of device that |
208 | you have connected. By default, each driver will autoprobe for a single | 221 | you have connected. By default, each driver will autoprobe for a single |
209 | device, but you can support up to four similar devices by giving their | 222 | device, but you can support up to four similar devices by giving their |
210 | individual co-ordinates when you load the driver. | 223 | individual co-ordinates when you load the driver. |
211 | 224 | ||
212 | For example, if you had two no-name CD-ROM drives both using the | 225 | For example, if you had two no-name CD-ROM drives both using the |
213 | KingByte KBIC-951A adapter, one on port 0x378 and the other on 0x3bc | 226 | KingByte KBIC-951A adapter, one on port 0x378 and the other on 0x3bc |
214 | you could give the following command: | 227 | you could give the following command:: |
215 | 228 | ||
216 | # insmod pcd drive0=0x378,1 drive1=0x3bc,1 | 229 | # insmod pcd drive0=0x378,1 drive1=0x3bc,1 |
217 | 230 | ||
218 | For most adapters, giving a port address and protocol number is sufficient, | 231 | For most adapters, giving a port address and protocol number is sufficient, |
219 | but check the source files in linux/drivers/block/paride for more | 232 | but check the source files in linux/drivers/block/paride for more |
220 | information. (Hopefully someone will write some man pages one day !). | 233 | information. (Hopefully someone will write some man pages one day !). |
221 | 234 | ||
222 | As another example, here's what happens when PARPORT is installed, and | 235 | As another example, here's what happens when PARPORT is installed, and |
223 | a SyQuest EZ-135 is attached to port 0x378: | 236 | a SyQuest EZ-135 is attached to port 0x378:: |
224 | 237 | ||
225 | # insmod paride | 238 | # insmod paride |
226 | paride: version 1.0 installed | 239 | paride: version 1.0 installed |
@@ -237,46 +250,47 @@ Note that the last line is the output from the generic partition table | |||
237 | scanner - in this case it reports that it has found a disk with one partition. | 250 | scanner - in this case it reports that it has found a disk with one partition. |
238 | 251 | ||
239 | 2.3 Using a PARIDE device | 252 | 2.3 Using a PARIDE device |
253 | -------------------------- | ||
240 | 254 | ||
241 | Once the drivers have been loaded, you can access PARIDE devices in the | 255 | Once the drivers have been loaded, you can access PARIDE devices in the |
242 | same way as their traditional counterparts. You will probably need to | 256 | same way as their traditional counterparts. You will probably need to |
243 | create the device "special files". Here is a simple script that you can | 257 | create the device "special files". Here is a simple script that you can |
244 | cut to a file and execute: | 258 | cut to a file and execute:: |
245 | 259 | ||
246 | #!/bin/bash | 260 | #!/bin/bash |
247 | # | 261 | # |
248 | # mkd -- a script to create the device special files for the PARIDE subsystem | 262 | # mkd -- a script to create the device special files for the PARIDE subsystem |
249 | # | 263 | # |
250 | function mkdev { | 264 | function mkdev { |
251 | mknod $1 $2 $3 $4 ; chmod 0660 $1 ; chown root:disk $1 | 265 | mknod $1 $2 $3 $4 ; chmod 0660 $1 ; chown root:disk $1 |
252 | } | 266 | } |
253 | # | 267 | # |
254 | function pd { | 268 | function pd { |
255 | D=$( printf \\$( printf "x%03x" $[ $1 + 97 ] ) ) | 269 | D=$( printf \\$( printf "x%03x" $[ $1 + 97 ] ) ) |
256 | mkdev pd$D b 45 $[ $1 * 16 ] | 270 | mkdev pd$D b 45 $[ $1 * 16 ] |
257 | for P in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 271 | for P in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
258 | do mkdev pd$D$P b 45 $[ $1 * 16 + $P ] | 272 | do mkdev pd$D$P b 45 $[ $1 * 16 + $P ] |
259 | done | 273 | done |
260 | } | 274 | } |
261 | # | 275 | # |
262 | cd /dev | 276 | cd /dev |
263 | # | 277 | # |
264 | for u in 0 1 2 3 ; do pd $u ; done | 278 | for u in 0 1 2 3 ; do pd $u ; done |
265 | for u in 0 1 2 3 ; do mkdev pcd$u b 46 $u ; done | 279 | for u in 0 1 2 3 ; do mkdev pcd$u b 46 $u ; done |
266 | for u in 0 1 2 3 ; do mkdev pf$u b 47 $u ; done | 280 | for u in 0 1 2 3 ; do mkdev pf$u b 47 $u ; done |
267 | for u in 0 1 2 3 ; do mkdev pt$u c 96 $u ; done | 281 | for u in 0 1 2 3 ; do mkdev pt$u c 96 $u ; done |
268 | for u in 0 1 2 3 ; do mkdev npt$u c 96 $[ $u + 128 ] ; done | 282 | for u in 0 1 2 3 ; do mkdev npt$u c 96 $[ $u + 128 ] ; done |
269 | for u in 0 1 2 3 ; do mkdev pg$u c 97 $u ; done | 283 | for u in 0 1 2 3 ; do mkdev pg$u c 97 $u ; done |
270 | # | 284 | # |
271 | # end of mkd | 285 | # end of mkd |
272 | 286 | ||
273 | With the device files and drivers in place, you can access PARIDE devices | 287 | With the device files and drivers in place, you can access PARIDE devices |
274 | like any other Linux device. For example, to mount a CD-ROM in pcd0, use: | 288 | like any other Linux device. For example, to mount a CD-ROM in pcd0, use:: |
275 | 289 | ||
276 | mount /dev/pcd0 /cdrom | 290 | mount /dev/pcd0 /cdrom |
277 | 291 | ||
278 | If you have a fresh Avatar Shark cartridge, and the drive is pda, you | 292 | If you have a fresh Avatar Shark cartridge, and the drive is pda, you |
279 | might do something like: | 293 | might do something like:: |
280 | 294 | ||
281 | fdisk /dev/pda -- make a new partition table with | 295 | fdisk /dev/pda -- make a new partition table with |
282 | partition 1 of type 83 | 296 | partition 1 of type 83 |
@@ -289,41 +303,46 @@ might do something like: | |||
289 | 303 | ||
290 | Devices like the Imation superdisk work in the same way, except that | 304 | Devices like the Imation superdisk work in the same way, except that |
291 | they do not have a partition table. For example to make a 120MB | 305 | they do not have a partition table. For example to make a 120MB |
292 | floppy that you could share with a DOS system: | 306 | floppy that you could share with a DOS system:: |
293 | 307 | ||
294 | mkdosfs /dev/pf0 | 308 | mkdosfs /dev/pf0 |
295 | mount /dev/pf0 /mnt | 309 | mount /dev/pf0 /mnt |
296 | 310 | ||
297 | 311 | ||
298 | 2.4 The pf driver | 312 | 2.4 The pf driver |
313 | ------------------ | ||
299 | 314 | ||
300 | The pf driver is intended for use with parallel port ATAPI disk | 315 | The pf driver is intended for use with parallel port ATAPI disk |
301 | devices. The most common devices in this category are PD drives | 316 | devices. The most common devices in this category are PD drives |
302 | and LS-120 drives. Traditionally, media for these devices are not | 317 | and LS-120 drives. Traditionally, media for these devices are not |
303 | partitioned. Consequently, the pf driver does not support partitioned | 318 | partitioned. Consequently, the pf driver does not support partitioned |
304 | media. This may be changed in a future version of the driver. | 319 | media. This may be changed in a future version of the driver. |
305 | 320 | ||
306 | 2.5 Using the pt driver | 321 | 2.5 Using the pt driver |
322 | ------------------------ | ||
307 | 323 | ||
308 | The pt driver for parallel port ATAPI tape drives is a minimal driver. | 324 | The pt driver for parallel port ATAPI tape drives is a minimal driver. |
309 | It does not yet support many of the standard tape ioctl operations. | 325 | It does not yet support many of the standard tape ioctl operations. |
310 | For best performance, a block size of 32KB should be used. You will | 326 | For best performance, a block size of 32KB should be used. You will |
311 | probably want to set the parallel port delay to 0, if you can. | 327 | probably want to set the parallel port delay to 0, if you can. |
312 | 328 | ||
313 | 2.6 Using the pg driver | 329 | 2.6 Using the pg driver |
330 | ------------------------ | ||
314 | 331 | ||
315 | The pg driver can be used in conjunction with the cdrecord program | 332 | The pg driver can be used in conjunction with the cdrecord program |
316 | to create CD-ROMs. Please get cdrecord version 1.6.1 or later | 333 | to create CD-ROMs. Please get cdrecord version 1.6.1 or later |
317 | from ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/ . To record CD-R media | 334 | from ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/ . To record CD-R media |
318 | your parallel port should ideally be set to EPP mode, and the "port delay" | 335 | your parallel port should ideally be set to EPP mode, and the "port delay" |
319 | should be set to 0. With those settings it is possible to record at 2x | 336 | should be set to 0. With those settings it is possible to record at 2x |
320 | speed without any buffer underruns. If you cannot get the driver to work | 337 | speed without any buffer underruns. If you cannot get the driver to work |
321 | in EPP mode, try to use "bidirectional" or "PS/2" mode and 1x speeds only. | 338 | in EPP mode, try to use "bidirectional" or "PS/2" mode and 1x speeds only. |
322 | 339 | ||
323 | 340 | ||
324 | 3. Troubleshooting | 341 | 3. Troubleshooting |
342 | ================== | ||
325 | 343 | ||
326 | 3.1 Use EPP mode if you can | 344 | 3.1 Use EPP mode if you can |
345 | ---------------------------- | ||
327 | 346 | ||
328 | The most common problems that people report with the PARIDE drivers | 347 | The most common problems that people report with the PARIDE drivers |
329 | concern the parallel port CMOS settings. At this time, none of the | 348 | concern the parallel port CMOS settings. At this time, none of the |
@@ -332,6 +351,7 @@ If you are able to do so, please set your parallel port into EPP mode | |||
332 | using your CMOS setup procedure. | 351 | using your CMOS setup procedure. |
333 | 352 | ||
334 | 3.2 Check the port delay | 353 | 3.2 Check the port delay |
354 | ------------------------- | ||
335 | 355 | ||
336 | Some parallel ports cannot reliably transfer data at full speed. To | 356 | Some parallel ports cannot reliably transfer data at full speed. To |
337 | offset the errors, the PARIDE protocol modules introduce a "port | 357 | offset the errors, the PARIDE protocol modules introduce a "port |
@@ -347,23 +367,25 @@ read the comments at the beginning of the driver source files in | |||
347 | linux/drivers/block/paride. | 367 | linux/drivers/block/paride. |
348 | 368 | ||
349 | 3.3 Some drives need a printer reset | 369 | 3.3 Some drives need a printer reset |
370 | ------------------------------------- | ||
350 | 371 | ||
351 | There appear to be a number of "noname" external drives on the market | 372 | There appear to be a number of "noname" external drives on the market |
352 | that do not always power up correctly. We have noticed this with some | 373 | that do not always power up correctly. We have noticed this with some |
353 | drives based on OnSpec and older Freecom adapters. In these rare cases, | 374 | drives based on OnSpec and older Freecom adapters. In these rare cases, |
354 | the adapter can often be reinitialised by issuing a "printer reset" on | 375 | the adapter can often be reinitialised by issuing a "printer reset" on |
355 | the parallel port. As the reset operation is potentially disruptive in | 376 | the parallel port. As the reset operation is potentially disruptive in |
356 | multiple device environments, the PARIDE drivers will not do it | 377 | multiple device environments, the PARIDE drivers will not do it |
357 | automatically. You can however, force a printer reset by doing: | 378 | automatically. You can however, force a printer reset by doing:: |
358 | 379 | ||
359 | insmod lp reset=1 | 380 | insmod lp reset=1 |
360 | rmmod lp | 381 | rmmod lp |
361 | 382 | ||
362 | If you have one of these marginal cases, you should probably build | 383 | If you have one of these marginal cases, you should probably build |
363 | your paride drivers as modules, and arrange to do the printer reset | 384 | your paride drivers as modules, and arrange to do the printer reset |
364 | before loading the PARIDE drivers. | 385 | before loading the PARIDE drivers. |
365 | 386 | ||
366 | 3.4 Use the verbose option and dmesg if you need help | 387 | 3.4 Use the verbose option and dmesg if you need help |
388 | ------------------------------------------------------ | ||
367 | 389 | ||
368 | While a lot of testing has gone into these drivers to make them work | 390 | While a lot of testing has gone into these drivers to make them work |
369 | as smoothly as possible, problems will arise. If you do have problems, | 391 | as smoothly as possible, problems will arise. If you do have problems, |
@@ -373,7 +395,7 @@ clues, then please make sure that only one drive is hooked to your system, | |||
373 | and that either (a) PARPORT is enabled or (b) no other device driver | 395 | and that either (a) PARPORT is enabled or (b) no other device driver |
374 | is using your parallel port (check in /proc/ioports). Then, load the | 396 | is using your parallel port (check in /proc/ioports). Then, load the |
375 | appropriate drivers (you can load several protocol modules if you want) | 397 | appropriate drivers (you can load several protocol modules if you want) |
376 | as in: | 398 | as in:: |
377 | 399 | ||
378 | # insmod paride | 400 | # insmod paride |
379 | # insmod epat | 401 | # insmod epat |
@@ -394,12 +416,14 @@ by e-mail to grant@torque.net, or join the linux-parport mailing list | |||
394 | and post your report there. | 416 | and post your report there. |
395 | 417 | ||
396 | 3.5 For more information or help | 418 | 3.5 For more information or help |
419 | --------------------------------- | ||
397 | 420 | ||
398 | You can join the linux-parport mailing list by sending a mail message | 421 | You can join the linux-parport mailing list by sending a mail message |
399 | to | 422 | to: |
423 | |||
400 | linux-parport-request@torque.net | 424 | linux-parport-request@torque.net |
401 | 425 | ||
402 | with the single word | 426 | with the single word:: |
403 | 427 | ||
404 | subscribe | 428 | subscribe |
405 | 429 | ||
@@ -412,6 +436,4 @@ have in your mail headers, when sending mail to the list server. | |||
412 | You might also find some useful information on the linux-parport | 436 | You might also find some useful information on the linux-parport |
413 | web pages (although they are not always up to date) at | 437 | web pages (although they are not always up to date) at |
414 | 438 | ||
415 | http://web.archive.org/web/*/http://www.torque.net/parport/ | 439 | http://web.archive.org/web/%2E/http://www.torque.net/parport/ |
416 | |||
417 | |||
diff --git a/Documentation/blockdev/ramdisk.txt b/Documentation/blockdev/ramdisk.rst index 501e12e0323e..b7c2268f8dec 100644 --- a/Documentation/blockdev/ramdisk.txt +++ b/Documentation/blockdev/ramdisk.rst | |||
@@ -1,7 +1,8 @@ | |||
1 | ========================================== | ||
1 | Using the RAM disk block device with Linux | 2 | Using the RAM disk block device with Linux |
2 | ------------------------------------------ | 3 | ========================================== |
3 | 4 | ||
4 | Contents: | 5 | .. Contents: |
5 | 6 | ||
6 | 1) Overview | 7 | 1) Overview |
7 | 2) Kernel Command Line Parameters | 8 | 2) Kernel Command Line Parameters |
@@ -42,7 +43,7 @@ rescue floppy disk. | |||
42 | 2a) Kernel Command Line Parameters | 43 | 2a) Kernel Command Line Parameters |
43 | 44 | ||
44 | ramdisk_size=N | 45 | ramdisk_size=N |
45 | ============== | 46 | Size of the ramdisk. |
46 | 47 | ||
47 | This parameter tells the RAM disk driver to set up RAM disks of N k size. The | 48 | This parameter tells the RAM disk driver to set up RAM disks of N k size. The |
48 | default is 4096 (4 MB). | 49 | default is 4096 (4 MB). |
@@ -50,16 +51,13 @@ default is 4096 (4 MB). | |||
50 | 2b) Module parameters | 51 | 2b) Module parameters |
51 | 52 | ||
52 | rd_nr | 53 | rd_nr |
53 | ===== | 54 | /dev/ramX devices created. |
54 | /dev/ramX devices created. | ||
55 | 55 | ||
56 | max_part | 56 | max_part |
57 | ======== | 57 | Maximum partition number. |
58 | Maximum partition number. | ||
59 | 58 | ||
60 | rd_size | 59 | rd_size |
61 | ======= | 60 | See ramdisk_size. |
62 | See ramdisk_size. | ||
63 | 61 | ||
64 | 3) Using "rdev -r" | 62 | 3) Using "rdev -r" |
65 | ------------------ | 63 | ------------------ |
@@ -71,11 +69,11 @@ to 2 MB (2^11) of where to find the RAM disk (this used to be the size). Bit | |||
71 | prompt/wait sequence is to be given before trying to read the RAM disk. Since | 69 | prompt/wait sequence is to be given before trying to read the RAM disk. Since |
72 | the RAM disk dynamically grows as data is being written into it, a size field | 70 | the RAM disk dynamically grows as data is being written into it, a size field |
73 | is not required. Bits 11 to 13 are not currently used and may as well be zero. | 71 | is not required. Bits 11 to 13 are not currently used and may as well be zero. |
74 | These numbers are no magical secrets, as seen below: | 72 | These numbers are no magical secrets, as seen below:: |
75 | 73 | ||
76 | ./arch/x86/kernel/setup.c:#define RAMDISK_IMAGE_START_MASK 0x07FF | 74 | ./arch/x86/kernel/setup.c:#define RAMDISK_IMAGE_START_MASK 0x07FF |
77 | ./arch/x86/kernel/setup.c:#define RAMDISK_PROMPT_FLAG 0x8000 | 75 | ./arch/x86/kernel/setup.c:#define RAMDISK_PROMPT_FLAG 0x8000 |
78 | ./arch/x86/kernel/setup.c:#define RAMDISK_LOAD_FLAG 0x4000 | 76 | ./arch/x86/kernel/setup.c:#define RAMDISK_LOAD_FLAG 0x4000 |
79 | 77 | ||
80 | Consider a typical two floppy disk setup, where you will have the | 78 | Consider a typical two floppy disk setup, where you will have the |
81 | kernel on disk one, and have already put a RAM disk image onto disk #2. | 79 | kernel on disk one, and have already put a RAM disk image onto disk #2. |
@@ -92,20 +90,23 @@ sequence so that you have a chance to switch floppy disks. | |||
92 | The command line equivalent is: "prompt_ramdisk=1" | 90 | The command line equivalent is: "prompt_ramdisk=1" |
93 | 91 | ||
94 | Putting that together gives 2^15 + 2^14 + 0 = 49152 for an rdev word. | 92 | Putting that together gives 2^15 + 2^14 + 0 = 49152 for an rdev word. |
95 | So to create disk one of the set, you would do: | 93 | So to create disk one of the set, you would do:: |
96 | 94 | ||
97 | /usr/src/linux# cat arch/x86/boot/zImage > /dev/fd0 | 95 | /usr/src/linux# cat arch/x86/boot/zImage > /dev/fd0 |
98 | /usr/src/linux# rdev /dev/fd0 /dev/fd0 | 96 | /usr/src/linux# rdev /dev/fd0 /dev/fd0 |
99 | /usr/src/linux# rdev -r /dev/fd0 49152 | 97 | /usr/src/linux# rdev -r /dev/fd0 49152 |
100 | 98 | ||
101 | If you make a boot disk that has LILO, then for the above, you would use: | 99 | If you make a boot disk that has LILO, then for the above, you would use:: |
100 | |||
102 | append = "ramdisk_start=0 load_ramdisk=1 prompt_ramdisk=1" | 101 | append = "ramdisk_start=0 load_ramdisk=1 prompt_ramdisk=1" |
103 | Since the default start = 0 and the default prompt = 1, you could use: | 102 | |
103 | Since the default start = 0 and the default prompt = 1, you could use:: | ||
104 | |||
104 | append = "load_ramdisk=1" | 105 | append = "load_ramdisk=1" |
105 | 106 | ||
106 | 107 | ||
107 | 4) An Example of Creating a Compressed RAM Disk | 108 | 4) An Example of Creating a Compressed RAM Disk |
108 | ---------------------------------------------- | 109 | ----------------------------------------------- |
109 | 110 | ||
110 | To create a RAM disk image, you will need a spare block device to | 111 | To create a RAM disk image, you will need a spare block device to |
111 | construct it on. This can be the RAM disk device itself, or an | 112 | construct it on. This can be the RAM disk device itself, or an |
@@ -120,11 +121,11 @@ a) Decide on the RAM disk size that you want. Say 2 MB for this example. | |||
120 | Create it by writing to the RAM disk device. (This step is not currently | 121 | Create it by writing to the RAM disk device. (This step is not currently |
121 | required, but may be in the future.) It is wise to zero out the | 122 | required, but may be in the future.) It is wise to zero out the |
122 | area (esp. for disks) so that maximal compression is achieved for | 123 | area (esp. for disks) so that maximal compression is achieved for |
123 | the unused blocks of the image that you are about to create. | 124 | the unused blocks of the image that you are about to create:: |
124 | 125 | ||
125 | dd if=/dev/zero of=/dev/ram0 bs=1k count=2048 | 126 | dd if=/dev/zero of=/dev/ram0 bs=1k count=2048 |
126 | 127 | ||
127 | b) Make a filesystem on it. Say ext2fs for this example. | 128 | b) Make a filesystem on it. Say ext2fs for this example:: |
128 | 129 | ||
129 | mke2fs -vm0 /dev/ram0 2048 | 130 | mke2fs -vm0 /dev/ram0 2048 |
130 | 131 | ||
@@ -133,11 +134,11 @@ c) Mount it, copy the files you want to it (eg: /etc/* /dev/* ...) | |||
133 | 134 | ||
134 | d) Compress the contents of the RAM disk. The level of compression | 135 | d) Compress the contents of the RAM disk. The level of compression |
135 | will be approximately 50% of the space used by the files. Unused | 136 | will be approximately 50% of the space used by the files. Unused |
136 | space on the RAM disk will compress to almost nothing. | 137 | space on the RAM disk will compress to almost nothing:: |
137 | 138 | ||
138 | dd if=/dev/ram0 bs=1k count=2048 | gzip -v9 > /tmp/ram_image.gz | 139 | dd if=/dev/ram0 bs=1k count=2048 | gzip -v9 > /tmp/ram_image.gz |
139 | 140 | ||
140 | e) Put the kernel onto the floppy | 141 | e) Put the kernel onto the floppy:: |
141 | 142 | ||
142 | dd if=zImage of=/dev/fd0 bs=1k | 143 | dd if=zImage of=/dev/fd0 bs=1k |
143 | 144 | ||
@@ -146,13 +147,13 @@ f) Put the RAM disk image onto the floppy, after the kernel. Use an offset | |||
146 | (possibly larger) kernel onto the same floppy later without overlapping | 147 | (possibly larger) kernel onto the same floppy later without overlapping |
147 | the RAM disk image. An offset of 400 kB for kernels about 350 kB in | 148 | the RAM disk image. An offset of 400 kB for kernels about 350 kB in |
148 | size would be reasonable. Make sure offset+size of ram_image.gz is | 149 | size would be reasonable. Make sure offset+size of ram_image.gz is |
149 | not larger than the total space on your floppy (usually 1440 kB). | 150 | not larger than the total space on your floppy (usually 1440 kB):: |
150 | 151 | ||
151 | dd if=/tmp/ram_image.gz of=/dev/fd0 bs=1k seek=400 | 152 | dd if=/tmp/ram_image.gz of=/dev/fd0 bs=1k seek=400 |
152 | 153 | ||
153 | g) Use "rdev" to set the boot device, RAM disk offset, prompt flag, etc. | 154 | g) Use "rdev" to set the boot device, RAM disk offset, prompt flag, etc. |
154 | For prompt_ramdisk=1, load_ramdisk=1, ramdisk_start=400, one would | 155 | For prompt_ramdisk=1, load_ramdisk=1, ramdisk_start=400, one would |
155 | have 2^15 + 2^14 + 400 = 49552. | 156 | have 2^15 + 2^14 + 400 = 49552:: |
156 | 157 | ||
157 | rdev /dev/fd0 /dev/fd0 | 158 | rdev /dev/fd0 /dev/fd0 |
158 | rdev -r /dev/fd0 49552 | 159 | rdev -r /dev/fd0 49552 |
@@ -160,15 +161,17 @@ g) Use "rdev" to set the boot device, RAM disk offset, prompt flag, etc. | |||
160 | That is it. You now have your boot/root compressed RAM disk floppy. Some | 161 | That is it. You now have your boot/root compressed RAM disk floppy. Some |
161 | users may wish to combine steps (d) and (f) by using a pipe. | 162 | users may wish to combine steps (d) and (f) by using a pipe. |
162 | 163 | ||
163 | -------------------------------------------------------------------------- | 164 | |
164 | Paul Gortmaker 12/95 | 165 | Paul Gortmaker 12/95 |
165 | 166 | ||
166 | Changelog: | 167 | Changelog: |
167 | ---------- | 168 | ---------- |
168 | 169 | ||
169 | 10-22-04 : Updated to reflect changes in command line options, remove | 170 | 10-22-04 : |
171 | Updated to reflect changes in command line options, remove | ||
170 | obsolete references, general cleanup. | 172 | obsolete references, general cleanup. |
171 | James Nelson (james4765@gmail.com) | 173 | James Nelson (james4765@gmail.com) |
172 | 174 | ||
173 | 175 | ||
174 | 12-95 : Original Document | 176 | 12-95 : |
177 | Original Document | ||
diff --git a/Documentation/blockdev/zram.txt b/Documentation/blockdev/zram.rst index 4df0ce271085..2111231c9c0f 100644 --- a/Documentation/blockdev/zram.txt +++ b/Documentation/blockdev/zram.rst | |||
@@ -1,7 +1,9 @@ | |||
1 | ======================================== | ||
1 | zram: Compressed RAM based block devices | 2 | zram: Compressed RAM based block devices |
2 | ---------------------------------------- | 3 | ======================================== |
3 | 4 | ||
4 | * Introduction | 5 | Introduction |
6 | ============ | ||
5 | 7 | ||
6 | The zram module creates RAM based block devices named /dev/zram<id> | 8 | The zram module creates RAM based block devices named /dev/zram<id> |
7 | (<id> = 0, 1, ...). Pages written to these disks are compressed and stored | 9 | (<id> = 0, 1, ...). Pages written to these disks are compressed and stored |
@@ -12,9 +14,11 @@ use as swap disks, various caches under /var and maybe many more :) | |||
12 | Statistics for individual zram devices are exported through sysfs nodes at | 14 | Statistics for individual zram devices are exported through sysfs nodes at |
13 | /sys/block/zram<id>/ | 15 | /sys/block/zram<id>/ |
14 | 16 | ||
15 | * Usage | 17 | Usage |
18 | ===== | ||
16 | 19 | ||
17 | There are several ways to configure and manage zram device(-s): | 20 | There are several ways to configure and manage zram device(-s): |
21 | |||
18 | a) using zram and zram_control sysfs attributes | 22 | a) using zram and zram_control sysfs attributes |
19 | b) using zramctl utility, provided by util-linux (util-linux@vger.kernel.org). | 23 | b) using zramctl utility, provided by util-linux (util-linux@vger.kernel.org). |
20 | 24 | ||
@@ -22,7 +26,7 @@ In this document we will describe only 'manual' zram configuration steps, | |||
22 | IOW, zram and zram_control sysfs attributes. | 26 | IOW, zram and zram_control sysfs attributes. |
23 | 27 | ||
24 | In order to get a better idea about zramctl please consult util-linux | 28 | In order to get a better idea about zramctl please consult util-linux |
25 | documentation, zramctl man-page or `zramctl --help'. Please be informed | 29 | documentation, zramctl man-page or `zramctl --help`. Please be informed |
26 | that zram maintainers do not develop/maintain util-linux or zramctl, should | 30 | that zram maintainers do not develop/maintain util-linux or zramctl, should |
27 | you have any questions please contact util-linux@vger.kernel.org | 31 | you have any questions please contact util-linux@vger.kernel.org |
28 | 32 | ||
@@ -30,19 +34,23 @@ Following shows a typical sequence of steps for using zram. | |||
30 | 34 | ||
31 | WARNING | 35 | WARNING |
32 | ======= | 36 | ======= |
37 | |||
33 | For the sake of simplicity we skip error checking parts in most of the | 38 | For the sake of simplicity we skip error checking parts in most of the |
34 | examples below. However, it is your sole responsibility to handle errors. | 39 | examples below. However, it is your sole responsibility to handle errors. |
35 | 40 | ||
36 | zram sysfs attributes always return negative values in case of errors. | 41 | zram sysfs attributes always return negative values in case of errors. |
37 | The list of possible return codes: | 42 | The list of possible return codes: |
38 | -EBUSY -- an attempt to modify an attribute that cannot be changed once | 43 | |
39 | the device has been initialised. Please reset device first; | 44 | ======== ============================================================= |
40 | -ENOMEM -- zram was not able to allocate enough memory to fulfil your | 45 | -EBUSY an attempt to modify an attribute that cannot be changed once |
41 | needs; | 46 | the device has been initialised. Please reset device first; |
42 | -EINVAL -- invalid input has been provided. | 47 | -ENOMEM zram was not able to allocate enough memory to fulfil your |
48 | needs; | ||
49 | -EINVAL invalid input has been provided. | ||
50 | ======== ============================================================= | ||
43 | 51 | ||
44 | If you use 'echo', the returned value that is changed by 'echo' utility, | 52 | If you use 'echo', the returned value that is changed by 'echo' utility, |
45 | and, in general case, something like: | 53 | and, in general case, something like:: |
46 | 54 | ||
47 | echo 3 > /sys/block/zram0/max_comp_streams | 55 | echo 3 > /sys/block/zram0/max_comp_streams |
48 | if [ $? -ne 0 ]; | 56 | if [ $? -ne 0 ]; |
@@ -51,7 +59,11 @@ and, in general case, something like: | |||
51 | 59 | ||
52 | should suffice. | 60 | should suffice. |
53 | 61 | ||
54 | 1) Load Module: | 62 | 1) Load Module |
63 | ============== | ||
64 | |||
65 | :: | ||
66 | |||
55 | modprobe zram num_devices=4 | 67 | modprobe zram num_devices=4 |
56 | This creates 4 devices: /dev/zram{0,1,2,3} | 68 | This creates 4 devices: /dev/zram{0,1,2,3} |
57 | 69 | ||
@@ -59,6 +71,8 @@ num_devices parameter is optional and tells zram how many devices should be | |||
59 | pre-created. Default: 1. | 71 | pre-created. Default: 1. |
60 | 72 | ||
61 | 2) Set max number of compression streams | 73 | 2) Set max number of compression streams |
74 | ======================================== | ||
75 | |||
62 | Regardless the value passed to this attribute, ZRAM will always | 76 | Regardless the value passed to this attribute, ZRAM will always |
63 | allocate multiple compression streams - one per online CPUs - thus | 77 | allocate multiple compression streams - one per online CPUs - thus |
64 | allowing several concurrent compression operations. The number of | 78 | allowing several concurrent compression operations. The number of |
@@ -66,16 +80,20 @@ allocated compression streams goes down when some of the CPUs | |||
66 | become offline. There is no single-compression-stream mode anymore, | 80 | become offline. There is no single-compression-stream mode anymore, |
67 | unless you are running a UP system or has only 1 CPU online. | 81 | unless you are running a UP system or has only 1 CPU online. |
68 | 82 | ||
69 | To find out how many streams are currently available: | 83 | To find out how many streams are currently available:: |
84 | |||
70 | cat /sys/block/zram0/max_comp_streams | 85 | cat /sys/block/zram0/max_comp_streams |
71 | 86 | ||
72 | 3) Select compression algorithm | 87 | 3) Select compression algorithm |
88 | =============================== | ||
89 | |||
73 | Using comp_algorithm device attribute one can see available and | 90 | Using comp_algorithm device attribute one can see available and |
74 | currently selected (shown in square brackets) compression algorithms, | 91 | currently selected (shown in square brackets) compression algorithms, |
75 | change selected compression algorithm (once the device is initialised | 92 | change selected compression algorithm (once the device is initialised |
76 | there is no way to change compression algorithm). | 93 | there is no way to change compression algorithm). |
77 | 94 | ||
78 | Examples: | 95 | Examples:: |
96 | |||
79 | #show supported compression algorithms | 97 | #show supported compression algorithms |
80 | cat /sys/block/zram0/comp_algorithm | 98 | cat /sys/block/zram0/comp_algorithm |
81 | lzo [lz4] | 99 | lzo [lz4] |
@@ -83,20 +101,23 @@ Examples: | |||
83 | #select lzo compression algorithm | 101 | #select lzo compression algorithm |
84 | echo lzo > /sys/block/zram0/comp_algorithm | 102 | echo lzo > /sys/block/zram0/comp_algorithm |
85 | 103 | ||
86 | For the time being, the `comp_algorithm' content does not necessarily | 104 | For the time being, the `comp_algorithm` content does not necessarily |
87 | show every compression algorithm supported by the kernel. We keep this | 105 | show every compression algorithm supported by the kernel. We keep this |
88 | list primarily to simplify device configuration and one can configure | 106 | list primarily to simplify device configuration and one can configure |
89 | a new device with a compression algorithm that is not listed in | 107 | a new device with a compression algorithm that is not listed in |
90 | `comp_algorithm'. The thing is that, internally, ZRAM uses Crypto API | 108 | `comp_algorithm`. The thing is that, internally, ZRAM uses Crypto API |
91 | and, if some of the algorithms were built as modules, it's impossible | 109 | and, if some of the algorithms were built as modules, it's impossible |
92 | to list all of them using, for instance, /proc/crypto or any other | 110 | to list all of them using, for instance, /proc/crypto or any other |
93 | method. This, however, has an advantage of permitting the usage of | 111 | method. This, however, has an advantage of permitting the usage of |
94 | custom crypto compression modules (implementing S/W or H/W compression). | 112 | custom crypto compression modules (implementing S/W or H/W compression). |
95 | 113 | ||
96 | 4) Set Disksize | 114 | 4) Set Disksize |
115 | =============== | ||
116 | |||
97 | Set disk size by writing the value to sysfs node 'disksize'. | 117 | Set disk size by writing the value to sysfs node 'disksize'. |
98 | The value can be either in bytes or you can use mem suffixes. | 118 | The value can be either in bytes or you can use mem suffixes. |
99 | Examples: | 119 | Examples:: |
120 | |||
100 | # Initialize /dev/zram0 with 50MB disksize | 121 | # Initialize /dev/zram0 with 50MB disksize |
101 | echo $((50*1024*1024)) > /sys/block/zram0/disksize | 122 | echo $((50*1024*1024)) > /sys/block/zram0/disksize |
102 | 123 | ||
@@ -111,10 +132,13 @@ since we expect a 2:1 compression ratio. Note that zram uses about 0.1% of the | |||
111 | size of the disk when not in use so a huge zram is wasteful. | 132 | size of the disk when not in use so a huge zram is wasteful. |
112 | 133 | ||
113 | 5) Set memory limit: Optional | 134 | 5) Set memory limit: Optional |
135 | ============================= | ||
136 | |||
114 | Set memory limit by writing the value to sysfs node 'mem_limit'. | 137 | Set memory limit by writing the value to sysfs node 'mem_limit'. |
115 | The value can be either in bytes or you can use mem suffixes. | 138 | The value can be either in bytes or you can use mem suffixes. |
116 | In addition, you could change the value in runtime. | 139 | In addition, you could change the value in runtime. |
117 | Examples: | 140 | Examples:: |
141 | |||
118 | # limit /dev/zram0 with 50MB memory | 142 | # limit /dev/zram0 with 50MB memory |
119 | echo $((50*1024*1024)) > /sys/block/zram0/mem_limit | 143 | echo $((50*1024*1024)) > /sys/block/zram0/mem_limit |
120 | 144 | ||
@@ -126,7 +150,11 @@ Examples: | |||
126 | # To disable memory limit | 150 | # To disable memory limit |
127 | echo 0 > /sys/block/zram0/mem_limit | 151 | echo 0 > /sys/block/zram0/mem_limit |
128 | 152 | ||
129 | 6) Activate: | 153 | 6) Activate |
154 | =========== | ||
155 | |||
156 | :: | ||
157 | |||
130 | mkswap /dev/zram0 | 158 | mkswap /dev/zram0 |
131 | swapon /dev/zram0 | 159 | swapon /dev/zram0 |
132 | 160 | ||
@@ -134,6 +162,7 @@ Examples: | |||
134 | mount /dev/zram1 /tmp | 162 | mount /dev/zram1 /tmp |
135 | 163 | ||
136 | 7) Add/remove zram devices | 164 | 7) Add/remove zram devices |
165 | ========================== | ||
137 | 166 | ||
138 | zram provides a control interface, which enables dynamic (on-demand) device | 167 | zram provides a control interface, which enables dynamic (on-demand) device |
139 | addition and removal. | 168 | addition and removal. |
@@ -142,37 +171,44 @@ In order to add a new /dev/zramX device, perform read operation on hot_add | |||
142 | attribute. This will return either new device's device id (meaning that you | 171 | attribute. This will return either new device's device id (meaning that you |
143 | can use /dev/zram<id>) or error code. | 172 | can use /dev/zram<id>) or error code. |
144 | 173 | ||
145 | Example: | 174 | Example:: |
175 | |||
146 | cat /sys/class/zram-control/hot_add | 176 | cat /sys/class/zram-control/hot_add |
147 | 1 | 177 | 1 |
148 | 178 | ||
149 | To remove the existing /dev/zramX device (where X is a device id) | 179 | To remove the existing /dev/zramX device (where X is a device id) |
150 | execute | 180 | execute:: |
181 | |||
151 | echo X > /sys/class/zram-control/hot_remove | 182 | echo X > /sys/class/zram-control/hot_remove |
152 | 183 | ||
153 | 8) Stats: | 184 | 8) Stats |
185 | ======== | ||
186 | |||
154 | Per-device statistics are exported as various nodes under /sys/block/zram<id>/ | 187 | Per-device statistics are exported as various nodes under /sys/block/zram<id>/ |
155 | 188 | ||
156 | A brief description of exported device attributes. For more details please | 189 | A brief description of exported device attributes. For more details please |
157 | read Documentation/ABI/testing/sysfs-block-zram. | 190 | read Documentation/ABI/testing/sysfs-block-zram. |
158 | 191 | ||
192 | ====================== ====== =============================================== | ||
159 | Name access description | 193 | Name access description |
160 | ---- ------ ----------- | 194 | ====================== ====== =============================================== |
161 | disksize RW show and set the device's disk size | 195 | disksize RW show and set the device's disk size |
162 | initstate RO shows the initialization state of the device | 196 | initstate RO shows the initialization state of the device |
163 | reset WO trigger device reset | 197 | reset WO trigger device reset |
164 | mem_used_max WO reset the `mem_used_max' counter (see later) | 198 | mem_used_max WO reset the `mem_used_max` counter (see later) |
165 | mem_limit WO specifies the maximum amount of memory ZRAM can use | 199 | mem_limit WO specifies the maximum amount of memory ZRAM can |
166 | to store the compressed data | 200 | use to store the compressed data |
167 | writeback_limit WO specifies the maximum amount of write IO zram can | 201 | writeback_limit WO specifies the maximum amount of write IO zram |
168 | write out to backing device as 4KB unit | 202 | can write out to backing device as 4KB unit |
169 | writeback_limit_enable RW show and set writeback_limit feature | 203 | writeback_limit_enable RW show and set writeback_limit feature |
170 | max_comp_streams RW the number of possible concurrent compress operations | 204 | max_comp_streams RW the number of possible concurrent compress |
205 | operations | ||
171 | comp_algorithm RW show and change the compression algorithm | 206 | comp_algorithm RW show and change the compression algorithm |
172 | compact WO trigger memory compaction | 207 | compact WO trigger memory compaction |
173 | debug_stat RO this file is used for zram debugging purposes | 208 | debug_stat RO this file is used for zram debugging purposes |
174 | backing_dev RW set up backend storage for zram to write out | 209 | backing_dev RW set up backend storage for zram to write out |
175 | idle WO mark allocated slot as idle | 210 | idle WO mark allocated slot as idle |
211 | ====================== ====== =============================================== | ||
176 | 212 | ||
177 | 213 | ||
178 | User space is advised to use the following files to read the device statistics. | 214 | User space is advised to use the following files to read the device statistics. |
@@ -188,23 +224,31 @@ The stat file represents device's I/O statistics not accounted by block | |||
188 | layer and, thus, not available in zram<id>/stat file. It consists of a | 224 | layer and, thus, not available in zram<id>/stat file. It consists of a |
189 | single line of text and contains the following stats separated by | 225 | single line of text and contains the following stats separated by |
190 | whitespace: | 226 | whitespace: |
191 | failed_reads the number of failed reads | 227 | |
192 | failed_writes the number of failed writes | 228 | ============= ============================================================= |
193 | invalid_io the number of non-page-size-aligned I/O requests | 229 | failed_reads The number of failed reads |
230 | failed_writes The number of failed writes | ||
231 | invalid_io The number of non-page-size-aligned I/O requests | ||
194 | notify_free Depending on device usage scenario it may account | 232 | notify_free Depending on device usage scenario it may account |
233 | |||
195 | a) the number of pages freed because of swap slot free | 234 | a) the number of pages freed because of swap slot free |
196 | notifications or b) the number of pages freed because of | 235 | notifications |
197 | REQ_OP_DISCARD requests sent by bio. The former ones are | 236 | b) the number of pages freed because of |
198 | sent to a swap block device when a swap slot is freed, | 237 | REQ_OP_DISCARD requests sent by bio. The former ones are |
199 | which implies that this disk is being used as a swap disk. | 238 | sent to a swap block device when a swap slot is freed, |
239 | which implies that this disk is being used as a swap disk. | ||
240 | |||
200 | The latter ones are sent by filesystem mounted with | 241 | The latter ones are sent by filesystem mounted with |
201 | discard option, whenever some data blocks are getting | 242 | discard option, whenever some data blocks are getting |
202 | discarded. | 243 | discarded. |
244 | ============= ============================================================= | ||
203 | 245 | ||
204 | File /sys/block/zram<id>/mm_stat | 246 | File /sys/block/zram<id>/mm_stat |
205 | 247 | ||
206 | The stat file represents device's mm statistics. It consists of a single | 248 | The stat file represents device's mm statistics. It consists of a single |
207 | line of text and contains the following stats separated by whitespace: | 249 | line of text and contains the following stats separated by whitespace: |
250 | |||
251 | ================ ============================================================= | ||
208 | orig_data_size uncompressed size of data stored in this disk. | 252 | orig_data_size uncompressed size of data stored in this disk. |
209 | This excludes same-element-filled pages (same_pages) since | 253 | This excludes same-element-filled pages (same_pages) since |
210 | no memory is allocated for them. | 254 | no memory is allocated for them. |
@@ -223,58 +267,71 @@ line of text and contains the following stats separated by whitespace: | |||
223 | No memory is allocated for such pages. | 267 | No memory is allocated for such pages. |
224 | pages_compacted the number of pages freed during compaction | 268 | pages_compacted the number of pages freed during compaction |
225 | huge_pages the number of incompressible pages | 269 | huge_pages the number of incompressible pages |
270 | ================ ============================================================= | ||
226 | 271 | ||
227 | File /sys/block/zram<id>/bd_stat | 272 | File /sys/block/zram<id>/bd_stat |
228 | 273 | ||
229 | The stat file represents device's backing device statistics. It consists of | 274 | The stat file represents device's backing device statistics. It consists of |
230 | a single line of text and contains the following stats separated by whitespace: | 275 | a single line of text and contains the following stats separated by whitespace: |
276 | |||
277 | ============== ============================================================= | ||
231 | bd_count size of data written in backing device. | 278 | bd_count size of data written in backing device. |
232 | Unit: 4K bytes | 279 | Unit: 4K bytes |
233 | bd_reads the number of reads from backing device | 280 | bd_reads the number of reads from backing device |
234 | Unit: 4K bytes | 281 | Unit: 4K bytes |
235 | bd_writes the number of writes to backing device | 282 | bd_writes the number of writes to backing device |
236 | Unit: 4K bytes | 283 | Unit: 4K bytes |
284 | ============== ============================================================= | ||
285 | |||
286 | 9) Deactivate | ||
287 | ============= | ||
288 | |||
289 | :: | ||
237 | 290 | ||
238 | 9) Deactivate: | ||
239 | swapoff /dev/zram0 | 291 | swapoff /dev/zram0 |
240 | umount /dev/zram1 | 292 | umount /dev/zram1 |
241 | 293 | ||
242 | 10) Reset: | 294 | 10) Reset |
243 | Write any positive value to 'reset' sysfs node | 295 | ========= |
244 | echo 1 > /sys/block/zram0/reset | 296 | |
245 | echo 1 > /sys/block/zram1/reset | 297 | Write any positive value to 'reset' sysfs node:: |
298 | |||
299 | echo 1 > /sys/block/zram0/reset | ||
300 | echo 1 > /sys/block/zram1/reset | ||
246 | 301 | ||
247 | This frees all the memory allocated for the given device and | 302 | This frees all the memory allocated for the given device and |
248 | resets the disksize to zero. You must set the disksize again | 303 | resets the disksize to zero. You must set the disksize again |
249 | before reusing the device. | 304 | before reusing the device. |
250 | 305 | ||
251 | * Optional Feature | 306 | Optional Feature |
307 | ================ | ||
252 | 308 | ||
253 | = writeback | 309 | writeback |
310 | --------- | ||
254 | 311 | ||
255 | With CONFIG_ZRAM_WRITEBACK, zram can write idle/incompressible page | 312 | With CONFIG_ZRAM_WRITEBACK, zram can write idle/incompressible page |
256 | to backing storage rather than keeping it in memory. | 313 | to backing storage rather than keeping it in memory. |
257 | To use the feature, admin should set up backing device via | 314 | To use the feature, admin should set up backing device via:: |
258 | 315 | ||
259 | "echo /dev/sda5 > /sys/block/zramX/backing_dev" | 316 | echo /dev/sda5 > /sys/block/zramX/backing_dev |
260 | 317 | ||
261 | before disksize setting. It supports only partition at this moment. | 318 | before disksize setting. It supports only partition at this moment. |
262 | If admin want to use incompressible page writeback, they could do via | 319 | If admin want to use incompressible page writeback, they could do via:: |
263 | 320 | ||
264 | "echo huge > /sys/block/zramX/write" | 321 | echo huge > /sys/block/zramX/write |
265 | 322 | ||
266 | To use idle page writeback, first, user need to declare zram pages | 323 | To use idle page writeback, first, user need to declare zram pages |
267 | as idle. | 324 | as idle:: |
268 | 325 | ||
269 | "echo all > /sys/block/zramX/idle" | 326 | echo all > /sys/block/zramX/idle |
270 | 327 | ||
271 | From now on, any pages on zram are idle pages. The idle mark | 328 | From now on, any pages on zram are idle pages. The idle mark |
272 | will be removed until someone request access of the block. | 329 | will be removed until someone request access of the block. |
273 | IOW, unless there is access request, those pages are still idle pages. | 330 | IOW, unless there is access request, those pages are still idle pages. |
274 | 331 | ||
275 | Admin can request writeback of those idle pages at right timing via | 332 | Admin can request writeback of those idle pages at right timing via:: |
276 | 333 | ||
277 | "echo idle > /sys/block/zramX/writeback" | 334 | echo idle > /sys/block/zramX/writeback |
278 | 335 | ||
279 | With the command, zram writeback idle pages from memory to the storage. | 336 | With the command, zram writeback idle pages from memory to the storage. |
280 | 337 | ||
@@ -285,7 +342,7 @@ to guarantee storage health for entire product life. | |||
285 | To overcome the concern, zram supports "writeback_limit" feature. | 342 | To overcome the concern, zram supports "writeback_limit" feature. |
286 | The "writeback_limit_enable"'s default value is 0 so that it doesn't limit | 343 | The "writeback_limit_enable"'s default value is 0 so that it doesn't limit |
287 | any writeback. IOW, if admin want to apply writeback budget, he should | 344 | any writeback. IOW, if admin want to apply writeback budget, he should |
288 | enable writeback_limit_enable via | 345 | enable writeback_limit_enable via:: |
289 | 346 | ||
290 | $ echo 1 > /sys/block/zramX/writeback_limit_enable | 347 | $ echo 1 > /sys/block/zramX/writeback_limit_enable |
291 | 348 | ||
@@ -296,7 +353,7 @@ until admin set the budget via /sys/block/zramX/writeback_limit. | |||
296 | assigned via /sys/block/zramX/writeback_limit is meaninless.) | 353 | assigned via /sys/block/zramX/writeback_limit is meaninless.) |
297 | 354 | ||
298 | If admin want to limit writeback as per-day 400M, he could do it | 355 | If admin want to limit writeback as per-day 400M, he could do it |
299 | like below. | 356 | like below:: |
300 | 357 | ||
301 | $ MB_SHIFT=20 | 358 | $ MB_SHIFT=20 |
302 | $ 4K_SHIFT=12 | 359 | $ 4K_SHIFT=12 |
@@ -305,16 +362,16 @@ like below. | |||
305 | $ echo 1 > /sys/block/zram0/writeback_limit_enable | 362 | $ echo 1 > /sys/block/zram0/writeback_limit_enable |
306 | 363 | ||
307 | If admin want to allow further write again once the bugdet is exausted, | 364 | If admin want to allow further write again once the bugdet is exausted, |
308 | he could do it like below | 365 | he could do it like below:: |
309 | 366 | ||
310 | $ echo $((400<<MB_SHIFT>>4K_SHIFT)) > \ | 367 | $ echo $((400<<MB_SHIFT>>4K_SHIFT)) > \ |
311 | /sys/block/zram0/writeback_limit | 368 | /sys/block/zram0/writeback_limit |
312 | 369 | ||
313 | If admin want to see remaining writeback budget since he set, | 370 | If admin want to see remaining writeback budget since he set:: |
314 | 371 | ||
315 | $ cat /sys/block/zramX/writeback_limit | 372 | $ cat /sys/block/zramX/writeback_limit |
316 | 373 | ||
317 | If admin want to disable writeback limit, he could do | 374 | If admin want to disable writeback limit, he could do:: |
318 | 375 | ||
319 | $ echo 0 > /sys/block/zramX/writeback_limit_enable | 376 | $ echo 0 > /sys/block/zramX/writeback_limit_enable |
320 | 377 | ||
@@ -326,25 +383,35 @@ budget in next setting is user's job. | |||
326 | If admin want to measure writeback count in a certain period, he could | 383 | If admin want to measure writeback count in a certain period, he could |
327 | know it via /sys/block/zram0/bd_stat's 3rd column. | 384 | know it via /sys/block/zram0/bd_stat's 3rd column. |
328 | 385 | ||
329 | = memory tracking | 386 | memory tracking |
387 | =============== | ||
330 | 388 | ||
331 | With CONFIG_ZRAM_MEMORY_TRACKING, user can know information of the | 389 | With CONFIG_ZRAM_MEMORY_TRACKING, user can know information of the |
332 | zram block. It could be useful to catch cold or incompressible | 390 | zram block. It could be useful to catch cold or incompressible |
333 | pages of the process with*pagemap. | 391 | pages of the process with*pagemap. |
392 | |||
334 | If you enable the feature, you could see block state via | 393 | If you enable the feature, you could see block state via |
335 | /sys/kernel/debug/zram/zram0/block_state". The output is as follows, | 394 | /sys/kernel/debug/zram/zram0/block_state". The output is as follows:: |
336 | 395 | ||
337 | 300 75.033841 .wh. | 396 | 300 75.033841 .wh. |
338 | 301 63.806904 s... | 397 | 301 63.806904 s... |
339 | 302 63.806919 ..hi | 398 | 302 63.806919 ..hi |
340 | 399 | ||
341 | First column is zram's block index. | 400 | First column |
342 | Second column is access time since the system was booted | 401 | zram's block index. |
343 | Third column is state of the block. | 402 | Second column |
344 | (s: same page | 403 | access time since the system was booted |
345 | w: written page to backing store | 404 | Third column |
346 | h: huge page | 405 | state of the block: |
347 | i: idle page) | 406 | |
407 | s: | ||
408 | same page | ||
409 | w: | ||
410 | written page to backing store | ||
411 | h: | ||
412 | huge page | ||
413 | i: | ||
414 | idle page | ||
348 | 415 | ||
349 | First line of above example says 300th block is accessed at 75.033841sec | 416 | First line of above example says 300th block is accessed at 75.033841sec |
350 | and the block's state is huge so it is written back to the backing | 417 | and the block's state is huge so it is written back to the backing |
diff --git a/MAINTAINERS b/MAINTAINERS index 3ee73751f56c..ec541c8dc645 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -11076,7 +11076,7 @@ M: Josef Bacik <josef@toxicpanda.com> | |||
11076 | S: Maintained | 11076 | S: Maintained |
11077 | L: linux-block@vger.kernel.org | 11077 | L: linux-block@vger.kernel.org |
11078 | L: nbd@other.debian.org | 11078 | L: nbd@other.debian.org |
11079 | F: Documentation/blockdev/nbd.txt | 11079 | F: Documentation/blockdev/nbd.rst |
11080 | F: drivers/block/nbd.c | 11080 | F: drivers/block/nbd.c |
11081 | F: include/trace/events/nbd.h | 11081 | F: include/trace/events/nbd.h |
11082 | F: include/uapi/linux/nbd.h | 11082 | F: include/uapi/linux/nbd.h |
@@ -12086,7 +12086,7 @@ PARIDE DRIVERS FOR PARALLEL PORT IDE DEVICES | |||
12086 | M: Tim Waugh <tim@cyberelk.net> | 12086 | M: Tim Waugh <tim@cyberelk.net> |
12087 | L: linux-parport@lists.infradead.org (subscribers-only) | 12087 | L: linux-parport@lists.infradead.org (subscribers-only) |
12088 | S: Maintained | 12088 | S: Maintained |
12089 | F: Documentation/blockdev/paride.txt | 12089 | F: Documentation/blockdev/paride.rst |
12090 | F: drivers/block/paride/ | 12090 | F: drivers/block/paride/ |
12091 | 12091 | ||
12092 | PARISC ARCHITECTURE | 12092 | PARISC ARCHITECTURE |
@@ -13367,7 +13367,7 @@ F: drivers/net/wireless/ralink/rt2x00/ | |||
13367 | RAMDISK RAM BLOCK DEVICE DRIVER | 13367 | RAMDISK RAM BLOCK DEVICE DRIVER |
13368 | M: Jens Axboe <axboe@kernel.dk> | 13368 | M: Jens Axboe <axboe@kernel.dk> |
13369 | S: Maintained | 13369 | S: Maintained |
13370 | F: Documentation/blockdev/ramdisk.txt | 13370 | F: Documentation/blockdev/ramdisk.rst |
13371 | F: drivers/block/brd.c | 13371 | F: drivers/block/brd.c |
13372 | 13372 | ||
13373 | RANCHU VIRTUAL BOARD FOR MIPS | 13373 | RANCHU VIRTUAL BOARD FOR MIPS |
@@ -17723,7 +17723,7 @@ R: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> | |||
17723 | L: linux-kernel@vger.kernel.org | 17723 | L: linux-kernel@vger.kernel.org |
17724 | S: Maintained | 17724 | S: Maintained |
17725 | F: drivers/block/zram/ | 17725 | F: drivers/block/zram/ |
17726 | F: Documentation/blockdev/zram.txt | 17726 | F: Documentation/blockdev/zram.rst |
17727 | 17727 | ||
17728 | ZS DECSTATION Z85C30 SERIAL DRIVER | 17728 | ZS DECSTATION Z85C30 SERIAL DRIVER |
17729 | M: "Maciej W. Rozycki" <macro@linux-mips.org> | 17729 | M: "Maciej W. Rozycki" <macro@linux-mips.org> |
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index 96ec7e0fc1ea..c43690b973d8 100644 --- a/drivers/block/Kconfig +++ b/drivers/block/Kconfig | |||
@@ -31,7 +31,7 @@ config BLK_DEV_FD | |||
31 | If you want to use the floppy disk drive(s) of your PC under Linux, | 31 | If you want to use the floppy disk drive(s) of your PC under Linux, |
32 | say Y. Information about this driver, especially important for IBM | 32 | say Y. Information about this driver, especially important for IBM |
33 | Thinkpad users, is contained in | 33 | Thinkpad users, is contained in |
34 | <file:Documentation/blockdev/floppy.txt>. | 34 | <file:Documentation/blockdev/floppy.rst>. |
35 | That file also contains the location of the Floppy driver FAQ as | 35 | That file also contains the location of the Floppy driver FAQ as |
36 | well as location of the fdutils package used to configure additional | 36 | well as location of the fdutils package used to configure additional |
37 | parameters of the driver at run time. | 37 | parameters of the driver at run time. |
@@ -96,7 +96,7 @@ config PARIDE | |||
96 | your computer's parallel port. Most of them are actually IDE devices | 96 | your computer's parallel port. Most of them are actually IDE devices |
97 | using a parallel port IDE adapter. This option enables the PARIDE | 97 | using a parallel port IDE adapter. This option enables the PARIDE |
98 | subsystem which contains drivers for many of these external drives. | 98 | subsystem which contains drivers for many of these external drives. |
99 | Read <file:Documentation/blockdev/paride.txt> for more information. | 99 | Read <file:Documentation/blockdev/paride.rst> for more information. |
100 | 100 | ||
101 | If you have said Y to the "Parallel-port support" configuration | 101 | If you have said Y to the "Parallel-port support" configuration |
102 | option, you may share a single port between your printer and other | 102 | option, you may share a single port between your printer and other |
@@ -261,7 +261,7 @@ config BLK_DEV_NBD | |||
261 | userland (making server and client physically the same computer, | 261 | userland (making server and client physically the same computer, |
262 | communicating using the loopback network device). | 262 | communicating using the loopback network device). |
263 | 263 | ||
264 | Read <file:Documentation/blockdev/nbd.txt> for more information, | 264 | Read <file:Documentation/blockdev/nbd.rst> for more information, |
265 | especially about where to find the server code, which runs in user | 265 | especially about where to find the server code, which runs in user |
266 | space and does not need special kernel support. | 266 | space and does not need special kernel support. |
267 | 267 | ||
@@ -303,7 +303,7 @@ config BLK_DEV_RAM | |||
303 | during the initial install of Linux. | 303 | during the initial install of Linux. |
304 | 304 | ||
305 | Note that the kernel command line option "ramdisk=XX" is now obsolete. | 305 | Note that the kernel command line option "ramdisk=XX" is now obsolete. |
306 | For details, read <file:Documentation/blockdev/ramdisk.txt>. | 306 | For details, read <file:Documentation/blockdev/ramdisk.rst>. |
307 | 307 | ||
308 | To compile this driver as a module, choose M here: the | 308 | To compile this driver as a module, choose M here: the |
309 | module will be called brd. An alias "rd" has been defined | 309 | module will be called brd. An alias "rd" has been defined |
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index b933a7eea52b..5c99e52f9dc1 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
@@ -4424,7 +4424,7 @@ static int __init floppy_setup(char *str) | |||
4424 | pr_cont("\n"); | 4424 | pr_cont("\n"); |
4425 | } else | 4425 | } else |
4426 | DPRINT("botched floppy option\n"); | 4426 | DPRINT("botched floppy option\n"); |
4427 | DPRINT("Read Documentation/blockdev/floppy.txt\n"); | 4427 | DPRINT("Read Documentation/blockdev/floppy.rst\n"); |
4428 | return 0; | 4428 | return 0; |
4429 | } | 4429 | } |
4430 | 4430 | ||
diff --git a/drivers/block/zram/Kconfig b/drivers/block/zram/Kconfig index 1ffc64770643..e06b99d54816 100644 --- a/drivers/block/zram/Kconfig +++ b/drivers/block/zram/Kconfig | |||
@@ -12,7 +12,7 @@ config ZRAM | |||
12 | It has several use cases, for example: /tmp storage, use as swap | 12 | It has several use cases, for example: /tmp storage, use as swap |
13 | disks and maybe many more. | 13 | disks and maybe many more. |
14 | 14 | ||
15 | See Documentation/blockdev/zram.txt for more information. | 15 | See Documentation/blockdev/zram.rst for more information. |
16 | 16 | ||
17 | config ZRAM_WRITEBACK | 17 | config ZRAM_WRITEBACK |
18 | bool "Write back incompressible or idle page to backing device" | 18 | bool "Write back incompressible or idle page to backing device" |
@@ -26,7 +26,7 @@ config ZRAM_WRITEBACK | |||
26 | With /sys/block/zramX/{idle,writeback}, application could ask | 26 | With /sys/block/zramX/{idle,writeback}, application could ask |
27 | idle page's writeback to the backing device to save in memory. | 27 | idle page's writeback to the backing device to save in memory. |
28 | 28 | ||
29 | See Documentation/blockdev/zram.txt for more information. | 29 | See Documentation/blockdev/zram.rst for more information. |
30 | 30 | ||
31 | config ZRAM_MEMORY_TRACKING | 31 | config ZRAM_MEMORY_TRACKING |
32 | bool "Track zRam block status" | 32 | bool "Track zRam block status" |
@@ -36,4 +36,4 @@ config ZRAM_MEMORY_TRACKING | |||
36 | of zRAM. Admin could see the information via | 36 | of zRAM. Admin could see the information via |
37 | /sys/kernel/debug/zram/zramX/block_state. | 37 | /sys/kernel/debug/zram/zramX/block_state. |
38 | 38 | ||
39 | See Documentation/blockdev/zram.txt for more information. | 39 | See Documentation/blockdev/zram.rst for more information. |
diff --git a/tools/testing/selftests/zram/README b/tools/testing/selftests/zram/README index 7972cc512408..5fa378391d3b 100644 --- a/tools/testing/selftests/zram/README +++ b/tools/testing/selftests/zram/README | |||
@@ -37,4 +37,4 @@ Commands required for testing: | |||
37 | - mkfs/ mkfs.ext4 | 37 | - mkfs/ mkfs.ext4 |
38 | 38 | ||
39 | For more information please refer: | 39 | For more information please refer: |
40 | kernel-source-tree/Documentation/blockdev/zram.txt | 40 | kernel-source-tree/Documentation/blockdev/zram.rst |