xref: /openbmc/linux/drivers/block/Kconfig (revision 2d786e66)
1# SPDX-License-Identifier: GPL-2.0
2#
3# Block device driver configuration
4#
5
6menuconfig BLK_DEV
7	bool "Block devices"
8	depends on BLOCK
9	default y
10	help
11	  Say Y here to get to see options for various different block device
12	  drivers. This option alone does not add any kernel code.
13
14	  If you say N, all options in this submenu will be skipped and disabled;
15	  only do this if you know what you are doing.
16
17if BLK_DEV
18
19source "drivers/block/null_blk/Kconfig"
20
21config BLK_DEV_FD
22	tristate "Normal floppy disk support"
23	depends on ARCH_MAY_HAVE_PC_FDC
24	help
25	  If you want to use the floppy disk drive(s) of your PC under Linux,
26	  say Y. Information about this driver, especially important for IBM
27	  Thinkpad users, is contained in
28	  <file:Documentation/admin-guide/blockdev/floppy.rst>.
29	  That file also contains the location of the Floppy driver FAQ as
30	  well as location of the fdutils package used to configure additional
31	  parameters of the driver at run time.
32
33	  To compile this driver as a module, choose M here: the
34	  module will be called floppy.
35
36config BLK_DEV_FD_RAWCMD
37	bool "Support for raw floppy disk commands (DEPRECATED)"
38	depends on BLK_DEV_FD
39	help
40	  If you want to use actual physical floppies and expect to do
41	  special low-level hardware accesses to them (access and use
42	  non-standard formats, for example), then enable this.
43
44	  Note that the code enabled by this option is rarely used and
45	  might be unstable or insecure, and distros should not enable it.
46
47	  Note: FDRAWCMD is deprecated and will be removed from the kernel
48	  in the near future.
49
50	  If unsure, say N.
51
52config AMIGA_FLOPPY
53	tristate "Amiga floppy support"
54	depends on AMIGA
55
56config ATARI_FLOPPY
57	tristate "Atari floppy support"
58	depends on ATARI
59
60config MAC_FLOPPY
61	tristate "Support for PowerMac floppy"
62	depends on PPC_PMAC && !PPC_PMAC64
63	help
64	  If you have a SWIM-3 (Super Woz Integrated Machine 3; from Apple)
65	  floppy controller, say Y here. Most commonly found in PowerMacs.
66
67config BLK_DEV_SWIM
68	tristate "Support for SWIM Macintosh floppy"
69	depends on M68K && MAC && !HIGHMEM
70	help
71	  You should select this option if you want floppy support
72	  and you don't have a II, IIfx, Q900, Q950 or AV series.
73
74config AMIGA_Z2RAM
75	tristate "Amiga Zorro II ramdisk support"
76	depends on ZORRO
77	help
78	  This enables support for using Chip RAM and Zorro II RAM as a
79	  ramdisk or as a swap partition. Say Y if you want to include this
80	  driver in the kernel.
81
82	  To compile this driver as a module, choose M here: the
83	  module will be called z2ram.
84
85config N64CART
86	bool "N64 cart support"
87	depends on MACH_NINTENDO64
88	help
89	  Support for the N64 cart.
90
91config CDROM
92	tristate
93
94config GDROM
95	tristate "SEGA Dreamcast GD-ROM drive"
96	depends on SH_DREAMCAST
97	select CDROM
98	help
99	  A standard SEGA Dreamcast comes with a modified CD ROM drive called a
100	  "GD-ROM" by SEGA to signify it is capable of reading special disks
101	  with up to 1 GB of data. This drive will also read standard CD ROM
102	  disks. Select this option to access any disks in your GD ROM drive.
103	  Most users will want to say "Y" here.
104	  You can also build this as a module which will be called gdrom.
105
106source "drivers/block/mtip32xx/Kconfig"
107
108source "drivers/block/zram/Kconfig"
109
110config BLK_DEV_UBD
111	bool "Virtual block device"
112	depends on UML
113	help
114          The User-Mode Linux port includes a driver called UBD which will let
115          you access arbitrary files on the host computer as block devices.
116          Unless you know that you do not need such virtual block devices say
117          Y here.
118
119config BLK_DEV_UBD_SYNC
120	bool "Always do synchronous disk IO for UBD"
121	depends on BLK_DEV_UBD
122	help
123	  Writes to the virtual block device are not immediately written to the
124	  host's disk; this may cause problems if, for example, the User-Mode
125	  Linux 'Virtual Machine' uses a journalling filesystem and the host
126	  computer crashes.
127
128          Synchronous operation (i.e. always writing data to the host's disk
129          immediately) is configurable on a per-UBD basis by using a special
130          kernel command line option.  Alternatively, you can say Y here to
131          turn on synchronous operation by default for all block devices.
132
133          If you're running a journalling file system (like reiserfs, for
134          example) in your virtual machine, you will want to say Y here.  If
135          you care for the safety of the data in your virtual machine, Y is a
136          wise choice too.  In all other cases (for example, if you're just
137          playing around with User-Mode Linux) you can choose N.
138
139config BLK_DEV_COW_COMMON
140	bool
141	default BLK_DEV_UBD
142
143config BLK_DEV_LOOP
144	tristate "Loopback device support"
145	help
146	  Saying Y here will allow you to use a regular file as a block
147	  device; you can then create a file system on that block device and
148	  mount it just as you would mount other block devices such as hard
149	  drive partitions, CD-ROM drives or floppy drives. The loop devices
150	  are block special device files with major number 7 and typically
151	  called /dev/loop0, /dev/loop1 etc.
152
153	  This is useful if you want to check an ISO 9660 file system before
154	  burning the CD, or if you want to use floppy images without first
155	  writing them to floppy. Furthermore, some Linux distributions avoid
156	  the need for a dedicated Linux partition by keeping their complete
157	  root file system inside a DOS FAT file using this loop device
158	  driver.
159
160	  To use the loop device, you need the losetup utility, found in the
161	  util-linux package, see
162	  <https://www.kernel.org/pub/linux/utils/util-linux/>.
163
164	  The loop device driver can also be used to "hide" a file system in
165	  a disk partition, floppy, or regular file, either using encryption
166	  (scrambling the data) or steganography (hiding the data in the low
167	  bits of, say, a sound file). This is also safe if the file resides
168	  on a remote file server.
169
170	  Note that this loop device has nothing to do with the loopback
171	  device used for network connections from the machine to itself.
172
173	  To compile this driver as a module, choose M here: the
174	  module will be called loop.
175
176	  Most users will answer N here.
177
178config BLK_DEV_LOOP_MIN_COUNT
179	int "Number of loop devices to pre-create at init time"
180	depends on BLK_DEV_LOOP
181	default 8
182	help
183	  Static number of loop devices to be unconditionally pre-created
184	  at init time.
185
186	  This default value can be overwritten on the kernel command
187	  line or with module-parameter loop.max_loop.
188
189	  The historic default is 8. If a late 2011 version of losetup(8)
190	  is used, it can be set to 0, since needed loop devices can be
191	  dynamically allocated with the /dev/loop-control interface.
192
193source "drivers/block/drbd/Kconfig"
194
195config BLK_DEV_NBD
196	tristate "Network block device support"
197	depends on NET
198	help
199	  Saying Y here will allow your computer to be a client for network
200	  block devices, i.e. it will be able to use block devices exported by
201	  servers (mount file systems on them etc.). Communication between
202	  client and server works over TCP/IP networking, but to the client
203	  program this is hidden: it looks like a regular local file access to
204	  a block device special file such as /dev/nd0.
205
206	  Network block devices also allows you to run a block-device in
207	  userland (making server and client physically the same computer,
208	  communicating using the loopback network device).
209
210	  Read <file:Documentation/admin-guide/blockdev/nbd.rst> for more information,
211	  especially about where to find the server code, which runs in user
212	  space and does not need special kernel support.
213
214	  Note that this has nothing to do with the network file systems NFS
215	  or Coda; you can say N here even if you intend to use NFS or Coda.
216
217	  To compile this driver as a module, choose M here: the
218	  module will be called nbd.
219
220	  If unsure, say N.
221
222config BLK_DEV_RAM
223	tristate "RAM block device support"
224	help
225	  Saying Y here will allow you to use a portion of your RAM memory as
226	  a block device, so that you can make file systems on it, read and
227	  write to it and do all the other things that you can do with normal
228	  block devices (such as hard drives). It is usually used to load and
229	  store a copy of a minimal root file system off of a floppy into RAM
230	  during the initial install of Linux.
231
232	  Note that the kernel command line option "ramdisk=XX" is now obsolete.
233	  For details, read <file:Documentation/admin-guide/blockdev/ramdisk.rst>.
234
235	  To compile this driver as a module, choose M here: the
236	  module will be called brd. An alias "rd" has been defined
237	  for historical reasons.
238
239	  Most normal users won't need the RAM disk functionality, and can
240	  thus say N here.
241
242config BLK_DEV_RAM_COUNT
243	int "Default number of RAM disks"
244	default "16"
245	depends on BLK_DEV_RAM
246	help
247	  The default value is 16 RAM disks. Change this if you know what you
248	  are doing. If you boot from a filesystem that needs to be extracted
249	  in memory, you will need at least one RAM disk (e.g. root on cramfs).
250
251config BLK_DEV_RAM_SIZE
252	int "Default RAM disk size (kbytes)"
253	depends on BLK_DEV_RAM
254	default "4096"
255	help
256	  The default value is 4096 kilobytes. Only change this if you know
257	  what you are doing.
258
259config CDROM_PKTCDVD
260	tristate "Packet writing on CD/DVD media (DEPRECATED)"
261	depends on !UML
262	depends on SCSI
263	select CDROM
264	help
265	  Note: This driver is deprecated and will be removed from the
266	  kernel in the near future!
267
268	  If you have a CDROM/DVD drive that supports packet writing, say
269	  Y to include support. It should work with any MMC/Mt Fuji
270	  compliant ATAPI or SCSI drive, which is just about any newer
271	  DVD/CD writer.
272
273	  Currently only writing to CD-RW, DVD-RW, DVD+RW and DVDRAM discs
274	  is possible.
275	  DVD-RW disks must be in restricted overwrite mode.
276
277	  See the file <file:Documentation/cdrom/packet-writing.rst>
278	  for further information on the use of this driver.
279
280	  To compile this driver as a module, choose M here: the
281	  module will be called pktcdvd.
282
283config CDROM_PKTCDVD_BUFFERS
284	int "Free buffers for data gathering"
285	depends on CDROM_PKTCDVD
286	default "8"
287	help
288	  This controls the maximum number of active concurrent packets. More
289	  concurrent packets can increase write performance, but also require
290	  more memory. Each concurrent packet will require approximately 64Kb
291	  of non-swappable kernel memory, memory which will be allocated when
292	  a disc is opened for writing.
293
294config CDROM_PKTCDVD_WCACHE
295	bool "Enable write caching"
296	depends on CDROM_PKTCDVD
297	help
298	  If enabled, write caching will be set for the CD-R/W device. For now
299	  this option is dangerous unless the CD-RW media is known good, as we
300	  don't do deferred write error handling yet.
301
302config ATA_OVER_ETH
303	tristate "ATA over Ethernet support"
304	depends on NET
305	help
306	This driver provides Support for ATA over Ethernet block
307	devices like the Coraid EtherDrive (R) Storage Blade.
308
309config SUNVDC
310	tristate "Sun Virtual Disk Client support"
311	depends on SUN_LDOMS
312	help
313	  Support for virtual disk devices as a client under Sun
314	  Logical Domains.
315
316source "drivers/s390/block/Kconfig"
317
318config XEN_BLKDEV_FRONTEND
319	tristate "Xen virtual block device support"
320	depends on XEN
321	default y
322	select XEN_XENBUS_FRONTEND
323	help
324	  This driver implements the front-end of the Xen virtual
325	  block device driver.  It communicates with a back-end driver
326	  in another domain which drives the actual block device.
327
328config XEN_BLKDEV_BACKEND
329	tristate "Xen block-device backend driver"
330	depends on XEN_BACKEND
331	help
332	  The block-device backend driver allows the kernel to export its
333	  block devices to other guests via a high-performance shared-memory
334	  interface.
335
336	  The corresponding Linux frontend driver is enabled by the
337	  CONFIG_XEN_BLKDEV_FRONTEND configuration option.
338
339	  The backend driver attaches itself to a any block device specified
340	  in the XenBus configuration. There are no limits to what the block
341	  device as long as it has a major and minor.
342
343	  If you are compiling a kernel to run in a Xen block backend driver
344	  domain (often this is domain 0) you should say Y here. To
345	  compile this driver as a module, chose M here: the module
346	  will be called xen-blkback.
347
348
349config VIRTIO_BLK
350	tristate "Virtio block driver"
351	depends on VIRTIO
352	select SG_POOL
353	help
354	  This is the virtual block driver for virtio.  It can be used with
355          QEMU based VMMs (like KVM or Xen).  Say Y or M.
356
357config BLK_DEV_RBD
358	tristate "Rados block device (RBD)"
359	depends on INET && BLOCK
360	select CEPH_LIB
361	select LIBCRC32C
362	select CRYPTO_AES
363	select CRYPTO
364	help
365	  Say Y here if you want include the Rados block device, which stripes
366	  a block device over objects stored in the Ceph distributed object
367	  store.
368
369	  More information at http://ceph.newdream.net/.
370
371	  If unsure, say N.
372
373config BLK_DEV_UBLK
374	tristate "Userspace block driver (Experimental)"
375	select IO_URING
376	help
377	  io_uring based userspace block driver. Together with ublk server, ublk
378	  has been working well, but interface with userspace or command data
379	  definition isn't finalized yet, and might change according to future
380	  requirement, so mark is as experimental now.
381
382	  Say Y if you want to get better performance because task_work_add()
383	  can be used in IO path for replacing io_uring cmd, which will become
384	  shared between IO tasks and ubq daemon, meantime task_work_add() can
385	  can handle batch more effectively, but task_work_add() isn't exported
386	  for module, so ublk has to be built to kernel.
387
388config BLKDEV_UBLK_LEGACY_OPCODES
389	bool "Support legacy command opcode"
390	depends on BLK_DEV_UBLK
391	default y
392	help
393	  ublk driver started to take plain command encoding, which turns out
394	  one bad way. The traditional ioctl command opcode encodes more
395	  info and basically defines each code uniquely, so opcode conflict
396	  is avoided, and driver can handle wrong command easily, meantime it
397	  may help security subsystem to audit io_uring command.
398
399	  Say Y if your application still uses legacy command opcode.
400
401	  Say N if you don't want to support legacy command opcode. It is
402	  suggested to enable N if your application(ublk server) switches to
403	  ioctl command encoding.
404
405source "drivers/block/rnbd/Kconfig"
406
407endif # BLK_DEV
408