Commit 481ed297 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'docs-5.7' of git://git.lwn.net/linux

Pull documentation updates from Jonathan Corbet:
 "This has been a busy cycle for documentation work.

  Highlights include:

   - Lots of RST conversion work by Mauro, Daniel ALmeida, and others.
     Maybe someday we'll get to the end of this stuff...maybe...

   - Some organizational work to bring some order to the core-api
     manual.

   - Various new docs and additions to the existing documentation.

   - Typo fixes, warning fixes, ..."

* tag 'docs-5.7' of git://git.lwn.net/linux: (123 commits)
  Documentation: x86: exception-tables: document CONFIG_BUILDTIME_TABLE_SORT
  MAINTAINERS: adjust to filesystem doc ReST conversion
  docs: deprecated.rst: Add BUG()-family
  doc: zh_CN: add translation for virtiofs
  doc: zh_CN: index files in filesystems subdirectory
  docs: locking: Drop :c:func: throughout
  docs: locking: Add 'need' to hardirq section
  docs: conf.py: avoid thousands of duplicate label warning on Sphinx
  docs: prevent warnings due to autosectionlabel
  docs: fix reference to core-api/namespaces.rst
  docs: fix pointers to io-mapping.rst and io_ordering.rst files
  Documentation: Better document the softlockup_panic sysctl
  docs: hw-vuln: tsx_async_abort.rst: get rid of an unused ref
  docs: perf: imx-ddr.rst: get rid of a warning
  docs: filesystems: fuse.rst: supress a Sphinx warning
  docs: translations: it: avoid duplicate refs at programming-language.rst
  docs: driver.rst: supress two ReSt warnings
  docs: trace: events.rst: convert some new stuff to ReST format
  Documentation: Add io_ordering.rst to driver-api manual
  Documentation: Add io-mapping.rst to driver-api manual
  ...
parents e59cd880 abcb1e02
What: /sys/kernel/uids/<uid>/cpu_shares What: /sys/kernel/uids/<uid>/cpu_shares
Date: December 2007 Date: December 2007, finally removed in kernel v2.6.34-rc1
Contact: Dhaval Giani <dhaval@linux.vnet.ibm.com> Contact: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com> Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Description: Description:
......
...@@ -13,7 +13,7 @@ endif ...@@ -13,7 +13,7 @@ endif
SPHINXBUILD = sphinx-build SPHINXBUILD = sphinx-build
SPHINXOPTS = SPHINXOPTS =
SPHINXDIRS = . SPHINXDIRS = .
_SPHINXDIRS = $(patsubst $(srctree)/Documentation/%/index.rst,%,$(wildcard $(srctree)/Documentation/*/index.rst)) _SPHINXDIRS = $(sort $(patsubst $(srctree)/Documentation/%/index.rst,%,$(wildcard $(srctree)/Documentation/*/index.rst)))
SPHINX_CONF = conf.py SPHINX_CONF = conf.py
PAPER = PAPER =
BUILDDIR = $(obj)/output BUILDDIR = $(obj)/output
......
...@@ -239,7 +239,7 @@ from the PCI device config space. Use the values in the pci_dev structure ...@@ -239,7 +239,7 @@ from the PCI device config space. Use the values in the pci_dev structure
as the PCI "bus address" might have been remapped to a "host physical" as the PCI "bus address" might have been remapped to a "host physical"
address by the arch/chip-set specific kernel support. address by the arch/chip-set specific kernel support.
See Documentation/io-mapping.txt for how to access device registers See Documentation/driver-api/io-mapping.rst for how to access device registers
or device memory. or device memory.
The device driver needs to call pci_request_region() to verify The device driver needs to call pci_request_region() to verify
......
.. _psi:
================================ ================================
PSI - Pressure Stall Information PSI - Pressure Stall Information
================================ ================================
......
Kernel Support for miscellaneous (your favourite) Binary Formats v1.1 Kernel Support for miscellaneous Binary Formats (binfmt_misc)
===================================================================== =============================================================
This Kernel feature allows you to invoke almost (for restrictions see below) This Kernel feature allows you to invoke almost (for restrictions see below)
every program by simply typing its name in the shell. every program by simply typing its name in the shell.
......
...@@ -251,8 +251,6 @@ line of text and contains the following stats separated by whitespace: ...@@ -251,8 +251,6 @@ line of text and contains the following stats separated by whitespace:
================ ============================================================= ================ =============================================================
orig_data_size uncompressed size of data stored in this disk. orig_data_size uncompressed size of data stored in this disk.
This excludes same-element-filled pages (same_pages) since
no memory is allocated for them.
Unit: bytes Unit: bytes
compr_data_size compressed size of data stored in this disk compr_data_size compressed size of data stored in this disk
mem_used_total the amount of memory allocated for this disk. This mem_used_total the amount of memory allocated for this disk. This
......
...@@ -23,7 +23,7 @@ of dot-connected-words, and key and value are connected by ``=``. The value ...@@ -23,7 +23,7 @@ of dot-connected-words, and key and value are connected by ``=``. The value
has to be terminated by semi-colon (``;``) or newline (``\n``). has to be terminated by semi-colon (``;``) or newline (``\n``).
For array value, array entries are separated by comma (``,``). :: For array value, array entries are separated by comma (``,``). ::
KEY[.WORD[...]] = VALUE[, VALUE2[...]][;] KEY[.WORD[...]] = VALUE[, VALUE2[...]][;]
Unlike the kernel command line syntax, spaces are OK around the comma and ``=``. Unlike the kernel command line syntax, spaces are OK around the comma and ``=``.
......
.. _cgroup-v1:
======================== ========================
Control Groups version 1 Control Groups version 1
======================== ========================
......
...@@ -9,7 +9,7 @@ This is the authoritative documentation on the design, interface and ...@@ -9,7 +9,7 @@ This is the authoritative documentation on the design, interface and
conventions of cgroup v2. It describes all userland-visible aspects conventions of cgroup v2. It describes all userland-visible aspects
of cgroup including core and specific controller behaviors. All of cgroup including core and specific controller behaviors. All
future changes must be reflected in this document. Documentation for future changes must be reflected in this document. Documentation for
v1 is available under Documentation/admin-guide/cgroup-v1/. v1 is available under :ref:`Documentation/admin-guide/cgroup-v1/index.rst <cgroup-v1>`.
.. CONTENTS .. CONTENTS
...@@ -1023,7 +1023,7 @@ All time durations are in microseconds. ...@@ -1023,7 +1023,7 @@ All time durations are in microseconds.
A read-only nested-key file which exists on non-root cgroups. A read-only nested-key file which exists on non-root cgroups.
Shows pressure stall information for CPU. See Shows pressure stall information for CPU. See
Documentation/accounting/psi.rst for details. :ref:`Documentation/accounting/psi.rst <psi>` for details.
cpu.uclamp.min cpu.uclamp.min
A read-write single value file which exists on non-root cgroups. A read-write single value file which exists on non-root cgroups.
...@@ -1313,53 +1313,41 @@ PAGE_SIZE multiple when read back. ...@@ -1313,53 +1313,41 @@ PAGE_SIZE multiple when read back.
Number of major page faults incurred Number of major page faults incurred
workingset_refault workingset_refault
Number of refaults of previously evicted pages Number of refaults of previously evicted pages
workingset_activate workingset_activate
Number of refaulted pages that were immediately activated Number of refaulted pages that were immediately activated
workingset_nodereclaim workingset_nodereclaim
Number of times a shadow node has been reclaimed Number of times a shadow node has been reclaimed
pgrefill pgrefill
Amount of scanned pages (in an active LRU list) Amount of scanned pages (in an active LRU list)
pgscan pgscan
Amount of scanned pages (in an inactive LRU list) Amount of scanned pages (in an inactive LRU list)
pgsteal pgsteal
Amount of reclaimed pages Amount of reclaimed pages
pgactivate pgactivate
Amount of pages moved to the active LRU list Amount of pages moved to the active LRU list
pgdeactivate pgdeactivate
Amount of pages moved to the inactive LRU list Amount of pages moved to the inactive LRU list
pglazyfree pglazyfree
Amount of pages postponed to be freed under memory pressure Amount of pages postponed to be freed under memory pressure
pglazyfreed pglazyfreed
Amount of reclaimed lazyfree pages Amount of reclaimed lazyfree pages
thp_fault_alloc thp_fault_alloc
Number of transparent hugepages which were allocated to satisfy Number of transparent hugepages which were allocated to satisfy
a page fault, including COW faults. This counter is not present a page fault, including COW faults. This counter is not present
when CONFIG_TRANSPARENT_HUGEPAGE is not set. when CONFIG_TRANSPARENT_HUGEPAGE is not set.
thp_collapse_alloc thp_collapse_alloc
Number of transparent hugepages which were allocated to allow Number of transparent hugepages which were allocated to allow
collapsing an existing range of pages. This counter is not collapsing an existing range of pages. This counter is not
present when CONFIG_TRANSPARENT_HUGEPAGE is not set. present when CONFIG_TRANSPARENT_HUGEPAGE is not set.
...@@ -1403,7 +1391,7 @@ PAGE_SIZE multiple when read back. ...@@ -1403,7 +1391,7 @@ PAGE_SIZE multiple when read back.
A read-only nested-key file which exists on non-root cgroups. A read-only nested-key file which exists on non-root cgroups.
Shows pressure stall information for memory. See Shows pressure stall information for memory. See
Documentation/accounting/psi.rst for details. :ref:`Documentation/accounting/psi.rst <psi>` for details.
Usage Guidelines Usage Guidelines
...@@ -1478,7 +1466,7 @@ IO Interface Files ...@@ -1478,7 +1466,7 @@ IO Interface Files
dios Number of discard IOs dios Number of discard IOs
====== ===================== ====== =====================
An example read output follows: An example read output follows::
8:16 rbytes=1459200 wbytes=314773504 rios=192 wios=353 dbytes=0 dios=0 8:16 rbytes=1459200 wbytes=314773504 rios=192 wios=353 dbytes=0 dios=0
8:0 rbytes=90430464 wbytes=299008000 rios=8950 wios=1252 dbytes=50331648 dios=3021 8:0 rbytes=90430464 wbytes=299008000 rios=8950 wios=1252 dbytes=50331648 dios=3021
...@@ -1643,7 +1631,7 @@ IO Interface Files ...@@ -1643,7 +1631,7 @@ IO Interface Files
A read-only nested-key file which exists on non-root cgroups. A read-only nested-key file which exists on non-root cgroups.
Shows pressure stall information for IO. See Shows pressure stall information for IO. See
Documentation/accounting/psi.rst for details. :ref:`Documentation/accounting/psi.rst <psi>` for details.
Writeback Writeback
...@@ -1853,7 +1841,7 @@ Cpuset Interface Files ...@@ -1853,7 +1841,7 @@ Cpuset Interface Files
from the requested CPUs. from the requested CPUs.
The CPU numbers are comma-separated numbers or ranges. The CPU numbers are comma-separated numbers or ranges.
For example: For example::
# cat cpuset.cpus # cat cpuset.cpus
0-4,6,8-10 0-4,6,8-10
...@@ -1892,7 +1880,7 @@ Cpuset Interface Files ...@@ -1892,7 +1880,7 @@ Cpuset Interface Files
from the requested memory nodes. from the requested memory nodes.
The memory node numbers are comma-separated numbers or ranges. The memory node numbers are comma-separated numbers or ranges.
For example: For example::
# cat cpuset.mems # cat cpuset.mems
0-1,3 0-1,3
......
...@@ -11,11 +11,13 @@ Today, with the advent of Kernel Mode Setting, a graphics board is ...@@ -11,11 +11,13 @@ Today, with the advent of Kernel Mode Setting, a graphics board is
either correctly working because all components follow the standards - either correctly working because all components follow the standards -
or the computer is unusable, because the screen remains dark after or the computer is unusable, because the screen remains dark after
booting or it displays the wrong area. Cases when this happens are: booting or it displays the wrong area. Cases when this happens are:
- The graphics board does not recognize the monitor. - The graphics board does not recognize the monitor.
- The graphics board is unable to detect any EDID data. - The graphics board is unable to detect any EDID data.
- The graphics board incorrectly forwards EDID data to the driver. - The graphics board incorrectly forwards EDID data to the driver.
- The monitor sends no or bogus EDID data. - The monitor sends no or bogus EDID data.
- A KVM sends its own EDID data instead of querying the connected monitor. - A KVM sends its own EDID data instead of querying the connected monitor.
Adding the kernel parameter "nomodeset" helps in most cases, but causes Adding the kernel parameter "nomodeset" helps in most cases, but causes
restrictions later on. restrictions later on.
...@@ -32,7 +34,7 @@ individual data for a specific misbehaving monitor, commented sources ...@@ -32,7 +34,7 @@ individual data for a specific misbehaving monitor, commented sources
and a Makefile environment are given here. and a Makefile environment are given here.
To create binary EDID and C source code files from the existing data To create binary EDID and C source code files from the existing data
material, simply type "make". material, simply type "make" in tools/edid/.
If you want to create your own EDID file, copy the file 1024x768.S, If you want to create your own EDID file, copy the file 1024x768.S,
replace the settings with your own data and add a new target to the replace the settings with your own data and add a new target to the
......
...@@ -136,8 +136,6 @@ enables the mitigation by default. ...@@ -136,8 +136,6 @@ enables the mitigation by default.
The mitigation can be controlled at boot time via a kernel command line option. The mitigation can be controlled at boot time via a kernel command line option.
See :ref:`taa_mitigation_control_command_line`. See :ref:`taa_mitigation_control_command_line`.
.. _virt_mechanism:
Virtualization mitigation Virtualization mitigation
^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^
......
...@@ -75,6 +75,7 @@ configure specific aspects of kernel behavior to your liking. ...@@ -75,6 +75,7 @@ configure specific aspects of kernel behavior to your liking.
cputopology cputopology
dell_rbu dell_rbu
device-mapper/index device-mapper/index
edid
efi-stub efi-stub
ext4 ext4
nfs/index nfs/index
......
...@@ -1099,6 +1099,12 @@ ...@@ -1099,6 +1099,12 @@
A valid base address must be provided, and the serial A valid base address must be provided, and the serial
port must already be setup and configured. port must already be setup and configured.
ec_imx21,<addr>
ec_imx6q,<addr>
Start an early, polled-mode, output-only console on the
Freescale i.MX UART at the specified address. The UART
must already be setup and configured.
ar3700_uart,<addr> ar3700_uart,<addr>
Start an early, polled-mode console on the Start an early, polled-mode console on the
Armada 3700 serial port at the specified Armada 3700 serial port at the specified
...@@ -1779,7 +1785,7 @@ ...@@ -1779,7 +1785,7 @@
provided by tboot because it makes the system provided by tboot because it makes the system
vulnerable to DMA attacks. vulnerable to DMA attacks.
nobounce [Default off] nobounce [Default off]
Disable bounce buffer for unstrusted devices such as Disable bounce buffer for untrusted devices such as
the Thunderbolt devices. This will treat the untrusted the Thunderbolt devices. This will treat the untrusted
devices as the trusted ones, hence might expose security devices as the trusted ones, hence might expose security
risks of DMA attacks. risks of DMA attacks.
...@@ -1883,7 +1889,7 @@ ...@@ -1883,7 +1889,7 @@
No delay No delay
ip= [IP_PNP] ip= [IP_PNP]
See Documentation/filesystems/nfs/nfsroot.txt. See Documentation/admin-guide/nfs/nfsroot.rst.
ipcmni_extend [KNL] Extend the maximum number of unique System V ipcmni_extend [KNL] Extend the maximum number of unique System V
IPC identifiers from 32,768 to 16,777,216. IPC identifiers from 32,768 to 16,777,216.
...@@ -2795,7 +2801,7 @@ ...@@ -2795,7 +2801,7 @@
<name>,<region-number>[,<base>,<size>,<buswidth>,<altbuswidth>] <name>,<region-number>[,<base>,<size>,<buswidth>,<altbuswidth>]
mtdparts= [MTD] mtdparts= [MTD]
See drivers/mtd/cmdlinepart.c. See drivers/mtd/parsers/cmdlinepart.c
multitce=off [PPC] This parameter disables the use of the pSeries multitce=off [PPC] This parameter disables the use of the pSeries
firmware feature for updating multiple TCE entries firmware feature for updating multiple TCE entries
...@@ -2853,13 +2859,13 @@ ...@@ -2853,13 +2859,13 @@
Default value is 0. Default value is 0.
nfsaddrs= [NFS] Deprecated. Use ip= instead. nfsaddrs= [NFS] Deprecated. Use ip= instead.
See Documentation/filesystems/nfs/nfsroot.txt. See Documentation/admin-guide/nfs/nfsroot.rst.
nfsroot= [NFS] nfs root filesystem for disk-less boxes. nfsroot= [NFS] nfs root filesystem for disk-less boxes.
See Documentation/filesystems/nfs/nfsroot.txt. See Documentation/admin-guide/nfs/nfsroot.rst.
nfsrootdebug [NFS] enable nfsroot debugging messages. nfsrootdebug [NFS] enable nfsroot debugging messages.
See Documentation/filesystems/nfs/nfsroot.txt. See Documentation/admin-guide/nfs/nfsroot.rst.
nfs.callback_nr_threads= nfs.callback_nr_threads=
[NFSv4] set the total number of threads that the [NFSv4] set the total number of threads that the
...@@ -4514,10 +4520,10 @@ ...@@ -4514,10 +4520,10 @@
Format: <integer> Format: <integer>
A nonzero value instructs the soft-lockup detector A nonzero value instructs the soft-lockup detector
to panic the machine when a soft-lockup occurs. This to panic the machine when a soft-lockup occurs. It is
is also controlled by CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC also controlled by the kernel.softlockup_panic sysctl
which is the respective build-time switch to that and CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC, which is the
functionality. respective build-time switch to that functionality.
softlockup_all_cpu_backtrace= softlockup_all_cpu_backtrace=
[KNL] Should the soft-lockup detector generate [KNL] Should the soft-lockup detector generate
......
...@@ -234,7 +234,7 @@ To reduce its OS jitter, do any of the following: ...@@ -234,7 +234,7 @@ To reduce its OS jitter, do any of the following:
Such a workqueue can be confined to a given subset of the Such a workqueue can be confined to a given subset of the
CPUs using the ``/sys/devices/virtual/workqueue/*/cpumask`` sysfs CPUs using the ``/sys/devices/virtual/workqueue/*/cpumask`` sysfs
files. The set of WQ_SYSFS workqueues can be displayed using files. The set of WQ_SYSFS workqueues can be displayed using
"ls sys/devices/virtual/workqueue". That said, the workqueues "ls /sys/devices/virtual/workqueue". That said, the workqueues
maintainer would like to caution people against indiscriminately maintainer would like to caution people against indiscriminately
sprinkling WQ_SYSFS across all the workqueues. The reason for sprinkling WQ_SYSFS across all the workqueues. The reason for
caution is that it is easy to add WQ_SYSFS, but because sysfs is caution is that it is easy to add WQ_SYSFS, but because sysfs is
......
...@@ -43,7 +43,8 @@ value 1 for supported. ...@@ -43,7 +43,8 @@ value 1 for supported.
AXI_ID and AXI_MASKING are mapped on DPCR1 register in performance counter. AXI_ID and AXI_MASKING are mapped on DPCR1 register in performance counter.
When non-masked bits are matching corresponding AXI_ID bits then counter is When non-masked bits are matching corresponding AXI_ID bits then counter is
incremented. Perf counter is incremented if incremented. Perf counter is incremented if::
AxID && AXI_MASKING == AXI_ID && AXI_MASKING AxID && AXI_MASKING == AXI_ID && AXI_MASKING
This filter doesn't support filter different AXI ID for axid-read and axid-write This filter doesn't support filter different AXI ID for axid-read and axid-write
......
This diff is collapsed.
...@@ -4,18 +4,18 @@ ARM TCM (Tightly-Coupled Memory) handling in Linux ...@@ -4,18 +4,18 @@ ARM TCM (Tightly-Coupled Memory) handling in Linux
Written by Linus Walleij <linus.walleij@stericsson.com> Written by Linus Walleij <linus.walleij@stericsson.com>
Some ARM SoC:s have a so-called TCM (Tightly-Coupled Memory). Some ARM SoCs have a so-called TCM (Tightly-Coupled Memory).
This is usually just a few (4-64) KiB of RAM inside the ARM This is usually just a few (4-64) KiB of RAM inside the ARM
processor. processor.
Due to being embedded inside the CPU The TCM has a Due to being embedded inside the CPU, the TCM has a
Harvard-architecture, so there is an ITCM (instruction TCM) Harvard-architecture, so there is an ITCM (instruction TCM)
and a DTCM (data TCM). The DTCM can not contain any and a DTCM (data TCM). The DTCM can not contain any
instructions, but the ITCM can actually contain data. instructions, but the ITCM can actually contain data.
The size of DTCM or ITCM is minimum 4KiB so the typical The size of DTCM or ITCM is minimum 4KiB so the typical
minimum configuration is 4KiB ITCM and 4KiB DTCM. minimum configuration is 4KiB ITCM and 4KiB DTCM.
ARM CPU:s have special registers to read out status, physical ARM CPUs have special registers to read out status, physical
location and size of TCM memories. arch/arm/include/asm/cputype.h location and size of TCM memories. arch/arm/include/asm/cputype.h
defines a CPUID_TCM register that you can read out from the defines a CPUID_TCM register that you can read out from the
system control coprocessor. Documentation from ARM can be found system control coprocessor. Documentation from ARM can be found
......
...@@ -38,7 +38,11 @@ needs_sphinx = '1.3' ...@@ -38,7 +38,11 @@ needs_sphinx = '1.3'
# ones. # ones.
extensions = ['kerneldoc', 'rstFlatTable', 'kernel_include', 'cdomain', extensions = ['kerneldoc', 'rstFlatTable', 'kernel_include', 'cdomain',
'kfigure', 'sphinx.ext.ifconfig', 'automarkup', 'kfigure', 'sphinx.ext.ifconfig', 'automarkup',
'maintainers_include'] 'maintainers_include', 'sphinx.ext.autosectionlabel' ]
# Ensure that autosectionlabel will produce unique names
autosectionlabel_prefix_document = True
autosectionlabel_maxdepth = 2
# The name of the math extension changed on Sphinx 1.4 # The name of the math extension changed on Sphinx 1.4
if (major == 1 and minor > 3) or (major > 1): if (major == 1 and minor > 3) or (major > 1):
......
...@@ -8,41 +8,81 @@ This is the beginning of a manual for core kernel APIs. The conversion ...@@ -8,41 +8,81 @@ This is the beginning of a manual for core kernel APIs. The conversion
Core utilities Core utilities
============== ==============
This section has general and "core core" documentation. The first is a
massive grab-bag of kerneldoc info left over from the docbook days; it
should really be broken up someday when somebody finds the energy to do
it.
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
kernel-api kernel-api
workqueue
printk-formats
symbol-namespaces
Data structures and low-level utilities
=======================================
Library functionality that is used throughout the kernel.
.. toctree::
:maxdepth: 1
kobject
assoc_array assoc_array
xarray
idr
circular-buffers
generic-radix-tree
packing
timekeeping
errseq
Concurrency primitives
======================
How Linux keeps everything from happening at the same time. See
:doc:`/locking/index` for more related documentation.
.. toctree::
:maxdepth: 1
atomic_ops atomic_ops
cachetlb
refcount-vs-atomic refcount-vs-atomic
cpu_hotplug
idr
local_ops local_ops
workqueue padata
../RCU/index
Low-level hardware management
=============================
Cache management, managing CPU hotplug, etc.
.. toctree::
:maxdepth: 1
cachetlb
cpu_hotplug
memory-hotplug
genericirq genericirq
xarray protection-keys
librs
genalloc Memory management
errseq =================
packing
printk-formats How to allocate and use memory in the kernel. Note that there is a lot
circular-buffers more memory-management documentation in :doc:`/vm/index`.
generic-radix-tree
.. toctree::
:maxdepth: 1
memory-allocation memory-allocation
mm-api mm-api
genalloc
pin_user_pages pin_user_pages
gfp_mask-from-fs-io
timekeeping
boot-time-mm boot-time-mm
memory-hotplug gfp_mask-from-fs-io
protection-keys
../RCU/index
gcc-plugins
symbol-namespaces
padata
ioctl
Interfaces for kernel debugging Interfaces for kernel debugging
=============================== ===============================
...@@ -53,6 +93,16 @@ Interfaces for kernel debugging ...@@ -53,6 +93,16 @@ Interfaces for kernel debugging
debug-objects debug-objects
tracepoint tracepoint
Everything else
===============
Documents that don't fit elsewhere or which have yet to be categorized.
.. toctree::
:maxdepth: 1
librs
.. only:: subproject and html .. only:: subproject and html
Indices Indices
......
...@@ -25,7 +25,7 @@ some terms we will be working with. ...@@ -25,7 +25,7 @@ some terms we will be working with.
usually embedded within some other structure which contains the stuff usually embedded within some other structure which contains the stuff
the code is really interested in. the code is really interested in.
No structure should EVER have more than one kobject embedded within it. No structure should **EVER** have more than one kobject embedded within it.
If it does, the reference counting for the object is sure to be messed If it does, the reference counting for the object is sure to be messed
up and incorrect, and your code will be buggy. So do not do this. up and incorrect, and your code will be buggy. So do not do this.
...@@ -55,7 +55,7 @@ a larger, domain-specific object. To this end, kobjects will be found ...@@ -55,7 +55,7 @@ a larger, domain-specific object. To this end, kobjects will be found
embedded in other structures. If you are used to thinking of things in embedded in other structures. If you are used to thinking of things in
object-oriented terms, kobjects can be seen as a top-level, abstract class object-oriented terms, kobjects can be seen as a top-level, abstract class
from which other classes are derived. A kobject implements a set of from which other classes are derived. A kobject implements a set of
capabilities which are not particularly useful by themselves, but which are capabilities which are not particularly useful by themselves, but are
nice to have in other objects. The C language does not allow for the nice to have in other objects. The C language does not allow for the
direct expression of inheritance, so other techniques - such as structure direct expression of inheritance, so other techniques - such as structure
embedding - must be used. embedding - must be used.
...@@ -65,7 +65,7 @@ this is analogous as to how "list_head" structs are rarely useful on ...@@ -65,7 +65,7 @@ this is analogous as to how "list_head" structs are rarely useful on
their own, but are invariably found embedded in the larger objects of their own, but are invariably found embedded in the larger objects of
interest.) interest.)
So, for example, the UIO code in drivers/uio/uio.c has a structure that So, for example, the UIO code in ``drivers/uio/uio.c`` has a structure that
defines the memory region associated with a uio device:: defines the memory region associated with a uio device::
struct uio_map { struct uio_map {
...@@ -78,26 +78,26 @@ just a matter of using the kobj member. Code that works with kobjects will ...@@ -78,26 +78,26 @@ just a matter of using the kobj member. Code that works with kobjects will
often have the opposite problem, however: given a struct kobject pointer, often have the opposite problem, however: given a struct kobject pointer,
what is the pointer to the containing structure? You must avoid tricks what is the pointer to the containing structure? You must avoid tricks
(such as assuming that the kobject is at the beginning of the structure) (such as assuming that the kobject is at the beginning of the structure)
and, instead, use the container_of() macro, found in <linux/kernel.h>:: and, instead, use the container_of() macro, found in ``<linux/kernel.h>``::
container_of(pointer, type, member) container_of(pointer, type, member)
where: where:
* "pointer" is the pointer to the embedded kobject, * ``pointer`` is the pointer to the embedded kobject,
* "type" is the type of the containing structure, and * ``type`` is the type of the containing structure, and
* "member" is the name of the structure field to which "pointer" points. * ``member`` is the name of the structure field to which ``pointer`` points.
The return value from container_of() is a pointer to the corresponding The return value from container_of() is a pointer to the corresponding
container type. So, for example, a pointer "kp" to a struct kobject container type. So, for example, a pointer ``kp`` to a struct kobject
embedded *within* a struct uio_map could be converted to a pointer to the embedded **within** a struct uio_map could be converted to a pointer to the
*containing* uio_map structure with:: **containing** uio_map structure with::
struct uio_map *u_map = container_of(kp, struct uio_map, kobj); struct uio_map *u_map = container_of(kp, struct uio_map, kobj);
For convenience, programmers often define a simple macro for "back-casting" For convenience, programmers often define a simple macro for **back-casting**
kobject pointers to the containing type. Exactly this happens in the kobject pointers to the containing type. Exactly this happens in the
earlier drivers/uio/uio.c, as you can see here:: earlier ``drivers/uio/uio.c``, as you can see here::
struct uio_map { struct uio_map {
struct kobject kobj; struct kobject kobj;
...@@ -172,13 +172,13 @@ call to kobject_uevent():: ...@@ -172,13 +172,13 @@ call to kobject_uevent()::
int kobject_uevent(struct kobject *kobj, enum kobject_action action); int kobject_uevent(struct kobject *kobj, enum kobject_action action);
Use the KOBJ_ADD action for when the kobject is first added to the kernel. Use the **KOBJ_ADD** action for when the kobject is first added to the kernel.
This should be done only after any attributes or children of the kobject This should be done only after any attributes or children of the kobject
have been initialized properly, as userspace will instantly start to look have been initialized properly, as userspace will instantly start to look
for them when this call happens. for them when this call happens.
When the kobject is removed from the kernel (details on how to do that are When the kobject is removed from the kernel (details on how to do that are
below), the uevent for KOBJ_REMOVE will be automatically created by the below), the uevent for **KOBJ_REMOVE** will be automatically created by the
kobject core, so the caller does not have to worry about doing that by kobject core, so the caller does not have to worry about doing that by
hand. hand.
...@@ -238,7 +238,7 @@ Both types of attributes used here, with a kobject that has been created ...@@ -238,7 +238,7 @@ Both types of attributes used here, with a kobject that has been created
with the kobject_create_and_add(), can be of type kobj_attribute, so no with the kobject_create_and_add(), can be of type kobj_attribute, so no
special custom attribute is needed to be created. special custom attribute is needed to be created.
See the example module, samples/kobject/kobject-example.c for an See the example module, ``samples/kobject/kobject-example.c`` for an
implementation of a simple kobject and attributes. implementation of a simple kobject and attributes.
...@@ -365,7 +365,7 @@ Because other references to the kset may still exist, the release may happen ...@@ -365,7 +365,7 @@ Because other references to the kset may still exist, the release may happen
after kset_unregister() returns. after kset_unregister() returns.
An example of using a kset can be seen in the An example of using a kset can be seen in the
samples/kobject/kset-example.c file in the kernel tree. ``samples/kobject/kset-example.c`` file in the kernel tree.
If a kset wishes to control the uevent operations of the kobjects If a kset wishes to control the uevent operations of the kobjects
associated with it, it can use the struct kset_uevent_ops to handle it:: associated with it, it can use the struct kset_uevent_ops to handle it::
...@@ -408,8 +408,8 @@ Kobject removal ...@@ -408,8 +408,8 @@ Kobject removal
After a kobject has been registered with the kobject core successfully, it After a kobject has been registered with the kobject core successfully, it
must be cleaned up when the code is finished with it. To do that, call must be cleaned up when the code is finished with it. To do that, call
kobject_put(). By doing this, the kobject core will automatically clean up kobject_put(). By doing this, the kobject core will automatically clean up
all of the memory allocated by this kobject. If a KOBJ_ADD uevent has been all of the memory allocated by this kobject. If a ``KOBJ_ADD`` uevent has been
sent for the object, a corresponding KOBJ_REMOVE uevent will be sent, and sent for the object, a corresponding ``KOBJ_REMOVE`` uevent will be sent, and
any other sysfs housekeeping will be handled for the caller properly. any other sysfs housekeeping will be handled for the caller properly.
If you need to do a two-stage delete of the kobject (say you are not If you need to do a two-stage delete of the kobject (say you are not
...@@ -430,5 +430,5 @@ Example code to copy from ...@@ -430,5 +430,5 @@ Example code to copy from
========================= =========================
For a more complete example of using ksets and kobjects properly, see the For a more complete example of using ksets and kobjects properly, see the
example programs samples/kobject/{kobject-example.c,kset-example.c}, example programs ``samples/kobject/{kobject-example.c,kset-example.c}``,
which will be built as loadable modules if you select CONFIG_SAMPLE_KOBJECT. which will be built as loadable modules if you select ``CONFIG_SAMPLE_KOBJECT``.
Debugging Modules after 2.6.3
-----------------------------
In almost all distributions, the kernel asks for modules which don't
exist, such as "net-pf-10" or whatever. Changing "modprobe -q" to
"succeed" in this case is hacky and breaks some setups, and also we
want to know if it failed for the fallback code for old aliases in
fs/char_dev.c, for example.
In the past a debugging message which would fill people's logs was
emitted. This debugging message has been removed. The correct way
of debugging module problems is something like this:
echo '#! /bin/sh' > /tmp/modprobe
echo 'echo "$@" >> /tmp/modprobe.log' >> /tmp/modprobe
echo 'exec /sbin/modprobe "$@"' >> /tmp/modprobe
chmod a+x /tmp/modprobe
echo /tmp/modprobe > /proc/sys/kernel/modprobe
Note that the above applies only when the *kernel* is requesting
that the module be loaded -- it won't have any effect if that module
is being loaded explicitly using "modprobe" from userspace.
...@@ -203,7 +203,7 @@ Cause ...@@ -203,7 +203,7 @@ Cause
may not correctly copy files from sysfs. may not correctly copy files from sysfs.
Solution Solution
Use ``cat``' to read ``.gcda`` files and ``cp -d`` to copy links. Use ``cat`` to read ``.gcda`` files and ``cp -d`` to copy links.
Alternatively use the mechanism shown in Appendix B. Alternatively use the mechanism shown in Appendix B.
......
...@@ -8,7 +8,8 @@ with the difference that the orphan objects are not freed but only ...@@ -8,7 +8,8 @@ with the difference that the orphan objects are not freed but only
reported via /sys/kernel/debug/kmemleak. A similar method is used by the reported via /sys/kernel/debug/kmemleak. A similar method is used by the
Valgrind tool (``memcheck --leak-check``) to detect the memory leaks in Valgrind tool (``memcheck --leak-check``) to detect the memory leaks in
user-space applications. user-space applications.
Kmemleak is supported on x86, arm, powerpc, sparc, sh, microblaze, ppc, mips, s390 and tile. Kmemleak is supported on x86, arm, arm64, powerpc, sparc, sh, microblaze, mips,
s390, nds32, arc and xtensa.
Usage Usage
----- -----
......
...@@ -272,8 +272,8 @@ STA information lifetime rules ...@@ -272,8 +272,8 @@ STA information lifetime rules
.. kernel-doc:: net/mac80211/sta_info.c .. kernel-doc:: net/mac80211/sta_info.c
:doc: STA information lifetime rules :doc: STA information lifetime rules
Aggregation Aggregation Functions
=========== =====================
.. kernel-doc:: net/mac80211/sta_info.h .. kernel-doc:: net/mac80211/sta_info.h
:functions: sta_ampdu_mlme :functions: sta_ampdu_mlme
...@@ -284,8 +284,8 @@ Aggregation ...@@ -284,8 +284,8 @@ Aggregation
.. kernel-doc:: net/mac80211/sta_info.h .. kernel-doc:: net/mac80211/sta_info.h
:functions: tid_ampdu_rx :functions: tid_ampdu_rx
Synchronisation Synchronisation Functions
=============== =========================
TBD TBD
......
...@@ -5,8 +5,8 @@ DMAEngine documentation ...@@ -5,8 +5,8 @@ DMAEngine documentation
DMAEngine documentation provides documents for various aspects of DMAEngine DMAEngine documentation provides documents for various aspects of DMAEngine
framework. framework.
DMAEngine documentation DMAEngine development documentation
----------------------- -----------------------------------
This book helps with DMAengine internal APIs and guide for DMAEngine device This book helps with DMAengine internal APIs and guide for DMAEngine device
driver writers. driver writers.
......
...@@ -210,7 +210,7 @@ probed. ...@@ -210,7 +210,7 @@ probed.
While the typical use case for sync_state() is to have the kernel cleanly take While the typical use case for sync_state() is to have the kernel cleanly take
over management of devices from the bootloader, the usage of sync_state() is over management of devices from the bootloader, the usage of sync_state() is
not restricted to that. Use it whenever it makes sense to take an action after not restricted to that. Use it whenever it makes sense to take an action after
all the consumers of a device have probed. all the consumers of a device have probed::
int (*remove) (struct device *dev); int (*remove) (struct device *dev);
......
...@@ -17,6 +17,7 @@ available subsections can be seen below. ...@@ -17,6 +17,7 @@ available subsections can be seen below.
driver-model/index driver-model/index
basics basics
infrastructure infrastructure
ioctl
early-userspace/index early-userspace/index
pm/index pm/index
clk clk
...@@ -74,11 +75,12 @@ available subsections can be seen below. ...@@ -74,11 +75,12 @@ available subsections can be seen below.
connector connector
console console
dcdbas dcdbas
edid
eisa eisa
ipmb ipmb
isa isa
isapnp isapnp
io-mapping
io_ordering
generic-counter generic-counter
lightnvm-pblk lightnvm-pblk
memory-devices/index memory-devices/index
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
| openrisc: | TODO | | openrisc: | TODO |
| parisc: | TODO | | parisc: | TODO |
| powerpc: | ok | | powerpc: | ok |
| riscv: | TODO | | riscv: | ok |
| s390: | ok | | s390: | ok |
| sh: | ok | | sh: | ok |
| sparc: | ok | | sparc: | ok |
......
v9fs: Plan 9 Resource Sharing for Linux .. SPDX-License-Identifier: GPL-2.0
=======================================
ABOUT =======================================
v9fs: Plan 9 Resource Sharing for Linux
=======================================
About
===== =====
v9fs is a Unix implementation of the Plan 9 9p remote filesystem protocol. v9fs is a Unix implementation of the Plan 9 9p remote filesystem protocol.
...@@ -14,9 +17,11 @@ and Maya Gokhale. Additional development by Greg Watson ...@@ -14,9 +17,11 @@ and Maya Gokhale. Additional development by Greg Watson
The best detailed explanation of the Linux implementation and applications of The best detailed explanation of the Linux implementation and applications of
the 9p client is available in the form of a USENIX paper: the 9p client is available in the form of a USENIX paper:
http://www.usenix.org/events/usenix05/tech/freenix/hensbergen.html http://www.usenix.org/events/usenix05/tech/freenix/hensbergen.html
Other applications are described in the following papers: Other applications are described in the following papers:
* XCPU & Clustering * XCPU & Clustering
http://xcpu.org/papers/xcpu-talk.pdf http://xcpu.org/papers/xcpu-talk.pdf
* KVMFS: control file system for KVM * KVMFS: control file system for KVM
...@@ -28,18 +33,18 @@ Other applications are described in the following papers: ...@@ -28,18 +33,18 @@ Other applications are described in the following papers:
* VirtFS: A Virtualization Aware File System pass-through * VirtFS: A Virtualization Aware File System pass-through
http://goo.gl/3WPDg http://goo.gl/3WPDg
USAGE Usage
===== =====
For remote file server: For remote file server::
mount -t 9p 10.10.1.2 /mnt/9 mount -t 9p 10.10.1.2 /mnt/9
For Plan 9 From User Space applications (http://swtch.com/plan9) For Plan 9 From User Space applications (http://swtch.com/plan9)::
mount -t 9p `namespace`/acme /mnt/9 -o trans=unix,uname=$USER mount -t 9p `namespace`/acme /mnt/9 -o trans=unix,uname=$USER
For server running on QEMU host with virtio transport: For server running on QEMU host with virtio transport::
mount -t 9p -o trans=virtio <mount_tag> /mnt/9 mount -t 9p -o trans=virtio <mount_tag> /mnt/9
...@@ -48,18 +53,22 @@ mount points. Each 9P export is seen by the client as a virtio device with an ...@@ -48,18 +53,22 @@ mount points. Each 9P export is seen by the client as a virtio device with an
associated "mount_tag" property. Available mount tags can be associated "mount_tag" property. Available mount tags can be
seen by reading /sys/bus/virtio/drivers/9pnet_virtio/virtio<n>/mount_tag files. seen by reading /sys/bus/virtio/drivers/9pnet_virtio/virtio<n>/mount_tag files.
OPTIONS Options
======= =======
============= ===============================================================
trans=name select an alternative transport. Valid options are trans=name select an alternative transport. Valid options are
currently: currently:
unix - specifying a named pipe mount point
tcp - specifying a normal TCP/IP connection ======== ============================================
fd - used passed file descriptors for connection unix specifying a named pipe mount point
tcp specifying a normal TCP/IP connection
fd used passed file descriptors for connection
(see rfdno and wfdno) (see rfdno and wfdno)
virtio - connect to the next virtio channel available virtio connect to the next virtio channel available
(from QEMU with trans_virtio module) (from QEMU with trans_virtio module)
rdma - connect to a specified RDMA channel rdma connect to a specified RDMA channel
======== ============================================
uname=name user name to attempt mount as on the remote server. The uname=name user name to attempt mount as on the remote server. The
server may override or ignore this value. Certain user server may override or ignore this value. Certain user
...@@ -69,28 +78,36 @@ OPTIONS ...@@ -69,28 +78,36 @@ OPTIONS
offering several exported file systems. offering several exported file systems.
cache=mode specifies a caching policy. By default, no caches are used. cache=mode specifies a caching policy. By default, no caches are used.
none = default no cache policy, metadata and data
none
default no cache policy, metadata and data
alike are synchronous. alike are synchronous.
loose = no attempts are made at consistency, loose
no attempts are made at consistency,
intended for exclusive, read-only mounts intended for exclusive, read-only mounts
fscache = use FS-Cache for a persistent, read-only fscache
use FS-Cache for a persistent, read-only
cache backend. cache backend.
mmap = minimal cache that is only used for read-write mmap
minimal cache that is only used for read-write
mmap. Northing else is cached, like cache=none mmap. Northing else is cached, like cache=none
debug=n specifies debug level. The debug level is a bitmask. debug=n specifies debug level. The debug level is a bitmask.
0x01 = display verbose error messages
0x02 = developer debug (DEBUG_CURRENT) ===== ================================
0x04 = display 9p trace 0x01 display verbose error messages
0x08 = display VFS trace 0x02 developer debug (DEBUG_CURRENT)
0x10 = display Marshalling debug 0x04 display 9p trace
0x20 = display RPC debug 0x08 display VFS trace
0x40 = display transport debug 0x10 display Marshalling debug
0x80 = display allocation debug 0x20 display RPC debug
0x100 = display protocol message debug 0x40 display transport debug
0x200 = display Fid debug 0x80 display allocation debug
0x400 = display packet debug 0x100 display protocol message debug
0x800 = display fscache tracing debug 0x200 display Fid debug
0x400 display packet debug
0x800 display fscache tracing debug
===== ================================
rfdno=n the file descriptor for reading with trans=fd rfdno=n the file descriptor for reading with trans=fd
...@@ -103,9 +120,12 @@ OPTIONS ...@@ -103,9 +120,12 @@ OPTIONS
noextend force legacy mode (no 9p2000.u or 9p2000.L semantics) noextend force legacy mode (no 9p2000.u or 9p2000.L semantics)
version=name Select 9P protocol version. Valid options are: version=name Select 9P protocol version. Valid options are:
9p2000 - Legacy mode (same as noextend)
9p2000.u - Use 9P2000.u protocol ======== ==============================
9p2000.L - Use 9P2000.L protocol 9p2000 Legacy mode (same as noextend)
9p2000.u Use 9P2000.u protocol
9p2000.L Use 9P2000.L protocol
======== ==============================
dfltuid attempt to mount as a particular uid dfltuid attempt to mount as a particular uid
...@@ -118,22 +138,27 @@ OPTIONS ...@@ -118,22 +138,27 @@ OPTIONS
hosts. This functionality will be expanded in later versions. hosts. This functionality will be expanded in later versions.
access there are four access modes. access there are four access modes.
user = if a user tries to access a file on v9fs user
if a user tries to access a file on v9fs
filesystem for the first time, v9fs sends an filesystem for the first time, v9fs sends an
attach command (Tattach) for that user. attach command (Tattach) for that user.
This is the default mode. This is the default mode.
<uid> = allows only user with uid=<uid> to access <uid>
allows only user with uid=<uid> to access
the files on the mounted filesystem the files on the mounted filesystem
any = v9fs does single attach and performs all any
v9fs does single attach and performs all
operations as one user operations as one user
client = ACL based access check on the 9p client clien
ACL based access check on the 9p client
side for access validation side for access validation
cachetag cache tag to use the specified persistent cache. cachetag cache tag to use the specified persistent cache.
cache tags for existing cache sessions can be listed at cache tags for existing cache sessions can be listed at
/sys/fs/9p/caches. (applies only to cache=fscache) /sys/fs/9p/caches. (applies only to cache=fscache)
============= ===============================================================
RESOURCES Resources
========= =========
Protocol specifications are maintained on github: Protocol specifications are maintained on github:
...@@ -158,4 +183,3 @@ http://plan9.bell-labs.com/plan9 ...@@ -158,4 +183,3 @@ http://plan9.bell-labs.com/plan9
For information on Plan 9 from User Space (Plan 9 applications and libraries For information on Plan 9 from User Space (Plan 9 applications and libraries
ported to Linux/BSD/OSX/etc) check out http://swtch.com/plan9 ported to Linux/BSD/OSX/etc) check out http://swtch.com/plan9
.. SPDX-License-Identifier: GPL-2.0
===============================
Acorn Disc Filing System - ADFS
===============================
Filesystems supported by ADFS Filesystems supported by ADFS
----------------------------- -----------------------------
...@@ -25,6 +31,7 @@ directory updates, specifically updating the access mode and timestamp. ...@@ -25,6 +31,7 @@ directory updates, specifically updating the access mode and timestamp.
Mount options for ADFS Mount options for ADFS
---------------------- ----------------------
============ ======================================================
uid=nnn All files in the partition will be owned by uid=nnn All files in the partition will be owned by
user id nnn. Default 0 (root). user id nnn. Default 0 (root).
gid=nnn All files in the partition will be in group gid=nnn All files in the partition will be in group
...@@ -36,22 +43,23 @@ Mount options for ADFS ...@@ -36,22 +43,23 @@ Mount options for ADFS
ftsuffix=n When ftsuffix=0, no file type suffix will be applied. ftsuffix=n When ftsuffix=0, no file type suffix will be applied.
When ftsuffix=1, a hexadecimal suffix corresponding to When ftsuffix=1, a hexadecimal suffix corresponding to
the RISC OS file type will be added. Default 0. the RISC OS file type will be added. Default 0.
============ ======================================================
Mapping of ADFS permissions to Linux permissions Mapping of ADFS permissions to Linux permissions
------------------------------------------------ ------------------------------------------------
ADFS permissions consist of the following: ADFS permissions consist of the following:
Owner read - Owner read
Owner write - Owner write
Other read - Other read
Other write - Other write
(In older versions, an 'execute' permission did exist, but this (In older versions, an 'execute' permission did exist, but this
does not hold the same meaning as the Linux 'execute' permission does not hold the same meaning as the Linux 'execute' permission
and is now obsolete). and is now obsolete).
The mapping is performed as follows: The mapping is performed as follows::
Owner read -> -r--r--r-- Owner read -> -r--r--r--
Owner write -> --w--w---w Owner write -> --w--w---w
...@@ -66,17 +74,18 @@ Mapping of ADFS permissions to Linux permissions ...@@ -66,17 +74,18 @@ Mapping of ADFS permissions to Linux permissions
Possible other mode permissions -> ----rwxrwx Possible other mode permissions -> ----rwxrwx
Hence, with the default masks, if a file is owner read/write, and Hence, with the default masks, if a file is owner read/write, and
not a UnixExec filetype, then the permissions will be: not a UnixExec filetype, then the permissions will be::
-rw------- -rw-------
However, if the masks were ownmask=0770,othmask=0007, then this would However, if the masks were ownmask=0770,othmask=0007, then this would
be modified to: be modified to::
-rw-rw---- -rw-rw----
There is no restriction on what you can do with these masks. You may There is no restriction on what you can do with these masks. You may
wish that either read bits give read access to the file for all, but wish that either read bits give read access to the file for all, but
keep the default write protection (ownmask=0755,othmask=0577): keep the default write protection (ownmask=0755,othmask=0577)::
-rw-r--r-- -rw-r--r--
......
.. SPDX-License-Identifier: GPL-2.0
=============================
Overview of Amiga Filesystems Overview of Amiga Filesystems
============================= =============================
Not all varieties of the Amiga filesystems are supported for reading and Not all varieties of the Amiga filesystems are supported for reading and
writing. The Amiga currently knows six different filesystems: writing. The Amiga currently knows six different filesystems:
============== ===============================================================
DOS\0 The old or original filesystem, not really suited for DOS\0 The old or original filesystem, not really suited for
hard disks and normally not used on them, either. hard disks and normally not used on them, either.
Supported read/write. Supported read/write.
...@@ -23,6 +27,7 @@ DOS\4 The original filesystem with directory cache. The directory ...@@ -23,6 +27,7 @@ DOS\4 The original filesystem with directory cache. The directory
sense on hard disks. Supported read only. sense on hard disks. Supported read only.
DOS\5 The Fast File System with directory cache. Supported read only. DOS\5 The Fast File System with directory cache. Supported read only.
============== ===============================================================
All of the above filesystems allow block sizes from 512 to 32K bytes. All of the above filesystems allow block sizes from 512 to 32K bytes.
Supported block sizes are: 512, 1024, 2048 and 4096 bytes. Larger blocks Supported block sizes are: 512, 1024, 2048 and 4096 bytes. Larger blocks
...@@ -36,14 +41,18 @@ are supported, too. ...@@ -36,14 +41,18 @@ are supported, too.
Mount options for the AFFS Mount options for the AFFS
========================== ==========================
protect If this option is set, the protection bits cannot be altered. protect
If this option is set, the protection bits cannot be altered.
setuid[=uid] This sets the owner of all files and directories in the file setuid[=uid]
This sets the owner of all files and directories in the file
system to uid or the uid of the current user, respectively. system to uid or the uid of the current user, respectively.
setgid[=gid] Same as above, but for gid. setgid[=gid]
Same as above, but for gid.
mode=mode Sets the mode flags to the given (octal) value, regardless mode=mode
Sets the mode flags to the given (octal) value, regardless
of the original permissions. Directories will get an x of the original permissions. Directories will get an x
permission if the corresponding r bit is set. permission if the corresponding r bit is set.
This is useful since most of the plain AmigaOS files This is useful since most of the plain AmigaOS files
...@@ -53,33 +62,41 @@ nofilenametruncate ...@@ -53,33 +62,41 @@ nofilenametruncate
The file system will return an error when filename exceeds The file system will return an error when filename exceeds
standard maximum filename length (30 characters). standard maximum filename length (30 characters).
reserved=num Sets the number of reserved blocks at the start of the reserved=num
Sets the number of reserved blocks at the start of the
partition to num. You should never need this option. partition to num. You should never need this option.
Default is 2. Default is 2.
root=block Sets the block number of the root block. This should never root=block
Sets the block number of the root block. This should never
be necessary. be necessary.
bs=blksize Sets the blocksize to blksize. Valid block sizes are 512, bs=blksize
Sets the blocksize to blksize. Valid block sizes are 512,
1024, 2048 and 4096. Like the root option, this should 1024, 2048 and 4096. Like the root option, this should
never be necessary, as the affs can figure it out itself. never be necessary, as the affs can figure it out itself.
quiet The file system will not return an error for disallowed quiet
The file system will not return an error for disallowed
mode changes. mode changes.
verbose The volume name, file system type and block size will verbose
The volume name, file system type and block size will
be written to the syslog when the filesystem is mounted. be written to the syslog when the filesystem is mounted.
mufs The filesystem is really a muFS, also it doesn't mufs
The filesystem is really a muFS, also it doesn't
identify itself as one. This option is necessary if identify itself as one. This option is necessary if
the filesystem wasn't formatted as muFS, but is used the filesystem wasn't formatted as muFS, but is used
as one. as one.
prefix=path Path will be prefixed to every absolute path name of prefix=path
Path will be prefixed to every absolute path name of
symbolic links on an AFFS partition. Default = "/". symbolic links on an AFFS partition. Default = "/".
(See below.) (See below.)
volume=name When symbolic links with an absolute path are created volume=name
When symbolic links with an absolute path are created
on an AFFS partition, name will be prepended as the on an AFFS partition, name will be prepended as the
volume name. Default = "" (empty string). volume name. Default = "" (empty string).
(See below.) (See below.)
...@@ -148,11 +165,13 @@ might be "User", "WB" and "Graphics", the mount points /amiga/User, ...@@ -148,11 +165,13 @@ might be "User", "WB" and "Graphics", the mount points /amiga/User,
Examples Examples
======== ========
Command line: Command line::
mount Archive/Amiga/Workbench3.1.adf /mnt -t affs -o loop,verbose mount Archive/Amiga/Workbench3.1.adf /mnt -t affs -o loop,verbose
mount /dev/sda3 /Amiga -t affs mount /dev/sda3 /Amiga -t affs
/etc/fstab entry: /etc/fstab entry::
/dev/sdb5 /amiga/Workbench affs noauto,user,exec,verbose 0 0 /dev/sdb5 /amiga/Workbench affs noauto,user,exec,verbose 0 0
IMPORTANT NOTE IMPORTANT NOTE
...@@ -170,7 +189,8 @@ before booting Windows! ...@@ -170,7 +189,8 @@ before booting Windows!
If the damage is already done, the following should fix the RDB If the damage is already done, the following should fix the RDB
(where <disk> is the device name). (where <disk> is the device name).
DO AT YOUR OWN RISK:
DO AT YOUR OWN RISK::
dd if=/dev/<disk> of=rdb.tmp count=1 dd if=/dev/<disk> of=rdb.tmp count=1
cp rdb.tmp rdb.fixed cp rdb.tmp rdb.fixed
...@@ -189,10 +209,14 @@ By default, filenames are truncated to 30 characters without warning. ...@@ -189,10 +209,14 @@ By default, filenames are truncated to 30 characters without warning.
'nofilenametruncate' mount option can change that behavior. 'nofilenametruncate' mount option can change that behavior.
Case is ignored by the affs in filename matching, but Linux shells Case is ignored by the affs in filename matching, but Linux shells
do care about the case. Example (with /wb being an affs mounted fs): do care about the case. Example (with /wb being an affs mounted fs)::
rm /wb/WRONGCASE rm /wb/WRONGCASE
will remove /mnt/wrongcase, but
will remove /mnt/wrongcase, but::
rm /wb/WR* rm /wb/WR*
will not since the names are matched by the shell. will not since the names are matched by the shell.
The block allocation is designed for hard disk partitions. If more The block allocation is designed for hard disk partitions. If more
...@@ -219,4 +243,4 @@ due to an incompatibility with the Amiga floppy controller. ...@@ -219,4 +243,4 @@ due to an incompatibility with the Amiga floppy controller.
If you are interested in an Amiga Emulator for Linux, look at If you are interested in an Amiga Emulator for Linux, look at
http://web.archive.org/web/*/http://www.freiburg.linux.de/~uae/ http://web.archive.org/web/%2E/http://www.freiburg.linux.de/~uae/
==================== .. SPDX-License-Identifier: GPL-2.0
kAFS: AFS FILESYSTEM
====================
Contents: ====================
kAFS: AFS FILESYSTEM
====================
.. Contents:
- Overview. - Overview.
- Usage. - Usage.
...@@ -14,8 +16,7 @@ Contents: ...@@ -14,8 +16,7 @@ Contents:
- The @sys substitution. - The @sys substitution.
======== Overview
OVERVIEW
======== ========
This filesystem provides a fairly simple secure AFS filesystem driver. It is This filesystem provides a fairly simple secure AFS filesystem driver. It is
...@@ -35,35 +36,33 @@ It does not yet support the following AFS features: ...@@ -35,35 +36,33 @@ It does not yet support the following AFS features:
(*) pioctl() system call. (*) pioctl() system call.
=========== Compilation
COMPILATION
=========== ===========
The filesystem should be enabled by turning on the kernel configuration The filesystem should be enabled by turning on the kernel configuration
options: options::
CONFIG_AF_RXRPC - The RxRPC protocol transport CONFIG_AF_RXRPC - The RxRPC protocol transport
CONFIG_RXKAD - The RxRPC Kerberos security handler CONFIG_RXKAD - The RxRPC Kerberos security handler
CONFIG_AFS - The AFS filesystem CONFIG_AFS - The AFS filesystem
Additionally, the following can be turned on to aid debugging: Additionally, the following can be turned on to aid debugging::
CONFIG_AF_RXRPC_DEBUG - Permit AF_RXRPC debugging to be enabled CONFIG_AF_RXRPC_DEBUG - Permit AF_RXRPC debugging to be enabled
CONFIG_AFS_DEBUG - Permit AFS debugging to be enabled CONFIG_AFS_DEBUG - Permit AFS debugging to be enabled
They permit the debugging messages to be turned on dynamically by manipulating They permit the debugging messages to be turned on dynamically by manipulating
the masks in the following files: the masks in the following files::
/sys/module/af_rxrpc/parameters/debug /sys/module/af_rxrpc/parameters/debug
/sys/module/kafs/parameters/debug /sys/module/kafs/parameters/debug
===== Usage
USAGE
===== =====
When inserting the driver modules the root cell must be specified along with a When inserting the driver modules the root cell must be specified along with a
list of volume location server IP addresses: list of volume location server IP addresses::
modprobe rxrpc modprobe rxrpc
modprobe kafs rootcell=cambridge.redhat.com:172.16.18.73:172.16.18.91 modprobe kafs rootcell=cambridge.redhat.com:172.16.18.73:172.16.18.91
...@@ -77,14 +76,14 @@ The second module is the kerberos RxRPC security driver, and the third module ...@@ -77,14 +76,14 @@ The second module is the kerberos RxRPC security driver, and the third module
is the actual filesystem driver for the AFS filesystem. is the actual filesystem driver for the AFS filesystem.
Once the module has been loaded, more modules can be added by the following Once the module has been loaded, more modules can be added by the following
procedure: procedure::
echo add grand.central.org 18.9.48.14:128.2.203.61:130.237.48.87 >/proc/fs/afs/cells echo add grand.central.org 18.9.48.14:128.2.203.61:130.237.48.87 >/proc/fs/afs/cells
Where the parameters to the "add" command are the name of a cell and a list of Where the parameters to the "add" command are the name of a cell and a list of
volume location servers within that cell, with the latter separated by colons. volume location servers within that cell, with the latter separated by colons.
Filesystems can be mounted anywhere by commands similar to the following: Filesystems can be mounted anywhere by commands similar to the following::
mount -t afs "%cambridge.redhat.com:root.afs." /afs mount -t afs "%cambridge.redhat.com:root.afs." /afs
mount -t afs "#cambridge.redhat.com:root.cell." /afs/cambridge mount -t afs "#cambridge.redhat.com:root.cell." /afs/cambridge
...@@ -104,8 +103,7 @@ named volume will be looked up in the cell specified during modprobe. ...@@ -104,8 +103,7 @@ named volume will be looked up in the cell specified during modprobe.
Additional cells can be added through /proc (see later section). Additional cells can be added through /proc (see later section).
=========== Mountpoints
MOUNTPOINTS
=========== ===========
AFS has a concept of mountpoints. In AFS terms, these are specially formatted AFS has a concept of mountpoints. In AFS terms, these are specially formatted
...@@ -123,42 +121,40 @@ culled first. If all are culled, then the requested volume will also be ...@@ -123,42 +121,40 @@ culled first. If all are culled, then the requested volume will also be
unmounted, otherwise error EBUSY will be returned. unmounted, otherwise error EBUSY will be returned.
This can be used by the administrator to attempt to unmount the whole AFS tree This can be used by the administrator to attempt to unmount the whole AFS tree
mounted on /afs in one go by doing: mounted on /afs in one go by doing::
umount /afs umount /afs
============ Dynamic Root
DYNAMIC ROOT
============ ============
A mount option is available to create a serverless mount that is only usable A mount option is available to create a serverless mount that is only usable
for dynamic lookup. Creating such a mount can be done by, for example: for dynamic lookup. Creating such a mount can be done by, for example::
mount -t afs none /afs -o dyn mount -t afs none /afs -o dyn
This creates a mount that just has an empty directory at the root. Attempting This creates a mount that just has an empty directory at the root. Attempting
to look up a name in this directory will cause a mountpoint to be created that to look up a name in this directory will cause a mountpoint to be created that
looks up a cell of the same name, for example: looks up a cell of the same name, for example::
ls /afs/grand.central.org/ ls /afs/grand.central.org/
=============== Proc Filesystem
PROC FILESYSTEM
=============== ===============
The AFS modules creates a "/proc/fs/afs/" directory and populates it: The AFS modules creates a "/proc/fs/afs/" directory and populates it:
(*) A "cells" file that lists cells currently known to the afs module and (*) A "cells" file that lists cells currently known to the afs module and
their usage counts: their usage counts::
[root@andromeda ~]# cat /proc/fs/afs/cells [root@andromeda ~]# cat /proc/fs/afs/cells
USE NAME USE NAME
3 cambridge.redhat.com 3 cambridge.redhat.com
(*) A directory per cell that contains files that list volume location (*) A directory per cell that contains files that list volume location
servers, volumes, and active servers known within that cell. servers, volumes, and active servers known within that cell::
[root@andromeda ~]# cat /proc/fs/afs/cambridge.redhat.com/servers [root@andromeda ~]# cat /proc/fs/afs/cambridge.redhat.com/servers
USE ADDR STATE USE ADDR STATE
...@@ -171,8 +167,7 @@ The AFS modules creates a "/proc/fs/afs/" directory and populates it: ...@@ -171,8 +167,7 @@ The AFS modules creates a "/proc/fs/afs/" directory and populates it:
1 Val 20000000 20000001 20000002 root.afs 1 Val 20000000 20000001 20000002 root.afs
================= The Cell Database
THE CELL DATABASE
================= =================
The filesystem maintains an internal database of all the cells it knows and the The filesystem maintains an internal database of all the cells it knows and the
...@@ -181,7 +176,7 @@ the system belongs is added to the database when modprobe is performed by the ...@@ -181,7 +176,7 @@ the system belongs is added to the database when modprobe is performed by the
"rootcell=" argument or, if compiled in, using a "kafs.rootcell=" argument on "rootcell=" argument or, if compiled in, using a "kafs.rootcell=" argument on
the kernel command line. the kernel command line.
Further cells can be added by commands similar to the following: Further cells can be added by commands similar to the following::
echo add CELLNAME VLADDR[:VLADDR][:VLADDR]... >/proc/fs/afs/cells echo add CELLNAME VLADDR[:VLADDR][:VLADDR]... >/proc/fs/afs/cells
echo add grand.central.org 18.9.48.14:128.2.203.61:130.237.48.87 >/proc/fs/afs/cells echo add grand.central.org 18.9.48.14:128.2.203.61:130.237.48.87 >/proc/fs/afs/cells
...@@ -189,8 +184,7 @@ Further cells can be added by commands similar to the following: ...@@ -189,8 +184,7 @@ Further cells can be added by commands similar to the following:
No other cell database operations are available at this time. No other cell database operations are available at this time.
======== Security
SECURITY
======== ========
Secure operations are initiated by acquiring a key using the klog program. A Secure operations are initiated by acquiring a key using the klog program. A
...@@ -198,17 +192,17 @@ very primitive klog program is available at: ...@@ -198,17 +192,17 @@ very primitive klog program is available at:
http://people.redhat.com/~dhowells/rxrpc/klog.c http://people.redhat.com/~dhowells/rxrpc/klog.c
This should be compiled by: This should be compiled by::
make klog LDLIBS="-lcrypto -lcrypt -lkrb4 -lkeyutils" make klog LDLIBS="-lcrypto -lcrypt -lkrb4 -lkeyutils"
And then run as: And then run as::
./klog ./klog
Assuming it's successful, this adds a key of type RxRPC, named for the service Assuming it's successful, this adds a key of type RxRPC, named for the service
and cell, eg: "afs@<cellname>". This can be viewed with the keyctl program or and cell, eg: "afs@<cellname>". This can be viewed with the keyctl program or
by cat'ing /proc/keys: by cat'ing /proc/keys::
[root@andromeda ~]# keyctl show [root@andromeda ~]# keyctl show
Session Keyring Session Keyring
...@@ -232,20 +226,19 @@ socket), then the operations on the file will be made with key that was used to ...@@ -232,20 +226,19 @@ socket), then the operations on the file will be made with key that was used to
open the file. open the file.
===================== The @sys Substitution
THE @SYS SUBSTITUTION
===================== =====================
The list of up to 16 @sys substitutions for the current network namespace can The list of up to 16 @sys substitutions for the current network namespace can
be configured by writing a list to /proc/fs/afs/sysname: be configured by writing a list to /proc/fs/afs/sysname::
[root@andromeda ~]# echo foo amd64_linux_26 >/proc/fs/afs/sysname [root@andromeda ~]# echo foo amd64_linux_26 >/proc/fs/afs/sysname
or cleared entirely by writing an empty list: or cleared entirely by writing an empty list::
[root@andromeda ~]# echo >/proc/fs/afs/sysname [root@andromeda ~]# echo >/proc/fs/afs/sysname
The current list for current network namespace can be retrieved by: The current list for current network namespace can be retrieved by::
[root@andromeda ~]# cat /proc/fs/afs/sysname [root@andromeda ~]# cat /proc/fs/afs/sysname
foo foo
......
.. SPDX-License-Identifier: GPL-2.0
====================================================================
Miscellaneous Device control operations for the autofs kernel module Miscellaneous Device control operations for the autofs kernel module
==================================================================== ====================================================================
...@@ -36,24 +38,24 @@ For example, there are two types of automount maps, direct (in the kernel ...@@ -36,24 +38,24 @@ For example, there are two types of automount maps, direct (in the kernel
module source you will see a third type called an offset, which is just module source you will see a third type called an offset, which is just
a direct mount in disguise) and indirect. a direct mount in disguise) and indirect.
Here is a master map with direct and indirect map entries: Here is a master map with direct and indirect map entries::
/- /etc/auto.direct /- /etc/auto.direct
/test /etc/auto.indirect /test /etc/auto.indirect
and the corresponding map files: and the corresponding map files::
/etc/auto.direct: /etc/auto.direct:
/automount/dparse/g6 budgie:/autofs/export1 /automount/dparse/g6 budgie:/autofs/export1
/automount/dparse/g1 shark:/autofs/export1 /automount/dparse/g1 shark:/autofs/export1
and so on. and so on.
/etc/auto.indirect: /etc/auto.indirect::
g1 shark:/autofs/export1 g1 shark:/autofs/export1
g6 budgie:/autofs/export1 g6 budgie:/autofs/export1
and so on. and so on.
For the above indirect map an autofs file system is mounted on /test and For the above indirect map an autofs file system is mounted on /test and
mounts are triggered for each sub-directory key by the inode lookup mounts are triggered for each sub-directory key by the inode lookup
...@@ -69,18 +71,18 @@ use the follow_link inode operation to trigger the mount. ...@@ -69,18 +71,18 @@ use the follow_link inode operation to trigger the mount.
But, each entry in direct and indirect maps can have offsets (making But, each entry in direct and indirect maps can have offsets (making
them multi-mount map entries). them multi-mount map entries).
For example, an indirect mount map entry could also be: For example, an indirect mount map entry could also be::
g1 \ g1 \
/ shark:/autofs/export5/testing/test \ / shark:/autofs/export5/testing/test \
/s1 shark:/autofs/export/testing/test/s1 \ /s1 shark:/autofs/export/testing/test/s1 \
/s2 shark:/autofs/export5/testing/test/s2 \ /s2 shark:/autofs/export5/testing/test/s2 \
/s1/ss1 shark:/autofs/export1 \ /s1/ss1 shark:/autofs/export1 \
/s2/ss2 shark:/autofs/export2 /s2/ss2 shark:/autofs/export2
and a similarly a direct mount map entry could also be: and a similarly a direct mount map entry could also be::
/automount/dparse/g1 \ /automount/dparse/g1 \
/ shark:/autofs/export5/testing/test \ / shark:/autofs/export5/testing/test \
/s1 shark:/autofs/export/testing/test/s1 \ /s1 shark:/autofs/export/testing/test/s1 \
/s2 shark:/autofs/export5/testing/test/s2 \ /s2 shark:/autofs/export5/testing/test/s2 \
...@@ -170,9 +172,9 @@ autofs Miscellaneous Device mount control interface ...@@ -170,9 +172,9 @@ autofs Miscellaneous Device mount control interface
The control interface is opening a device node, typically /dev/autofs. The control interface is opening a device node, typically /dev/autofs.
All the ioctls use a common structure to pass the needed parameter All the ioctls use a common structure to pass the needed parameter
information and return operation results: information and return operation results::
struct autofs_dev_ioctl { struct autofs_dev_ioctl {
__u32 ver_major; __u32 ver_major;
__u32 ver_minor; __u32 ver_minor;
__u32 size; /* total size of data passed in __u32 size; /* total size of data passed in
...@@ -195,7 +197,7 @@ struct autofs_dev_ioctl { ...@@ -195,7 +197,7 @@ struct autofs_dev_ioctl {
}; };
char path[0]; char path[0];
}; };
The ioctlfd field is a mount point file descriptor of an autofs mount The ioctlfd field is a mount point file descriptor of an autofs mount
point. It is returned by the open call and is used by all calls except point. It is returned by the open call and is used by all calls except
...@@ -212,7 +214,7 @@ is used account for the increased structure length when translating the ...@@ -212,7 +214,7 @@ is used account for the increased structure length when translating the
structure sent from user space. structure sent from user space.
This structure can be initialized before setting specific fields by using This structure can be initialized before setting specific fields by using
the void function call init_autofs_dev_ioctl(struct autofs_dev_ioctl *). the void function call init_autofs_dev_ioctl(``struct autofs_dev_ioctl *``).
All of the ioctls perform a copy of this structure from user space to All of the ioctls perform a copy of this structure from user space to
kernel space and return -EINVAL if the size parameter is smaller than kernel space and return -EINVAL if the size parameter is smaller than
......
.. SPDX-License-Identifier: GPL-2.0
=========================
BeOS filesystem for Linux BeOS filesystem for Linux
=========================
Document last updated: Dec 6, 2001 Document last updated: Dec 6, 2001
WARNING Warning
======= =======
Make sure you understand that this is alpha software. This means that the Make sure you understand that this is alpha software. This means that the
implementation is neither complete nor well-tested. implementation is neither complete nor well-tested.
I DISCLAIM ALL RESPONSIBILITY FOR ANY POSSIBLE BAD EFFECTS OF THIS CODE! I DISCLAIM ALL RESPONSIBILITY FOR ANY POSSIBLE BAD EFFECTS OF THIS CODE!
LICENSE License
===== =======
This software is covered by the GNU General Public License. This software is covered by the GNU General Public License.
See the file COPYING for the complete text of the license. See the file COPYING for the complete text of the license.
Or the GNU website: <http://www.gnu.org/licenses/licenses.html> Or the GNU website: <http://www.gnu.org/licenses/licenses.html>
AUTHOR Author
===== ======
The largest part of the code written by Will Dyson <will_dyson@pobox.com> The largest part of the code written by Will Dyson <will_dyson@pobox.com>
He has been working on the code since Aug 13, 2001. See the changelog for He has been working on the code since Aug 13, 2001. See the changelog for
details. details.
Original Author: Makoto Kato <m_kato@ga2.so-net.ne.jp> Original Author: Makoto Kato <m_kato@ga2.so-net.ne.jp>
His original code can still be found at: His original code can still be found at:
<http://hp.vector.co.jp/authors/VA008030/bfs/> <http://hp.vector.co.jp/authors/VA008030/bfs/>
Does anyone know of a more current email address for Makoto? He doesn't Does anyone know of a more current email address for Makoto? He doesn't
respond to the address given above... respond to the address given above...
This filesystem doesn't have a maintainer. This filesystem doesn't have a maintainer.
WHAT IS THIS DRIVER? What is this Driver?
================== ====================
This module implements the native filesystem of BeOS http://www.beincorporated.com/ This module implements the native filesystem of BeOS http://www.beincorporated.com/
for the linux 2.4.1 and later kernels. Currently it is a read-only for the linux 2.4.1 and later kernels. Currently it is a read-only
implementation. implementation.
Which is it, BFS or BEFS? Which is it, BFS or BEFS?
================ =========================
Be, Inc said, "BeOS Filesystem is officially called BFS, not BeFS". Be, Inc said, "BeOS Filesystem is officially called BFS, not BeFS".
But Unixware Boot Filesystem is called bfs, too. And they are already in But Unixware Boot Filesystem is called bfs, too. And they are already in
the kernel. Because of this naming conflict, on Linux the BeOS the kernel. Because of this naming conflict, on Linux the BeOS
filesystem is called befs. filesystem is called befs.
HOW TO INSTALL How to Install
============== ==============
step 1. Install the BeFS patch into the source code tree of linux. step 1. Install the BeFS patch into the source code tree of linux.
...@@ -63,7 +69,7 @@ The linux kernel has many compile-time options. Most of them are beyond the ...@@ -63,7 +69,7 @@ The linux kernel has many compile-time options. Most of them are beyond the
scope of this document. I suggest the Kernel-HOWTO document as a good general scope of this document. I suggest the Kernel-HOWTO document as a good general
reference on this topic. http://www.linuxdocs.org/HOWTOs/Kernel-HOWTO-4.html reference on this topic. http://www.linuxdocs.org/HOWTOs/Kernel-HOWTO-4.html
However, to use the BeFS module, you must enable it at configure time. However, to use the BeFS module, you must enable it at configure time::
cd /foo/bar/linux cd /foo/bar/linux
make menuconfig (or xconfig) make menuconfig (or xconfig)
...@@ -82,35 +88,40 @@ step 3. Install ...@@ -82,35 +88,40 @@ step 3. Install
See the kernel howto <http://www.linux.com/howto/Kernel-HOWTO.html> for See the kernel howto <http://www.linux.com/howto/Kernel-HOWTO.html> for
instructions on this critical step. instructions on this critical step.
USING BFS Using BFS
========= =========
To use the BeOS filesystem, use filesystem type 'befs'. To use the BeOS filesystem, use filesystem type 'befs'.
ex) ex::
mount -t befs /dev/fd0 /beos mount -t befs /dev/fd0 /beos
MOUNT OPTIONS Mount Options
============= =============
============= ===========================================================
uid=nnn All files in the partition will be owned by user id nnn. uid=nnn All files in the partition will be owned by user id nnn.
gid=nnn All files in the partition will be in group nnn. gid=nnn All files in the partition will be in group nnn.
iocharset=xxx Use xxx as the name of the NLS translation table. iocharset=xxx Use xxx as the name of the NLS translation table.
debug The driver will output debugging information to the syslog. debug The driver will output debugging information to the syslog.
============= ===========================================================
HOW TO GET LASTEST VERSION How to Get Lastest Version
========================== ==========================
The latest version is currently available at: The latest version is currently available at:
<http://befs-driver.sourceforge.net/> <http://befs-driver.sourceforge.net/>
ANY KNOWN BUGS? Any Known Bugs?
=========== ===============
As of Jan 20, 2002: As of Jan 20, 2002:
None None
SPECIAL THANKS Special Thanks
============== ==============
Dominic Giampalo ... Writing "Practical file system design with Be filesystem" Dominic Giampalo ... Writing "Practical file system design with Be filesystem"
Hiroyuki Yamada ... Testing LinuxPPC. Hiroyuki Yamada ... Testing LinuxPPC.
......
BFS FILESYSTEM FOR LINUX .. SPDX-License-Identifier: GPL-2.0
========================
BFS Filesystem for Linux
======================== ========================
The BFS filesystem is used by SCO UnixWare OS for the /stand slice, which The BFS filesystem is used by SCO UnixWare OS for the /stand slice, which
...@@ -9,20 +12,20 @@ In order to access /stand partition under Linux you obviously need to ...@@ -9,20 +12,20 @@ In order to access /stand partition under Linux you obviously need to
know the partition number and the kernel must support UnixWare disk slices know the partition number and the kernel must support UnixWare disk slices
(CONFIG_UNIXWARE_DISKLABEL config option). However BFS support does not (CONFIG_UNIXWARE_DISKLABEL config option). However BFS support does not
depend on having UnixWare disklabel support because one can also mount depend on having UnixWare disklabel support because one can also mount
BFS filesystem via loopback: BFS filesystem via loopback::
# losetup /dev/loop0 stand.img # losetup /dev/loop0 stand.img
# mount -t bfs /dev/loop0 /mnt/stand # mount -t bfs /dev/loop0 /mnt/stand
where stand.img is a file containing the image of BFS filesystem. where stand.img is a file containing the image of BFS filesystem.
When you have finished using it and umounted you need to also deallocate When you have finished using it and umounted you need to also deallocate
/dev/loop0 device by: /dev/loop0 device by::
# losetup -d /dev/loop0 # losetup -d /dev/loop0
You can simplify mounting by just typing: You can simplify mounting by just typing::
# mount -t bfs -o loop stand.img /mnt/stand # mount -t bfs -o loop stand.img /mnt/stand
this will allocate the first available loopback device (and load loop.o this will allocate the first available loopback device (and load loop.o
kernel module if necessary) automatically. If the loopback driver is not kernel module if necessary) automatically. If the loopback driver is not
...@@ -33,21 +36,21 @@ that modprobe is functioning. Beware that umount will not deallocate ...@@ -33,21 +36,21 @@ that modprobe is functioning. Beware that umount will not deallocate
losetup(8). Read losetup(8) manpage for more info. losetup(8). Read losetup(8) manpage for more info.
To create the BFS image under UnixWare you need to find out first which To create the BFS image under UnixWare you need to find out first which
slice contains it. The command prtvtoc(1M) is your friend: slice contains it. The command prtvtoc(1M) is your friend::
# prtvtoc /dev/rdsk/c0b0t0d0s0 # prtvtoc /dev/rdsk/c0b0t0d0s0
(assuming your root disk is on target=0, lun=0, bus=0, controller=0). Then you (assuming your root disk is on target=0, lun=0, bus=0, controller=0). Then you
look for the slice with tag "STAND", which is usually slice 10. With this look for the slice with tag "STAND", which is usually slice 10. With this
information you can use dd(1) to create the BFS image: information you can use dd(1) to create the BFS image::
# umount /stand # umount /stand
# dd if=/dev/rdsk/c0b0t0d0sa of=stand.img bs=512 # dd if=/dev/rdsk/c0b0t0d0sa of=stand.img bs=512
Just in case, you can verify that you have done the right thing by checking Just in case, you can verify that you have done the right thing by checking
the magic number: the magic number::
# od -Ad -tx4 stand.img | more # od -Ad -tx4 stand.img | more
The first 4 bytes should be 0x1badface. The first 4 bytes should be 0x1badface.
......
.. SPDX-License-Identifier: GPL-2.0
=====
BTRFS BTRFS
===== =====
......
.. SPDX-License-Identifier: GPL-2.0
============================
Ceph Distributed File System Ceph Distributed File System
============================ ============================
...@@ -15,6 +18,7 @@ Basic features include: ...@@ -15,6 +18,7 @@ Basic features include:
* Easy deployment: most FS components are userspace daemons * Easy deployment: most FS components are userspace daemons
Also, Also,
* Flexible snapshots (on any directory) * Flexible snapshots (on any directory)
* Recursive accounting (nested files, directories, bytes) * Recursive accounting (nested files, directories, bytes)
...@@ -63,7 +67,7 @@ no 'du' or similar recursive scan of the file system is required. ...@@ -63,7 +67,7 @@ no 'du' or similar recursive scan of the file system is required.
Finally, Ceph also allows quotas to be set on any directory in the system. Finally, Ceph also allows quotas to be set on any directory in the system.
The quota can restrict the number of bytes or the number of files stored The quota can restrict the number of bytes or the number of files stored
beneath that point in the directory hierarchy. Quotas can be set using beneath that point in the directory hierarchy. Quotas can be set using
extended attributes 'ceph.quota.max_files' and 'ceph.quota.max_bytes', eg: extended attributes 'ceph.quota.max_files' and 'ceph.quota.max_bytes', eg::
setfattr -n ceph.quota.max_bytes -v 100000000 /some/dir setfattr -n ceph.quota.max_bytes -v 100000000 /some/dir
getfattr -n ceph.quota.max_bytes /some/dir getfattr -n ceph.quota.max_bytes /some/dir
...@@ -76,7 +80,7 @@ from writing as much data as it needs. ...@@ -76,7 +80,7 @@ from writing as much data as it needs.
Mount Syntax Mount Syntax
============ ============
The basic mount syntax is: The basic mount syntax is::
# mount -t ceph monip[:port][,monip2[:port]...]:/[subdir] mnt # mount -t ceph monip[:port][,monip2[:port]...]:/[subdir] mnt
...@@ -84,7 +88,7 @@ You only need to specify a single monitor, as the client will get the ...@@ -84,7 +88,7 @@ You only need to specify a single monitor, as the client will get the
full list when it connects. (However, if the monitor you specify full list when it connects. (However, if the monitor you specify
happens to be down, the mount won't succeed.) The port can be left happens to be down, the mount won't succeed.) The port can be left
off if the monitor is using the default. So if the monitor is at off if the monitor is using the default. So if the monitor is at
1.2.3.4, 1.2.3.4::
# mount -t ceph 1.2.3.4:/ /mnt/ceph # mount -t ceph 1.2.3.4:/ /mnt/ceph
...@@ -179,8 +183,8 @@ For more information on Ceph, see the home page at ...@@ -179,8 +183,8 @@ For more information on Ceph, see the home page at
https://ceph.com/ https://ceph.com/
The Linux kernel client source tree is available at The Linux kernel client source tree is available at
https://github.com/ceph/ceph-client.git - https://github.com/ceph/ceph-client.git
git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client.git - git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client.git
and the source for the full system is at and the source for the full system is at
https://github.com/ceph/ceph.git https://github.com/ceph/ceph.git
...@@ -13,7 +13,7 @@ network by utilizing SMB or CIFS protocol. ...@@ -13,7 +13,7 @@ network by utilizing SMB or CIFS protocol.
In order to mount, the network stack will also need to be set up by In order to mount, the network stack will also need to be set up by
using 'ip=' config option. For more details, see using 'ip=' config option. For more details, see
Documentation/filesystems/nfs/nfsroot.txt. Documentation/admin-guide/nfs/nfsroot.rst.
A CIFS root mount currently requires the use of SMB1+UNIX Extensions A CIFS root mount currently requires the use of SMB1+UNIX Extensions
which is only supported by the Samba server. SMB1 is the older which is only supported by the Samba server. SMB1 is the older
......
.. SPDX-License-Identifier: GPL-2.0
Cramfs - cram a filesystem onto a small ROM ===========================================
Cramfs - cram a filesystem onto a small ROM
===========================================
cramfs is designed to be simple and small, and to compress things well. cramfs is designed to be simple and small, and to compress things well.
...@@ -28,9 +31,9 @@ issue. ...@@ -28,9 +31,9 @@ issue.
Hard links are supported, but hard linked files Hard links are supported, but hard linked files
will still have a link count of 1 in the cramfs image. will still have a link count of 1 in the cramfs image.
Cramfs directories have no `.' or `..' entries. Directories (like Cramfs directories have no ``.`` or ``..`` entries. Directories (like
every other file on cramfs) always have a link count of 1. (There's every other file on cramfs) always have a link count of 1. (There's
no need to use -noleaf in `find', btw.) no need to use -noleaf in ``find``, btw.)
No timestamps are stored in a cramfs, so these default to the epoch No timestamps are stored in a cramfs, so these default to the epoch
(1970 GMT). Recently-accessed files may have updated timestamps, but (1970 GMT). Recently-accessed files may have updated timestamps, but
...@@ -70,9 +73,9 @@ MTD drivers are cfi_cmdset_0001 (Intel/Sharp CFI flash) or physmap ...@@ -70,9 +73,9 @@ MTD drivers are cfi_cmdset_0001 (Intel/Sharp CFI flash) or physmap
(Flash device in physical memory map). MTD partitions based on such devices (Flash device in physical memory map). MTD partitions based on such devices
are fine too. Then that device should be specified with the "mtd:" prefix are fine too. Then that device should be specified with the "mtd:" prefix
as the mount device argument. For example, to mount the MTD device named as the mount device argument. For example, to mount the MTD device named
"fs_partition" on the /mnt directory: "fs_partition" on the /mnt directory::
$ mount -t cramfs mtd:fs_partition /mnt $ mount -t cramfs mtd:fs_partition /mnt
To boot a kernel with this as root filesystem, suffice to specify To boot a kernel with this as root filesystem, suffice to specify
something like "root=mtd:fs_partition" on the kernel command line. something like "root=mtd:fs_partition" on the kernel command line.
...@@ -90,6 +93,7 @@ https://github.com/npitre/cramfs-tools ...@@ -90,6 +93,7 @@ https://github.com/npitre/cramfs-tools
For /usr/share/magic For /usr/share/magic
-------------------- --------------------
===== ======================= =======================
0 ulelong 0x28cd3d45 Linux cramfs offset 0 0 ulelong 0x28cd3d45 Linux cramfs offset 0
>4 ulelong x size %d >4 ulelong x size %d
>8 ulelong x flags 0x%x >8 ulelong x flags 0x%x
...@@ -110,6 +114,7 @@ For /usr/share/magic ...@@ -110,6 +114,7 @@ For /usr/share/magic
>552 ulelong x fsid.blocks %d >552 ulelong x fsid.blocks %d
>556 ulelong x fsid.files %d >556 ulelong x fsid.files %d
>560 string >\0 name "%.16s" >560 string >\0 name "%.16s"
===== ======================= =======================
Hacker Notes Hacker Notes
......
Copyright 2009 Jonathan Corbet <corbet@lwn.net> .. SPDX-License-Identifier: GPL-2.0
.. include:: <isonum.txt>
=======
DebugFS
=======
Copyright |copy| 2009 Jonathan Corbet <corbet@lwn.net>
Debugfs exists as a simple way for kernel developers to make information Debugfs exists as a simple way for kernel developers to make information
available to user space. Unlike /proc, which is only meant for information available to user space. Unlike /proc, which is only meant for information
...@@ -6,11 +13,11 @@ about a process, or sysfs, which has strict one-value-per-file rules, ...@@ -6,11 +13,11 @@ about a process, or sysfs, which has strict one-value-per-file rules,
debugfs has no rules at all. Developers can put any information they want debugfs has no rules at all. Developers can put any information they want
there. The debugfs filesystem is also intended to not serve as a stable there. The debugfs filesystem is also intended to not serve as a stable
ABI to user space; in theory, there are no stability constraints placed on ABI to user space; in theory, there are no stability constraints placed on
files exported there. The real world is not always so simple, though [1]; files exported there. The real world is not always so simple, though [1]_;
even debugfs interfaces are best designed with the idea that they will need even debugfs interfaces are best designed with the idea that they will need
to be maintained forever. to be maintained forever.
Debugfs is typically mounted with a command like: Debugfs is typically mounted with a command like::
mount -t debugfs none /sys/kernel/debug mount -t debugfs none /sys/kernel/debug
...@@ -23,7 +30,7 @@ Note that the debugfs API is exported GPL-only to modules. ...@@ -23,7 +30,7 @@ Note that the debugfs API is exported GPL-only to modules.
Code using debugfs should include <linux/debugfs.h>. Then, the first order Code using debugfs should include <linux/debugfs.h>. Then, the first order
of business will be to create at least one directory to hold a set of of business will be to create at least one directory to hold a set of
debugfs files: debugfs files::
struct dentry *debugfs_create_dir(const char *name, struct dentry *parent); struct dentry *debugfs_create_dir(const char *name, struct dentry *parent);
...@@ -36,7 +43,7 @@ something went wrong. If ERR_PTR(-ENODEV) is returned, that is an ...@@ -36,7 +43,7 @@ something went wrong. If ERR_PTR(-ENODEV) is returned, that is an
indication that the kernel has been built without debugfs support and none indication that the kernel has been built without debugfs support and none
of the functions described below will work. of the functions described below will work.
The most general way to create a file within a debugfs directory is with: The most general way to create a file within a debugfs directory is with::
struct dentry *debugfs_create_file(const char *name, umode_t mode, struct dentry *debugfs_create_file(const char *name, umode_t mode,
struct dentry *parent, void *data, struct dentry *parent, void *data,
...@@ -53,7 +60,7 @@ ERR_PTR(-ERROR) on error, or ERR_PTR(-ENODEV) if debugfs support is ...@@ -53,7 +60,7 @@ ERR_PTR(-ERROR) on error, or ERR_PTR(-ENODEV) if debugfs support is
missing. missing.
Create a file with an initial size, the following function can be used Create a file with an initial size, the following function can be used
instead: instead::
struct dentry *debugfs_create_file_size(const char *name, umode_t mode, struct dentry *debugfs_create_file_size(const char *name, umode_t mode,
struct dentry *parent, void *data, struct dentry *parent, void *data,
...@@ -66,7 +73,7 @@ as the function debugfs_create_file. ...@@ -66,7 +73,7 @@ as the function debugfs_create_file.
In a number of cases, the creation of a set of file operations is not In a number of cases, the creation of a set of file operations is not
actually necessary; the debugfs code provides a number of helper functions actually necessary; the debugfs code provides a number of helper functions
for simple situations. Files containing a single integer value can be for simple situations. Files containing a single integer value can be
created with any of: created with any of::
void debugfs_create_u8(const char *name, umode_t mode, void debugfs_create_u8(const char *name, umode_t mode,
struct dentry *parent, u8 *value); struct dentry *parent, u8 *value);
...@@ -80,7 +87,7 @@ created with any of: ...@@ -80,7 +87,7 @@ created with any of:
These files support both reading and writing the given value; if a specific These files support both reading and writing the given value; if a specific
file should not be written to, simply set the mode bits accordingly. The file should not be written to, simply set the mode bits accordingly. The
values in these files are in decimal; if hexadecimal is more appropriate, values in these files are in decimal; if hexadecimal is more appropriate,
the following functions can be used instead: the following functions can be used instead::
void debugfs_create_x8(const char *name, umode_t mode, void debugfs_create_x8(const char *name, umode_t mode,
struct dentry *parent, u8 *value); struct dentry *parent, u8 *value);
...@@ -94,7 +101,7 @@ the following functions can be used instead: ...@@ -94,7 +101,7 @@ the following functions can be used instead:
These functions are useful as long as the developer knows the size of the These functions are useful as long as the developer knows the size of the
value to be exported. Some types can have different widths on different value to be exported. Some types can have different widths on different
architectures, though, complicating the situation somewhat. There are architectures, though, complicating the situation somewhat. There are
functions meant to help out in such special cases: functions meant to help out in such special cases::
void debugfs_create_size_t(const char *name, umode_t mode, void debugfs_create_size_t(const char *name, umode_t mode,
struct dentry *parent, size_t *value); struct dentry *parent, size_t *value);
...@@ -103,7 +110,7 @@ As might be expected, this function will create a debugfs file to represent ...@@ -103,7 +110,7 @@ As might be expected, this function will create a debugfs file to represent
a variable of type size_t. a variable of type size_t.
Similarly, there are helpers for variables of type unsigned long, in decimal Similarly, there are helpers for variables of type unsigned long, in decimal
and hexadecimal: and hexadecimal::
struct dentry *debugfs_create_ulong(const char *name, umode_t mode, struct dentry *debugfs_create_ulong(const char *name, umode_t mode,
struct dentry *parent, struct dentry *parent,
...@@ -111,7 +118,7 @@ and hexadecimal: ...@@ -111,7 +118,7 @@ and hexadecimal:
void debugfs_create_xul(const char *name, umode_t mode, void debugfs_create_xul(const char *name, umode_t mode,
struct dentry *parent, unsigned long *value); struct dentry *parent, unsigned long *value);
Boolean values can be placed in debugfs with: Boolean values can be placed in debugfs with::
struct dentry *debugfs_create_bool(const char *name, umode_t mode, struct dentry *debugfs_create_bool(const char *name, umode_t mode,
struct dentry *parent, bool *value); struct dentry *parent, bool *value);
...@@ -120,7 +127,7 @@ A read on the resulting file will yield either Y (for non-zero values) or ...@@ -120,7 +127,7 @@ A read on the resulting file will yield either Y (for non-zero values) or
N, followed by a newline. If written to, it will accept either upper- or N, followed by a newline. If written to, it will accept either upper- or
lower-case values, or 1 or 0. Any other input will be silently ignored. lower-case values, or 1 or 0. Any other input will be silently ignored.
Also, atomic_t values can be placed in debugfs with: Also, atomic_t values can be placed in debugfs with::
void debugfs_create_atomic_t(const char *name, umode_t mode, void debugfs_create_atomic_t(const char *name, umode_t mode,
struct dentry *parent, atomic_t *value) struct dentry *parent, atomic_t *value)
...@@ -129,7 +136,7 @@ A read of this file will get atomic_t values, and a write of this file ...@@ -129,7 +136,7 @@ A read of this file will get atomic_t values, and a write of this file
will set atomic_t values. will set atomic_t values.
Another option is exporting a block of arbitrary binary data, with Another option is exporting a block of arbitrary binary data, with
this structure and function: this structure and function::
struct debugfs_blob_wrapper { struct debugfs_blob_wrapper {
void *data; void *data;
...@@ -151,7 +158,7 @@ If you want to dump a block of registers (something that happens quite ...@@ -151,7 +158,7 @@ If you want to dump a block of registers (something that happens quite
often during development, even if little such code reaches mainline. often during development, even if little such code reaches mainline.
Debugfs offers two functions: one to make a registers-only file, and Debugfs offers two functions: one to make a registers-only file, and
another to insert a register block in the middle of another sequential another to insert a register block in the middle of another sequential
file. file::
struct debugfs_reg32 { struct debugfs_reg32 {
char *name; char *name;
...@@ -175,7 +182,7 @@ The "base" argument may be 0, but you may want to build the reg32 array ...@@ -175,7 +182,7 @@ The "base" argument may be 0, but you may want to build the reg32 array
using __stringify, and a number of register names (macros) are actually using __stringify, and a number of register names (macros) are actually
byte offsets over a base for the register block. byte offsets over a base for the register block.
If you want to dump an u32 array in debugfs, you can create file with: If you want to dump an u32 array in debugfs, you can create file with::
void debugfs_create_u32_array(const char *name, umode_t mode, void debugfs_create_u32_array(const char *name, umode_t mode,
struct dentry *parent, struct dentry *parent,
...@@ -185,7 +192,7 @@ The "array" argument provides data, and the "elements" argument is ...@@ -185,7 +192,7 @@ The "array" argument provides data, and the "elements" argument is
the number of elements in the array. Note: Once array is created its the number of elements in the array. Note: Once array is created its
size can not be changed. size can not be changed.
There is a helper function to create device related seq_file: There is a helper function to create device related seq_file::
struct dentry *debugfs_create_devm_seqfile(struct device *dev, struct dentry *debugfs_create_devm_seqfile(struct device *dev,
const char *name, const char *name,
...@@ -197,7 +204,7 @@ The "dev" argument is the device related to this debugfs file, and ...@@ -197,7 +204,7 @@ The "dev" argument is the device related to this debugfs file, and
the "read_fn" is a function pointer which to be called to print the the "read_fn" is a function pointer which to be called to print the
seq_file content. seq_file content.
There are a couple of other directory-oriented helper functions: There are a couple of other directory-oriented helper functions::
struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *debugfs_rename(struct dentry *old_dir,
struct dentry *old_dentry, struct dentry *old_dentry,
...@@ -219,7 +226,7 @@ module is unloaded without explicitly removing debugfs entries, the result ...@@ -219,7 +226,7 @@ module is unloaded without explicitly removing debugfs entries, the result
will be a lot of stale pointers and no end of highly antisocial behavior. will be a lot of stale pointers and no end of highly antisocial behavior.
So all debugfs users - at least those which can be built as modules - must So all debugfs users - at least those which can be built as modules - must
be prepared to remove all files and directories they create there. A file be prepared to remove all files and directories they create there. A file
can be removed with: can be removed with::
void debugfs_remove(struct dentry *dentry); void debugfs_remove(struct dentry *dentry);
...@@ -229,7 +236,7 @@ be removed. ...@@ -229,7 +236,7 @@ be removed.
Once upon a time, debugfs users were required to remember the dentry Once upon a time, debugfs users were required to remember the dentry
pointer for every debugfs file they created so that all files could be pointer for every debugfs file they created so that all files could be
cleaned up. We live in more civilized times now, though, and debugfs users cleaned up. We live in more civilized times now, though, and debugfs users
can call: can call::
void debugfs_remove_recursive(struct dentry *dentry); void debugfs_remove_recursive(struct dentry *dentry);
...@@ -237,5 +244,4 @@ If this function is passed a pointer for the dentry corresponding to the ...@@ -237,5 +244,4 @@ If this function is passed a pointer for the dentry corresponding to the
top-level directory, the entire hierarchy below that directory will be top-level directory, the entire hierarchy below that directory will be
removed. removed.
Notes: .. [1] http://lwn.net/Articles/309298/
[1] http://lwn.net/Articles/309298/
dlmfs .. SPDX-License-Identifier: GPL-2.0
================== .. include:: <isonum.txt>
=====
DLMFS
=====
A minimal DLM userspace interface implemented via a virtual file A minimal DLM userspace interface implemented via a virtual file
system. system.
dlmfs is built with OCFS2 as it requires most of its infrastructure. dlmfs is built with OCFS2 as it requires most of its infrastructure.
Project web page: http://ocfs2.wiki.kernel.org :Project web page: http://ocfs2.wiki.kernel.org
Tools web page: https://github.com/markfasheh/ocfs2-tools :Tools web page: https://github.com/markfasheh/ocfs2-tools
OCFS2 mailing lists: http://oss.oracle.com/projects/ocfs2/mailman/ :OCFS2 mailing lists: http://oss.oracle.com/projects/ocfs2/mailman/
All code copyright 2005 Oracle except when otherwise noted. All code copyright 2005 Oracle except when otherwise noted.
CREDITS Credits
======= =======
Some code taken from ramfs which is Copyright (C) 2000 Linus Torvalds Some code taken from ramfs which is Copyright |copy| 2000 Linus Torvalds
and Transmeta Corp. and Transmeta Corp.
Mark Fasheh <mark.fasheh@oracle.com> Mark Fasheh <mark.fasheh@oracle.com>
...@@ -96,14 +101,19 @@ operation. If the lock succeeds, you'll get an fd. ...@@ -96,14 +101,19 @@ operation. If the lock succeeds, you'll get an fd.
open(2) with O_CREAT to ensure the resource inode is created - dlmfs does open(2) with O_CREAT to ensure the resource inode is created - dlmfs does
not automatically create inodes for existing lock resources. not automatically create inodes for existing lock resources.
============ ===========================
Open Flag Lock Request Type Open Flag Lock Request Type
--------- ----------------- ============ ===========================
O_RDONLY Shared Read O_RDONLY Shared Read
O_RDWR Exclusive O_RDWR Exclusive
============ ===========================
============ ===========================
Open Flag Resulting Locking Behavior Open Flag Resulting Locking Behavior
--------- -------------------------- ============ ===========================
O_NONBLOCK Trylock operation O_NONBLOCK Trylock operation
============ ===========================
You must provide exactly one of O_RDONLY or O_RDWR. You must provide exactly one of O_RDONLY or O_RDWR.
......
.. SPDX-License-Identifier: GPL-2.0
======================================================
eCryptfs: A stacked cryptographic filesystem for Linux eCryptfs: A stacked cryptographic filesystem for Linux
======================================================
eCryptfs is free software. Please see the file COPYING for details. eCryptfs is free software. Please see the file COPYING for details.
For documentation, please see the files in the doc/ subdirectory. For For documentation, please see the files in the doc/ subdirectory. For
building and installation instructions please see the INSTALL file. building and installation instructions please see the INSTALL file.
Maintainer: Phillip Hellewell :Maintainer: Phillip Hellewell
Lead developer: Michael A. Halcrow <mhalcrow@us.ibm.com> :Lead developer: Michael A. Halcrow <mhalcrow@us.ibm.com>
Developers: Michael C. Thompson :Developers: Michael C. Thompson
Kent Yoder Kent Yoder
Web Site: http://ecryptfs.sf.net :Web Site: http://ecryptfs.sf.net
This software is currently undergoing development. Make sure to This software is currently undergoing development. Make sure to
maintain a backup copy of any data you write into eCryptfs. maintain a backup copy of any data you write into eCryptfs.
...@@ -19,34 +23,36 @@ SourceForge site: ...@@ -19,34 +23,36 @@ SourceForge site:
http://sourceforge.net/projects/ecryptfs/ http://sourceforge.net/projects/ecryptfs/
Userspace requirements include: Userspace requirements include:
- David Howells' userspace keyring headers and libraries (version
- David Howells' userspace keyring headers and libraries (version
1.0 or higher), obtainable from 1.0 or higher), obtainable from
http://people.redhat.com/~dhowells/keyutils/ http://people.redhat.com/~dhowells/keyutils/
- Libgcrypt - Libgcrypt
NOTES .. note::
In the beta/experimental releases of eCryptfs, when you upgrade In the beta/experimental releases of eCryptfs, when you upgrade
eCryptfs, you should copy the files to an unencrypted location and eCryptfs, you should copy the files to an unencrypted location and
then copy the files back into the new eCryptfs mount to migrate the then copy the files back into the new eCryptfs mount to migrate the
files. files.
MOUNT-WIDE PASSPHRASE Mount-wide Passphrase
=====================
Create a new directory into which eCryptfs will write its encrypted Create a new directory into which eCryptfs will write its encrypted
files (i.e., /root/crypt). Then, create the mount point directory files (i.e., /root/crypt). Then, create the mount point directory
(i.e., /mnt/crypt). Now it's time to mount eCryptfs: (i.e., /mnt/crypt). Now it's time to mount eCryptfs::
mount -t ecryptfs /root/crypt /mnt/crypt mount -t ecryptfs /root/crypt /mnt/crypt
You should be prompted for a passphrase and a salt (the salt may be You should be prompted for a passphrase and a salt (the salt may be
blank). blank).
Try writing a new file: Try writing a new file::
echo "Hello, World" > /mnt/crypt/hello.txt echo "Hello, World" > /mnt/crypt/hello.txt
The operation will complete. Notice that there is a new file in The operation will complete. Notice that there is a new file in
/root/crypt that is at least 12288 bytes in size (depending on your /root/crypt that is at least 12288 bytes in size (depending on your
...@@ -59,10 +65,13 @@ keyctl clear @u ...@@ -59,10 +65,13 @@ keyctl clear @u
Then umount /mnt/crypt and mount again per the instructions given Then umount /mnt/crypt and mount again per the instructions given
above. above.
cat /mnt/crypt/hello.txt ::
cat /mnt/crypt/hello.txt
NOTES Notes
=====
eCryptfs version 0.1 should only be mounted on (1) empty directories eCryptfs version 0.1 should only be mounted on (1) empty directories
or (2) directories containing files only created by eCryptfs. If you or (2) directories containing files only created by eCryptfs. If you
......
.. SPDX-License-Identifier: GPL-2.0
=======================================
efivarfs - a (U)EFI variable filesystem efivarfs - a (U)EFI variable filesystem
=======================================
The efivarfs filesystem was created to address the shortcomings of The efivarfs filesystem was created to address the shortcomings of
using entries in sysfs to maintain EFI variables. The old sysfs EFI using entries in sysfs to maintain EFI variables. The old sysfs EFI
...@@ -11,7 +14,7 @@ than a single page, sysfs isn't the best interface for this. ...@@ -11,7 +14,7 @@ than a single page, sysfs isn't the best interface for this.
Variables can be created, deleted and modified with the efivarfs Variables can be created, deleted and modified with the efivarfs
filesystem. filesystem.
efivarfs is typically mounted like this, efivarfs is typically mounted like this::
mount -t efivarfs none /sys/firmware/efi/efivars mount -t efivarfs none /sys/firmware/efi/efivars
......
.. SPDX-License-Identifier: GPL-2.0
======================================
Enhanced Read-Only File System - EROFS
======================================
Overview Overview
======== ========
...@@ -6,6 +12,7 @@ from other read-only file systems, it aims to be designed for flexibility, ...@@ -6,6 +12,7 @@ from other read-only file systems, it aims to be designed for flexibility,
scalability, but be kept simple and high performance. scalability, but be kept simple and high performance.
It is designed as a better filesystem solution for the following scenarios: It is designed as a better filesystem solution for the following scenarios:
- read-only storage media or - read-only storage media or
- part of a fully trusted read-only solution, which means it needs to be - part of a fully trusted read-only solution, which means it needs to be
...@@ -17,6 +24,7 @@ It is designed as a better filesystem solution for the following scenarios: ...@@ -17,6 +24,7 @@ It is designed as a better filesystem solution for the following scenarios:
for those embedded devices with limited memory (ex, smartphone); for those embedded devices with limited memory (ex, smartphone);
Here is the main features of EROFS: Here is the main features of EROFS:
- Little endian on-disk design; - Little endian on-disk design;
- Currently 4KB block size (nobh) and therefore maximum 16TB address space; - Currently 4KB block size (nobh) and therefore maximum 16TB address space;
...@@ -24,13 +32,17 @@ Here is the main features of EROFS: ...@@ -24,13 +32,17 @@ Here is the main features of EROFS:
- Metadata & data could be mixed by design; - Metadata & data could be mixed by design;
- 2 inode versions for different requirements: - 2 inode versions for different requirements:
===================== ============ =====================================
compact (v1) extended (v2) compact (v1) extended (v2)
Inode metadata size: 32 bytes 64 bytes ===================== ============ =====================================
Max file size: 4 GB 16 EB (also limited by max. vol size) Inode metadata size 32 bytes 64 bytes
Max uids/gids: 65536 4294967296 Max file size 4 GB 16 EB (also limited by max. vol size)
File change time: no yes (64 + 32-bit timestamp) Max uids/gids 65536 4294967296
Max hardlinks: 65536 4294967296 File change time no yes (64 + 32-bit timestamp)
Metadata reserved: 4 bytes 14 bytes Max hardlinks 65536 4294967296
Metadata reserved 4 bytes 14 bytes
===================== ============ =====================================
- Support extended attributes (xattrs) as an option; - Support extended attributes (xattrs) as an option;
...@@ -43,29 +55,36 @@ Here is the main features of EROFS: ...@@ -43,29 +55,36 @@ Here is the main features of EROFS:
The following git tree provides the file system user-space tools under The following git tree provides the file system user-space tools under
development (ex, formatting tool mkfs.erofs): development (ex, formatting tool mkfs.erofs):
>> git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git
- git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git
Bugs and patches are welcome, please kindly help us and send to the following Bugs and patches are welcome, please kindly help us and send to the following
linux-erofs mailing list: linux-erofs mailing list:
>> linux-erofs mailing list <linux-erofs@lists.ozlabs.org>
- linux-erofs mailing list <linux-erofs@lists.ozlabs.org>
Mount options Mount options
============= =============
=================== =========================================================
(no)user_xattr Setup Extended User Attributes. Note: xattr is enabled (no)user_xattr Setup Extended User Attributes. Note: xattr is enabled
by default if CONFIG_EROFS_FS_XATTR is selected. by default if CONFIG_EROFS_FS_XATTR is selected.
(no)acl Setup POSIX Access Control List. Note: acl is enabled (no)acl Setup POSIX Access Control List. Note: acl is enabled
by default if CONFIG_EROFS_FS_POSIX_ACL is selected. by default if CONFIG_EROFS_FS_POSIX_ACL is selected.
cache_strategy=%s Select a strategy for cached decompression from now on: cache_strategy=%s Select a strategy for cached decompression from now on:
disabled: In-place I/O decompression only;
readahead: Cache the last incomplete compressed physical ========== =============================================
disabled In-place I/O decompression only;
readahead Cache the last incomplete compressed physical
cluster for further reading. It still does cluster for further reading. It still does
in-place I/O decompression for the rest in-place I/O decompression for the rest
compressed physical clusters; compressed physical clusters;
readaround: Cache the both ends of incomplete compressed readaround Cache the both ends of incomplete compressed
physical clusters for further reading. physical clusters for further reading.
It still does in-place I/O decompression It still does in-place I/O decompression
for the rest compressed physical clusters. for the rest compressed physical clusters.
========== =============================================
=================== =========================================================
On-disk details On-disk details
=============== ===============
...@@ -73,7 +92,7 @@ On-disk details ...@@ -73,7 +92,7 @@ On-disk details
Summary Summary
------- -------
Different from other read-only file systems, an EROFS volume is designed Different from other read-only file systems, an EROFS volume is designed
to be as simple as possible: to be as simple as possible::
|-> aligned with the block size |-> aligned with the block size
____________________________________________________________ ____________________________________________________________
...@@ -83,13 +102,17 @@ to be as simple as possible: ...@@ -83,13 +102,17 @@ to be as simple as possible:
All data areas should be aligned with the block size, but metadata areas All data areas should be aligned with the block size, but metadata areas
may not. All metadatas can be now observed in two different spaces (views): may not. All metadatas can be now observed in two different spaces (views):
1. Inode metadata space 1. Inode metadata space
Each valid inode should be aligned with an inode slot, which is a fixed Each valid inode should be aligned with an inode slot, which is a fixed
value (32 bytes) and designed to be kept in line with compact inode size. value (32 bytes) and designed to be kept in line with compact inode size.
Each inode can be directly found with the following formula: Each inode can be directly found with the following formula:
inode offset = meta_blkaddr * block_size + 32 * nid inode offset = meta_blkaddr * block_size + 32 * nid
::
|-> aligned with 8B |-> aligned with 8B
|-> followed closely |-> followed closely
+ meta_blkaddr blocks |-> another slot + meta_blkaddr blocks |-> another slot
...@@ -117,7 +140,7 @@ may not. All metadatas can be now observed in two different spaces (views): ...@@ -117,7 +140,7 @@ may not. All metadatas can be now observed in two different spaces (views):
|-> aligned with 4B |-> aligned with 4B
Inode could be 32 or 64 bytes, which can be distinguished from a common Inode could be 32 or 64 bytes, which can be distinguished from a common
field which all inode versions have -- i_format: field which all inode versions have -- i_format::
__________________ __________________ __________________ __________________
| i_format | | i_format | | i_format | | i_format |
...@@ -132,16 +155,19 @@ may not. All metadatas can be now observed in two different spaces (views): ...@@ -132,16 +155,19 @@ may not. All metadatas can be now observed in two different spaces (views):
proper alignment, and they could be optional for different data mappings. proper alignment, and they could be optional for different data mappings.
_currently_ total 4 valid data mappings are supported: _currently_ total 4 valid data mappings are supported:
== ====================================================================
0 flat file data without data inline (no extent); 0 flat file data without data inline (no extent);
1 fixed-sized output data compression (with non-compacted indexes); 1 fixed-sized output data compression (with non-compacted indexes);
2 flat file data with tail packing data inline (no extent); 2 flat file data with tail packing data inline (no extent);
3 fixed-sized output data compression (with compacted indexes, v5.3+). 3 fixed-sized output data compression (with compacted indexes, v5.3+).
== ====================================================================
The size of the optional xattrs is indicated by i_xattr_count in inode The size of the optional xattrs is indicated by i_xattr_count in inode
header. Large xattrs or xattrs shared by many different files can be header. Large xattrs or xattrs shared by many different files can be
stored in shared xattrs metadata rather than inlined right after inode. stored in shared xattrs metadata rather than inlined right after inode.
2. Shared xattrs metadata space 2. Shared xattrs metadata space
Shared xattrs space is similar to the above inode space, started with Shared xattrs space is similar to the above inode space, started with
a specific block indicated by xattr_blkaddr, organized one by one with a specific block indicated by xattr_blkaddr, organized one by one with
proper align. proper align.
...@@ -149,6 +175,8 @@ may not. All metadatas can be now observed in two different spaces (views): ...@@ -149,6 +175,8 @@ may not. All metadatas can be now observed in two different spaces (views):
Each share xattr can also be directly found by the following formula: Each share xattr can also be directly found by the following formula:
xattr offset = xattr_blkaddr * block_size + 4 * xattr_id xattr offset = xattr_blkaddr * block_size + 4 * xattr_id
::
|-> aligned by 4 bytes |-> aligned by 4 bytes
+ xattr_blkaddr blocks |-> aligned with 4 bytes + xattr_blkaddr blocks |-> aligned with 4 bytes
_________________________________________________________________________ _________________________________________________________________________
...@@ -163,13 +191,15 @@ random file lookup, and all directory entries are _strictly_ recorded in ...@@ -163,13 +191,15 @@ random file lookup, and all directory entries are _strictly_ recorded in
alphabetical order in order to support improved prefix binary search alphabetical order in order to support improved prefix binary search
algorithm (could refer to the related source code). algorithm (could refer to the related source code).
::
___________________________ ___________________________
/ | / |
/ ______________|________________ / ______________|________________
/ / | nameoff1 | nameoffN-1 / / | nameoff1 | nameoffN-1
____________.______________._______________v________________v__________ ____________.______________._______________v________________v__________
| dirent | dirent | ... | dirent | filename | filename | ... | filename | | dirent | dirent | ... | dirent | filename | filename | ... | filename |
|___.0___|____1___|_____|___N-1__|____0_____|____1_____|_____|___N-1____| |___.0___|____1___|_____|___N-1__|____0_____|____1_____|_____|___N-1____|
\ ^ \ ^
\ | * could have \ | * could have
\ | trailing '\0' \ | trailing '\0'
...@@ -184,14 +214,14 @@ introduce another on-disk field at all. ...@@ -184,14 +214,14 @@ introduce another on-disk field at all.
Compression Compression
----------- -----------
Currently, EROFS supports 4KB fixed-sized output transparent file compression, Currently, EROFS supports 4KB fixed-sized output transparent file compression,
as illustrated below: as illustrated below::
|---- Variant-Length Extent ----|-------- VLE --------|----- VLE ----- |---- Variant-Length Extent ----|-------- VLE --------|----- VLE -----
clusterofs clusterofs clusterofs clusterofs clusterofs clusterofs
| | | logical data | | | logical data
_________v_______________________________v_____________________v_______________ _________v_______________________________v_____________________v_______________
... | . | | . | | . | ... ... | . | | . | | . | ...
____|____.________|_____________|________.____|_____________|__.__________|____ ____|____.________|_____________|________.____|_____________|__.__________|____
|-> cluster <-|-> cluster <-|-> cluster <-|-> cluster <-|-> cluster <-| |-> cluster <-|-> cluster <-|-> cluster <-|-> cluster <-|-> cluster <-|
size size size size size size size size size size
. . . . . . . .
...@@ -208,4 +238,3 @@ at most. For each logical cluster, there is a corresponding on-disk index to ...@@ -208,4 +238,3 @@ at most. For each logical cluster, there is a corresponding on-disk index to
describe its cluster type, physical cluster address, etc. describe its cluster type, physical cluster address, etc.
See "struct z_erofs_vle_decompressed_index" in erofs_fs.h for more details. See "struct z_erofs_vle_decompressed_index" in erofs_fs.h for more details.
.. SPDX-License-Identifier: GPL-2.0
The Second Extended Filesystem The Second Extended Filesystem
============================== ==============================
...@@ -14,8 +16,9 @@ Options ...@@ -14,8 +16,9 @@ Options
Most defaults are determined by the filesystem superblock, and can be Most defaults are determined by the filesystem superblock, and can be
set using tune2fs(8). Kernel-determined defaults are indicated by (*). set using tune2fs(8). Kernel-determined defaults are indicated by (*).
bsddf (*) Makes `df' act like BSD. ==================== === ================================================
minixdf Makes `df' act like Minix. bsddf (*) Makes ``df`` act like BSD.
minixdf Makes ``df`` act like Minix.
check=none, nocheck (*) Don't do extra checking of bitmaps on mount check=none, nocheck (*) Don't do extra checking of bitmaps on mount
(check=normal and check=strict options removed) (check=normal and check=strict options removed)
...@@ -62,6 +65,7 @@ quota, usrquota Enable user disk quota support ...@@ -62,6 +65,7 @@ quota, usrquota Enable user disk quota support
grpquota Enable group disk quota support grpquota Enable group disk quota support
(requires CONFIG_QUOTA). (requires CONFIG_QUOTA).
==================== === ================================================
noquota option ls silently ignored by ext2. noquota option ls silently ignored by ext2.
...@@ -294,9 +298,9 @@ respective fsck programs. ...@@ -294,9 +298,9 @@ respective fsck programs.
If you're exceptionally paranoid, there are 3 ways of making metadata If you're exceptionally paranoid, there are 3 ways of making metadata
writes synchronous on ext2: writes synchronous on ext2:
per-file if you have the program source: use the O_SYNC flag to open() - per-file if you have the program source: use the O_SYNC flag to open()
per-file if you don't have the source: use "chattr +S" on the file - per-file if you don't have the source: use "chattr +S" on the file
per-filesystem: add the "sync" option to mount (or in /etc/fstab) - per-filesystem: add the "sync" option to mount (or in /etc/fstab)
the first and last are not ext2 specific but do force the metadata to the first and last are not ext2 specific but do force the metadata to
be written synchronously. See also Journaling below. be written synchronously. See also Journaling below.
...@@ -316,10 +320,12 @@ Most of these limits could be overcome with slight changes in the on-disk ...@@ -316,10 +320,12 @@ Most of these limits could be overcome with slight changes in the on-disk
format and using a compatibility flag to signal the format change (at format and using a compatibility flag to signal the format change (at
the expense of some compatibility). the expense of some compatibility).
Filesystem block size: 1kB 2kB 4kB 8kB ===================== ======= ======= ======= ========
Filesystem block size 1kB 2kB 4kB 8kB
File size limit: 16GB 256GB 2048GB 2048GB ===================== ======= ======= ======= ========
Filesystem size limit: 2047GB 8192GB 16384GB 32768GB File size limit 16GB 256GB 2048GB 2048GB
Filesystem size limit 2047GB 8192GB 16384GB 32768GB
===================== ======= ======= ======= ========
There is a 2.4 kernel limit of 2048GB for a single block device, so no There is a 2.4 kernel limit of 2048GB for a single block device, so no
filesystem larger than that can be created at this time. There is also filesystem larger than that can be created at this time. There is also
...@@ -370,19 +376,24 @@ ext4 and journaling. ...@@ -370,19 +376,24 @@ ext4 and journaling.
References References
========== ==========
======================= ===============================================
The kernel source file:/usr/src/linux/fs/ext2/ The kernel source file:/usr/src/linux/fs/ext2/
e2fsprogs (e2fsck) http://e2fsprogs.sourceforge.net/ e2fsprogs (e2fsck) http://e2fsprogs.sourceforge.net/
Design & Implementation http://e2fsprogs.sourceforge.net/ext2intro.html Design & Implementation http://e2fsprogs.sourceforge.net/ext2intro.html
Journaling (ext3) ftp://ftp.uk.linux.org/pub/linux/sct/fs/jfs/ Journaling (ext3) ftp://ftp.uk.linux.org/pub/linux/sct/fs/jfs/
Filesystem Resizing http://ext2resize.sourceforge.net/ Filesystem Resizing http://ext2resize.sourceforge.net/
Compression (*) http://e2compr.sourceforge.net/ Compression [1]_ http://e2compr.sourceforge.net/
======================= ===============================================
Implementations for: Implementations for:
======================= ===========================================================
Windows 95/98/NT/2000 http://www.chrysocome.net/explore2fs Windows 95/98/NT/2000 http://www.chrysocome.net/explore2fs
Windows 95 (*) http://www.yipton.net/content.html#FSDEXT2 Windows 95 [1]_ http://www.yipton.net/content.html#FSDEXT2
DOS client (*) ftp://metalab.unc.edu/pub/Linux/system/filesystems/ext2/ DOS client [1]_ ftp://metalab.unc.edu/pub/Linux/system/filesystems/ext2/
OS/2 (+) ftp://metalab.unc.edu/pub/Linux/system/filesystems/ext2/ OS/2 [2]_ ftp://metalab.unc.edu/pub/Linux/system/filesystems/ext2/
RISC OS client http://www.esw-heim.tu-clausthal.de/~marco/smorbrod/IscaFS/ RISC OS client http://www.esw-heim.tu-clausthal.de/~marco/smorbrod/IscaFS/
======================= ===========================================================
(*) no longer actively developed/supported (as of Apr 2001) .. [1] no longer actively developed/supported (as of Apr 2001)
(+) no longer actively developed/supported (as of Mar 2009) .. [2] no longer actively developed/supported (as of Mar 2009)
.. SPDX-License-Identifier: GPL-2.0
===============
Ext3 Filesystem Ext3 Filesystem
=============== ===============
......
.. SPDX-License-Identifier: GPL-2.0 .. SPDX-License-Identifier: GPL-2.0
==============
====
FUSE FUSE
============== ====
Definitions Definitions
=========== ===========
......
uevents and GFS2 .. SPDX-License-Identifier: GPL-2.0
==================
================
uevents and GFS2
================
During the lifetime of a GFS2 mount, a number of uevents are generated. During the lifetime of a GFS2 mount, a number of uevents are generated.
This document explains what the events are and what they are used This document explains what the events are and what they are used
for (by gfs_controld in gfs2-utils). for (by gfs_controld in gfs2-utils).
A list of GFS2 uevents A list of GFS2 uevents
----------------------- ======================
1. ADD 1. ADD
------
The ADD event occurs at mount time. It will always be the first The ADD event occurs at mount time. It will always be the first
uevent generated by the newly created filesystem. If the mount uevent generated by the newly created filesystem. If the mount
...@@ -21,6 +25,7 @@ with no journal assigned), and read-only (with journal assigned) status ...@@ -21,6 +25,7 @@ with no journal assigned), and read-only (with journal assigned) status
of the filesystem respectively. of the filesystem respectively.
2. ONLINE 2. ONLINE
---------
The ONLINE uevent is generated after a successful mount or remount. It The ONLINE uevent is generated after a successful mount or remount. It
has the same environment variables as the ADD uevent. The ONLINE has the same environment variables as the ADD uevent. The ONLINE
...@@ -29,6 +34,7 @@ RDONLY are a relatively recent addition (2.6.32-rc+) and will not ...@@ -29,6 +34,7 @@ RDONLY are a relatively recent addition (2.6.32-rc+) and will not
be generated by older kernels. be generated by older kernels.
3. CHANGE 3. CHANGE
---------
The CHANGE uevent is used in two places. One is when reporting the The CHANGE uevent is used in two places. One is when reporting the
successful mount of the filesystem by the first node (FIRSTMOUNT=Done). successful mount of the filesystem by the first node (FIRSTMOUNT=Done).
...@@ -52,6 +58,7 @@ cluster. For this reason the ONLINE uevent was used when adding a new ...@@ -52,6 +58,7 @@ cluster. For this reason the ONLINE uevent was used when adding a new
uevent for a successful mount or remount. uevent for a successful mount or remount.
4. OFFLINE 4. OFFLINE
----------
The OFFLINE uevent is only generated due to filesystem errors and is used The OFFLINE uevent is only generated due to filesystem errors and is used
as part of the "withdraw" mechanism. Currently this doesn't give any as part of the "withdraw" mechanism. Currently this doesn't give any
...@@ -59,6 +66,7 @@ information about what the error is, which is something that needs to ...@@ -59,6 +66,7 @@ information about what the error is, which is something that needs to
be fixed. be fixed.
5. REMOVE 5. REMOVE
---------
The REMOVE uevent is generated at the end of an unsuccessful mount The REMOVE uevent is generated at the end of an unsuccessful mount
or at the end of a umount of the filesystem. All REMOVE uevents will or at the end of a umount of the filesystem. All REMOVE uevents will
...@@ -68,9 +76,10 @@ kobject subsystem. ...@@ -68,9 +76,10 @@ kobject subsystem.
Information common to all GFS2 uevents (uevent environment variables) Information common to all GFS2 uevents (uevent environment variables)
---------------------------------------------------------------------- =====================================================================
1. LOCKTABLE= 1. LOCKTABLE=
--------------
The LOCKTABLE is a string, as supplied on the mount command The LOCKTABLE is a string, as supplied on the mount command
line (locktable=) or via fstab. It is used as a filesystem label line (locktable=) or via fstab. It is used as a filesystem label
...@@ -78,6 +87,7 @@ as well as providing the information for a lock_dlm mount to be ...@@ -78,6 +87,7 @@ as well as providing the information for a lock_dlm mount to be
able to join the cluster. able to join the cluster.
2. LOCKPROTO= 2. LOCKPROTO=
-------------
The LOCKPROTO is a string, and its value depends on what is set The LOCKPROTO is a string, and its value depends on what is set
on the mount command line, or via fstab. It will be either on the mount command line, or via fstab. It will be either
...@@ -85,12 +95,14 @@ lock_nolock or lock_dlm. In the future other lock managers ...@@ -85,12 +95,14 @@ lock_nolock or lock_dlm. In the future other lock managers
may be supported. may be supported.
3. JOURNALID= 3. JOURNALID=
-------------
If a journal is in use by the filesystem (journals are not If a journal is in use by the filesystem (journals are not
assigned for spectator mounts) then this will give the assigned for spectator mounts) then this will give the
numeric journal id in all GFS2 uevents. numeric journal id in all GFS2 uevents.
4. UUID= 4. UUID=
--------
With recent versions of gfs2-utils, mkfs.gfs2 writes a UUID With recent versions of gfs2-utils, mkfs.gfs2 writes a UUID
into the filesystem superblock. If it exists, this will into the filesystem superblock. If it exists, this will
......
.. SPDX-License-Identifier: GPL-2.0
==================
Global File System Global File System
------------------ ==================
https://fedorahosted.org/cluster/wiki/HomePage https://fedorahosted.org/cluster/wiki/HomePage
...@@ -14,16 +17,18 @@ on one machine show up immediately on all other machines in the cluster. ...@@ -14,16 +17,18 @@ on one machine show up immediately on all other machines in the cluster.
GFS uses interchangeable inter-node locking mechanisms, the currently GFS uses interchangeable inter-node locking mechanisms, the currently
supported mechanisms are: supported mechanisms are:
lock_nolock -- allows gfs to be used as a local file system lock_nolock
- allows gfs to be used as a local file system
lock_dlm -- uses a distributed lock manager (dlm) for inter-node locking lock_dlm
- uses a distributed lock manager (dlm) for inter-node locking.
The dlm is found at linux/fs/dlm/ The dlm is found at linux/fs/dlm/
Lock_dlm depends on user space cluster management systems found Lock_dlm depends on user space cluster management systems found
at the URL above. at the URL above.
To use gfs as a local file system, no external clustering systems are To use gfs as a local file system, no external clustering systems are
needed, simply: needed, simply::
$ mkfs -t gfs2 -p lock_nolock -j 1 /dev/block_device $ mkfs -t gfs2 -p lock_nolock -j 1 /dev/block_device
$ mount -t gfs2 /dev/block_device /dir $ mount -t gfs2 /dev/block_device /dir
...@@ -37,9 +42,12 @@ GFS2 is not on-disk compatible with previous versions of GFS, but it ...@@ -37,9 +42,12 @@ GFS2 is not on-disk compatible with previous versions of GFS, but it
is pretty close. is pretty close.
The following man pages can be found at the URL above: The following man pages can be found at the URL above:
============ =============================================
fsck.gfs2 to repair a filesystem fsck.gfs2 to repair a filesystem
gfs2_grow to expand a filesystem online gfs2_grow to expand a filesystem online
gfs2_jadd to add journals to a filesystem online gfs2_jadd to add journals to a filesystem online
tunegfs2 to manipulate, examine and tune a filesystem tunegfs2 to manipulate, examine and tune a filesystem
gfs2_convert to convert a gfs filesystem to gfs2 in-place gfs2_convert to convert a gfs filesystem to gfs2 in-place
mkfs.gfs2 to make a filesystem mkfs.gfs2 to make a filesystem
============ =============================================
Note: This filesystem doesn't have a maintainer. .. SPDX-License-Identifier: GPL-2.0
==================================
Macintosh HFS Filesystem for Linux Macintosh HFS Filesystem for Linux
================================== ==================================
HFS stands for ``Hierarchical File System'' and is the filesystem used
.. Note:: This filesystem doesn't have a maintainer.
HFS stands for ``Hierarchical File System`` and is the filesystem used
by the Mac Plus and all later Macintosh models. Earlier Macintosh by the Mac Plus and all later Macintosh models. Earlier Macintosh
models used MFS (``Macintosh File System''), which is not supported, models used MFS (``Macintosh File System``), which is not supported,
MacOS 8.1 and newer support a filesystem called HFS+ that's similar to MacOS 8.1 and newer support a filesystem called HFS+ that's similar to
HFS but is extended in various areas. Use the hfsplus filesystem driver HFS but is extended in various areas. Use the hfsplus filesystem driver
to access such filesystems from Linux. to access such filesystems from Linux.
...@@ -49,25 +54,25 @@ Writing to HFS Filesystems ...@@ -49,25 +54,25 @@ Writing to HFS Filesystems
HFS is not a UNIX filesystem, thus it does not have the usual features you'd HFS is not a UNIX filesystem, thus it does not have the usual features you'd
expect: expect:
o You can't modify the set-uid, set-gid, sticky or executable bits or the uid * You can't modify the set-uid, set-gid, sticky or executable bits or the uid
and gid of files. and gid of files.
o You can't create hard- or symlinks, device files, sockets or FIFOs. * You can't create hard- or symlinks, device files, sockets or FIFOs.
HFS does on the other have the concepts of multiple forks per file. These HFS does on the other have the concepts of multiple forks per file. These
non-standard forks are represented as hidden additional files in the normal non-standard forks are represented as hidden additional files in the normal
filesystems namespace which is kind of a cludge and makes the semantics for filesystems namespace which is kind of a cludge and makes the semantics for
the a little strange: the a little strange:
o You can't create, delete or rename resource forks of files or the * You can't create, delete or rename resource forks of files or the
Finder's metadata. Finder's metadata.
o They are however created (with default values), deleted and renamed * They are however created (with default values), deleted and renamed
along with the corresponding data fork or directory. along with the corresponding data fork or directory.
o Copying files to a different filesystem will loose those attributes * Copying files to a different filesystem will loose those attributes
that are essential for MacOS to work. that are essential for MacOS to work.
Creating HFS filesystems Creating HFS filesystems
=================================== ========================
The hfsutils package from Robert Leslie contains a program called The hfsutils package from Robert Leslie contains a program called
hformat that can be used to create HFS filesystem. See hformat that can be used to create HFS filesystem. See
......
.. SPDX-License-Identifier: GPL-2.0
======================================
Macintosh HFSPlus Filesystem for Linux Macintosh HFSPlus Filesystem for Linux
====================================== ======================================
......
.. SPDX-License-Identifier: GPL-2.0
====================
Read/Write HPFS 2.09 Read/Write HPFS 2.09
====================
1998-2004, Mikulas Patocka 1998-2004, Mikulas Patocka
email: mikulas@artax.karlin.mff.cuni.cz :email: mikulas@artax.karlin.mff.cuni.cz
homepage: http://artax.karlin.mff.cuni.cz/~mikulas/vyplody/hpfs/index-e.cgi :homepage: http://artax.karlin.mff.cuni.cz/~mikulas/vyplody/hpfs/index-e.cgi
CREDITS: Credits
=======
Chris Smith, 1993, original read-only HPFS, some code and hpfs structures file Chris Smith, 1993, original read-only HPFS, some code and hpfs structures file
is taken from it is taken from it
Jacques Gelinas, MSDos mmap, Inspired by fs/nfs/mmap.c (Jon Tombs 15 Aug 1993) Jacques Gelinas, MSDos mmap, Inspired by fs/nfs/mmap.c (Jon Tombs 15 Aug 1993)
Werner Almesberger, 1992, 1993, MSDos option parser & CR/LF conversion Werner Almesberger, 1992, 1993, MSDos option parser & CR/LF conversion
Mount options Mount options
...@@ -50,6 +58,7 @@ timeshift=(-)nnn (default 0) ...@@ -50,6 +58,7 @@ timeshift=(-)nnn (default 0)
File names File names
==========
As in OS/2, filenames are case insensitive. However, shell thinks that names As in OS/2, filenames are case insensitive. However, shell thinks that names
are case sensitive, so for example when you create a file FOO, you can use are case sensitive, so for example when you create a file FOO, you can use
...@@ -64,6 +73,7 @@ access it under names 'a.', 'a..', 'a . . . ' etc. ...@@ -64,6 +73,7 @@ access it under names 'a.', 'a..', 'a . . . ' etc.
Extended attributes Extended attributes
===================
On HPFS partitions, OS/2 can associate to each file a special information called On HPFS partitions, OS/2 can associate to each file a special information called
extended attributes. Extended attributes are pairs of (key,value) where key is extended attributes. Extended attributes are pairs of (key,value) where key is
...@@ -88,6 +98,7 @@ values doesn't work. ...@@ -88,6 +98,7 @@ values doesn't work.
Symlinks Symlinks
========
You can do symlinks on HPFS partition, symlinks are achieved by setting extended You can do symlinks on HPFS partition, symlinks are achieved by setting extended
attribute named "SYMLINK" with symlink value. Like on ext2, you can chown and attribute named "SYMLINK" with symlink value. Like on ext2, you can chown and
...@@ -101,6 +112,7 @@ to analyze or change OS2SYS.INI. ...@@ -101,6 +112,7 @@ to analyze or change OS2SYS.INI.
Codepages Codepages
=========
HPFS can contain several uppercasing tables for several codepages and each HPFS can contain several uppercasing tables for several codepages and each
file has a pointer to codepage its name is in. However OS/2 was created in file has a pointer to codepage its name is in. However OS/2 was created in
...@@ -128,6 +140,7 @@ this codepage - if you don't try to do what I described above :-) ...@@ -128,6 +140,7 @@ this codepage - if you don't try to do what I described above :-)
Known bugs Known bugs
==========
HPFS386 on OS/2 server is not supported. HPFS386 installed on normal OS/2 client HPFS386 on OS/2 server is not supported. HPFS386 installed on normal OS/2 client
should work. If you have OS/2 server, use only read-only mode. I don't know how should work. If you have OS/2 server, use only read-only mode. I don't know how
...@@ -152,7 +165,8 @@ would result in directory tree splitting, that takes disk space. Workaround is ...@@ -152,7 +165,8 @@ would result in directory tree splitting, that takes disk space. Workaround is
to delete other files that are leaf (probability that the file is non-leaf is to delete other files that are leaf (probability that the file is non-leaf is
about 1/50) or to truncate file first to make some space. about 1/50) or to truncate file first to make some space.
You encounter this problem only if you have many directories so that You encounter this problem only if you have many directories so that
preallocated directory band is full i.e. preallocated directory band is full i.e.::
number_of_directories / size_of_filesystem_in_mb > 4. number_of_directories / size_of_filesystem_in_mb > 4.
You can't delete open directories. You can't delete open directories.
...@@ -174,6 +188,7 @@ anybody know what does it mean? ...@@ -174,6 +188,7 @@ anybody know what does it mean?
What does "unbalanced tree" message mean? What does "unbalanced tree" message mean?
=========================================
Old versions of this driver created sometimes unbalanced dnode trees. OS/2 Old versions of this driver created sometimes unbalanced dnode trees. OS/2
chkdsk doesn't scream if the tree is unbalanced (and sometimes creates chkdsk doesn't scream if the tree is unbalanced (and sometimes creates
...@@ -187,6 +202,7 @@ whole created by this driver, it is BUG - let me know about it. ...@@ -187,6 +202,7 @@ whole created by this driver, it is BUG - let me know about it.
Bugs in OS/2 Bugs in OS/2
============
When you have two (or more) lost directories pointing each to other, chkdsk When you have two (or more) lost directories pointing each to other, chkdsk
locks up when repairing filesystem. locks up when repairing filesystem.
...@@ -199,13 +215,16 @@ File names like "a .b" are marked as 'long' by OS/2 but chkdsk "corrects" it and ...@@ -199,13 +215,16 @@ File names like "a .b" are marked as 'long' by OS/2 but chkdsk "corrects" it and
marks them as short (and writes "minor fs error corrected"). This bug is not in marks them as short (and writes "minor fs error corrected"). This bug is not in
HPFS386. HPFS386.
Codepage bugs described above. Codepage bugs described above
=============================
If you don't install fixpacks, there are many, many more... If you don't install fixpacks, there are many, many more...
History History
=======
====== =========================================================================
0.90 First public release 0.90 First public release
0.91 Fixed bug that caused shooting to memory when write_inode was called on 0.91 Fixed bug that caused shooting to memory when write_inode was called on
open inode (rarely happened) open inode (rarely happened)
...@@ -219,78 +238,116 @@ History ...@@ -219,78 +238,116 @@ History
1.91 Fixed a bug that chk_sectors failed when sectors were at the end of disk 1.91 Fixed a bug that chk_sectors failed when sectors were at the end of disk
Fixed a race-condition when write_inode is called while deleting file Fixed a race-condition when write_inode is called while deleting file
Fixed a bug that could possibly happen (with very low probability) when Fixed a bug that could possibly happen (with very low probability) when
using 0xff in filenames using 0xff in filenames.
Rewritten locking to avoid race-conditions Rewritten locking to avoid race-conditions
Mount option 'eas' now works Mount option 'eas' now works
Fsync no longer returns error Fsync no longer returns error
Files beginning with '.' are marked hidden Files beginning with '.' are marked hidden
Remount support added Remount support added
Alloc is not so slow when filesystem becomes full Alloc is not so slow when filesystem becomes full
Atimes are no more updated because it slows down operation Atimes are no more updated because it slows down operation
Code cleanup (removed all commented debug prints) Code cleanup (removed all commented debug prints)
1.92 Corrected a bug when sync was called just before closing file 1.92 Corrected a bug when sync was called just before closing file
1.93 Modified, so that it works with kernels >= 2.1.131, I don't know if it 1.93 Modified, so that it works with kernels >= 2.1.131, I don't know if it
works with previous versions works with previous versions
Fixed a possible problem with disks > 64G (but I don't have one, so I can't Fixed a possible problem with disks > 64G (but I don't have one, so I can't
test it) test it)
Fixed a file overflow at 2G Fixed a file overflow at 2G
Added new option 'timeshift' Added new option 'timeshift'
Changed behaviour on HPFS386: It is now possible to operate on HPFS386 in Changed behaviour on HPFS386: It is now possible to operate on HPFS386 in
read-only mode read-only mode
Fixed a bug that slowed down alloc and prevented allocating 100% space Fixed a bug that slowed down alloc and prevented allocating 100% space
(this bug was not destructive) (this bug was not destructive)
1.94 Added workaround for one bug in Linux 1.94 Added workaround for one bug in Linux
Fixed one buffer leak Fixed one buffer leak
Fixed some incompatibilities with large extended attributes (but it's still Fixed some incompatibilities with large extended attributes (but it's still
not 100% ok, I have no info on it and OS/2 doesn't want to create them) not 100% ok, I have no info on it and OS/2 doesn't want to create them)
Rewritten allocation Rewritten allocation
Fixed a bug with i_blocks (du sometimes didn't display correct values) Fixed a bug with i_blocks (du sometimes didn't display correct values)
Directories have no longer archive attribute set (some programs don't like Directories have no longer archive attribute set (some programs don't like
it) it)
Fixed a bug that it set badly one flag in large anode tree (it was not Fixed a bug that it set badly one flag in large anode tree (it was not
destructive) destructive)
1.95 Fixed one buffer leak, that could happen on corrupted filesystem 1.95 Fixed one buffer leak, that could happen on corrupted filesystem
Fixed one bug in allocation in 1.94 Fixed one bug in allocation in 1.94
1.96 Added workaround for one bug in OS/2 (HPFS locked up, HPFS386 reported 1.96 Added workaround for one bug in OS/2 (HPFS locked up, HPFS386 reported
error sometimes when opening directories in PMSHELL) error sometimes when opening directories in PMSHELL)
Fixed a possible bitmap race Fixed a possible bitmap race
Fixed possible problem on large disks Fixed possible problem on large disks
You can now delete open files You can now delete open files
Fixed a nondestructive race in rename Fixed a nondestructive race in rename
1.97 Support for HPFS v3 (on large partitions) 1.97 Support for HPFS v3 (on large partitions)
Fixed a bug that it didn't allow creation of files > 128M (it should be 2G)
ZFixed a bug that it didn't allow creation of files > 128M
(it should be 2G)
1.97.1 Changed names of global symbols 1.97.1 Changed names of global symbols
Fixed a bug when chmoding or chowning root directory Fixed a bug when chmoding or chowning root directory
1.98 Fixed a deadlock when using old_readdir 1.98 Fixed a deadlock when using old_readdir
Better directory handling; workaround for "unbalanced tree" bug in OS/2 Better directory handling; workaround for "unbalanced tree" bug in OS/2
1.99 Corrected a possible problem when there's not enough space while deleting 1.99 Corrected a possible problem when there's not enough space while deleting
file file
Now it tries to truncate the file if there's not enough space when deleting
Now it tries to truncate the file if there's not enough space when
deleting
Removed a lot of redundant code Removed a lot of redundant code
2.00 Fixed a bug in rename (it was there since 1.96) 2.00 Fixed a bug in rename (it was there since 1.96)
Better anti-fragmentation strategy Better anti-fragmentation strategy
2.01 Fixed problem with directory listing over NFS 2.01 Fixed problem with directory listing over NFS
Directory lseek now checks for proper parameters Directory lseek now checks for proper parameters
Fixed race-condition in buffer code - it is in all filesystems in Linux; Fixed race-condition in buffer code - it is in all filesystems in Linux;
when reading device (cat /dev/hda) while creating files on it, files when reading device (cat /dev/hda) while creating files on it, files
could be damaged could be damaged
2.02 Workaround for bug in breada in Linux. breada could cause accesses beyond 2.02 Workaround for bug in breada in Linux. breada could cause accesses beyond
end of partition end of partition
2.03 Char, block devices and pipes are correctly created 2.03 Char, block devices and pipes are correctly created
Fixed non-crashing race in unlink (Alexander Viro) Fixed non-crashing race in unlink (Alexander Viro)
Now it works with Japanese version of OS/2 Now it works with Japanese version of OS/2
2.04 Fixed error when ftruncate used to extend file 2.04 Fixed error when ftruncate used to extend file
2.05 Fixed crash when got mount parameters without = 2.05 Fixed crash when got mount parameters without =
Fixed crash when allocation of anode failed due to full disk Fixed crash when allocation of anode failed due to full disk
Fixed some crashes when block io or inode allocation failed Fixed some crashes when block io or inode allocation failed
2.06 Fixed some crash on corrupted disk structures 2.06 Fixed some crash on corrupted disk structures
Better allocation strategy Better allocation strategy
Reschedule points added so that it doesn't lock CPU long time Reschedule points added so that it doesn't lock CPU long time
It should work in read-only mode on Warp Server It should work in read-only mode on Warp Server
2.07 More fixes for Warp Server. Now it really works 2.07 More fixes for Warp Server. Now it really works
2.08 Creating new files is not so slow on large disks 2.08 Creating new files is not so slow on large disks
An attempt to sync deleted file does not generate filesystem error An attempt to sync deleted file does not generate filesystem error
2.09 Fixed error on extremely fragmented files 2.09 Fixed error on extremely fragmented files
====== =========================================================================
vim: set textwidth=80:
.. _filesystems_index:
=============================== ===============================
Filesystems in the Linux kernel Filesystems in the Linux kernel
=============================== ===============================
...@@ -46,8 +48,53 @@ Documentation for filesystem implementations. ...@@ -46,8 +48,53 @@ Documentation for filesystem implementations.
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
9p
adfs
affs
afs
autofs autofs
autofs-mount-control
befs
bfs
btrfs
ceph
cramfs
debugfs
dlmfs
ecryptfs
efivarfs
erofs
ext2
ext3
f2fs
gfs2
gfs2-uevents
hfs
hfsplus
hpfs
fuse fuse
inotify
isofs
nilfs2
nfs/index
ntfs
ocfs2
ocfs2-online-filecheck
omfs
orangefs
overlayfs overlayfs
proc
qnx6
ramfs-rootfs-initramfs
relay
romfs
squashfs
sysfs
sysv-fs
tmpfs
ubifs
ubifs-authentication.rst
udf
virtiofs virtiofs
vfat vfat
zonefs
inotify .. SPDX-License-Identifier: GPL-2.0
a powerful yet simple file change notification system
===============================================================
Inotify - A Powerful yet Simple File Change Notification System
===============================================================
Document started 15 Mar 2005 by Robert Love <rml@novell.com> Document started 15 Mar 2005 by Robert Love <rml@novell.com>
Document updated 4 Jan 2015 by Zhang Zhen <zhenzhang.zhang@huawei.com> Document updated 4 Jan 2015 by Zhang Zhen <zhenzhang.zhang@huawei.com>
--Deleted obsoleted interface, just refer to manpages for user interface.
- Deleted obsoleted interface, just refer to manpages for user interface.
(i) Rationale (i) Rationale
Q: What is the design decision behind not tying the watch to the open fd of Q:
What is the design decision behind not tying the watch to the open fd of
the watched object? the watched object?
A: Watches are associated with an open inotify device, not an open file. A:
Watches are associated with an open inotify device, not an open file.
This solves the primary problem with dnotify: keeping the file open pins This solves the primary problem with dnotify: keeping the file open pins
the file and thus, worse, pins the mount. Dnotify is therefore infeasible the file and thus, worse, pins the mount. Dnotify is therefore infeasible
for use on a desktop system with removable media as the media cannot be for use on a desktop system with removable media as the media cannot be
unmounted. Watching a file should not require that it be open. unmounted. Watching a file should not require that it be open.
Q: What is the design decision behind using an-fd-per-instance as opposed to Q:
What is the design decision behind using an-fd-per-instance as opposed to
an fd-per-watch? an fd-per-watch?
A: An fd-per-watch quickly consumes more file descriptors than are allowed, A:
An fd-per-watch quickly consumes more file descriptors than are allowed,
more fd's than are feasible to manage, and more fd's than are optimally more fd's than are feasible to manage, and more fd's than are optimally
select()-able. Yes, root can bump the per-process fd limit and yes, users select()-able. Yes, root can bump the per-process fd limit and yes, users
can use epoll, but requiring both is a silly and extraneous requirement. can use epoll, but requiring both is a silly and extraneous requirement.
...@@ -65,9 +74,11 @@ A: An fd-per-watch quickly consumes more file descriptors than are allowed, ...@@ -65,9 +74,11 @@ A: An fd-per-watch quickly consumes more file descriptors than are allowed,
need not be a one-fd-per-process mapping; it is one-fd-per-queue and a need not be a one-fd-per-process mapping; it is one-fd-per-queue and a
process can easily want more than one queue. process can easily want more than one queue.
Q: Why the system call approach? Q:
Why the system call approach?
A: The poor user-space interface is the second biggest problem with dnotify. A:
The poor user-space interface is the second biggest problem with dnotify.
Signals are a terrible, terrible interface for file notification. Or for Signals are a terrible, terrible interface for file notification. Or for
anything, for that matter. The ideal solution, from all perspectives, is a anything, for that matter. The ideal solution, from all perspectives, is a
file descriptor-based one that allows basic file I/O and poll/select. file descriptor-based one that allows basic file I/O and poll/select.
......
.. SPDX-License-Identifier: GPL-2.0
==================
ISO9660 Filesystem
==================
Mount options that are the same as for msdos and vfat partitions. Mount options that are the same as for msdos and vfat partitions.
========= ========================================================
gid=nnn All files in the partition will be in group nnn. gid=nnn All files in the partition will be in group nnn.
uid=nnn All files in the partition will be owned by user id nnn. uid=nnn All files in the partition will be owned by user id nnn.
umask=nnn The permission mask (see umask(1)) for the partition. umask=nnn The permission mask (see umask(1)) for the partition.
========= ========================================================
Mount options that are the same as vfat partitions. These are only useful Mount options that are the same as vfat partitions. These are only useful
when using discs encoded using Microsoft's Joliet extensions. when using discs encoded using Microsoft's Joliet extensions.
============== =============================================================
iocharset=name Character set to use for converting from Unicode to iocharset=name Character set to use for converting from Unicode to
ASCII. Joliet filenames are stored in Unicode format, but ASCII. Joliet filenames are stored in Unicode format, but
Unix for the most part doesn't know how to deal with Unicode. Unix for the most part doesn't know how to deal with Unicode.
There is also an option of doing UTF-8 translations with the There is also an option of doing UTF-8 translations with the
utf8 option. utf8 option.
utf8 Encode Unicode names in UTF-8 format. Default is no. utf8 Encode Unicode names in UTF-8 format. Default is no.
============== =============================================================
Mount options unique to the isofs filesystem. Mount options unique to the isofs filesystem.
================= ============================================================
block=512 Set the block size for the disk to 512 bytes block=512 Set the block size for the disk to 512 bytes
block=1024 Set the block size for the disk to 1024 bytes block=1024 Set the block size for the disk to 1024 bytes
block=2048 Set the block size for the disk to 2048 bytes block=2048 Set the block size for the disk to 2048 bytes
...@@ -39,10 +52,13 @@ Mount options unique to the isofs filesystem. ...@@ -39,10 +52,13 @@ Mount options unique to the isofs filesystem.
recreate previous unhide behavior recreate previous unhide behavior
session=x Select number of session on multisession CD session=x Select number of session on multisession CD
sbsector=xxx Session begins from sector xxx sbsector=xxx Session begins from sector xxx
================= ============================================================
Recommended documents about ISO 9660 standard are located at: Recommended documents about ISO 9660 standard are located at:
http://www.y-adagio.com/
ftp://ftp.ecma.ch/ecma-st/Ecma-119.pdf - http://www.y-adagio.com/
- ftp://ftp.ecma.ch/ecma-st/Ecma-119.pdf
Quoting from the PDF "This 2nd Edition of Standard ECMA-119 is technically Quoting from the PDF "This 2nd Edition of Standard ECMA-119 is technically
identical with ISO 9660.", so it is a valid and gratis substitute of the identical with ISO 9660.", so it is a valid and gratis substitute of the
official ISO specification. official ISO specification.
===============================
NFS
===============================
.. toctree::
:maxdepth: 1
pnfs
rpc-cache
rpc-server-gss
nfs41-server
knfsd-stats
============================
Kernel NFS Server Statistics Kernel NFS Server Statistics
============================ ============================
:Authors: Greg Banks <gnb@sgi.com> - 26 Mar 2009
This document describes the format and semantics of the statistics This document describes the format and semantics of the statistics
which the kernel NFS server makes available to userspace. These which the kernel NFS server makes available to userspace. These
statistics are available in several text form pseudo files, each of statistics are available in several text form pseudo files, each of
...@@ -18,7 +20,7 @@ by parsing routines. All other lines contain a sequence of fields ...@@ -18,7 +20,7 @@ by parsing routines. All other lines contain a sequence of fields
separated by whitespace. separated by whitespace.
/proc/fs/nfsd/pool_stats /proc/fs/nfsd/pool_stats
------------------------ ========================
This file is available in kernels from 2.6.30 onwards, if the This file is available in kernels from 2.6.30 onwards, if the
/proc/fs/nfsd filesystem is mounted (it almost always should be). /proc/fs/nfsd filesystem is mounted (it almost always should be).
...@@ -109,15 +111,12 @@ this case), or the transport can be enqueued for later attention ...@@ -109,15 +111,12 @@ this case), or the transport can be enqueued for later attention
(sockets-enqueued counts this case), or the packet can be temporarily (sockets-enqueued counts this case), or the packet can be temporarily
deferred because the transport is currently being used by an nfsd deferred because the transport is currently being used by an nfsd
thread. This last case is not very interesting and is not explicitly thread. This last case is not very interesting and is not explicitly
counted, but can be inferred from the other counters thus: counted, but can be inferred from the other counters thus::
packets-deferred = packets-arrived - ( sockets-enqueued + threads-woken ) packets-deferred = packets-arrived - ( sockets-enqueued + threads-woken )
More More
---- ====
Descriptions of the other statistics file should go here.
Greg Banks <gnb@sgi.com> Descriptions of the other statistics file should go here.
26 Mar 2009
This diff is collapsed.
NFSv4.1 Server Implementation
Server support for minorversion 1 can be controlled using the
/proc/fs/nfsd/versions control file. The string output returned
by reading this file will contain either "+4.1" or "-4.1"
correspondingly.
Currently, server support for minorversion 1 is enabled by default.
It can be disabled at run time by writing the string "-4.1" to
the /proc/fs/nfsd/versions control file. Note that to write this
control file, the nfsd service must be taken down. You can use rpc.nfsd
for this; see rpc.nfsd(8).
(Warning: older servers will interpret "+4.1" and "-4.1" as "+4" and
"-4", respectively. Therefore, code meant to work on both new and old
kernels must turn 4.1 on or off *before* turning support for version 4
on or off; rpc.nfsd does this correctly.)
The NFSv4 minorversion 1 (NFSv4.1) implementation in nfsd is based
on RFC 5661.
From the many new features in NFSv4.1 the current implementation
focuses on the mandatory-to-implement NFSv4.1 Sessions, providing
"exactly once" semantics and better control and throttling of the
resources allocated for each client.
The table below, taken from the NFSv4.1 document, lists
the operations that are mandatory to implement (REQ), optional
(OPT), and NFSv4.0 operations that are required not to implement (MNI)
in minor version 1. The first column indicates the operations that
are not supported yet by the linux server implementation.
The OPTIONAL features identified and their abbreviations are as follows:
pNFS Parallel NFS
FDELG File Delegations
DDELG Directory Delegations
The following abbreviations indicate the linux server implementation status.
I Implemented NFSv4.1 operations.
NS Not Supported.
NS* Unimplemented optional feature.
Operations
+----------------------+------------+--------------+----------------+
| Operation | REQ, REC, | Feature | Definition |
| | OPT, or | (REQ, REC, | |
| | MNI | or OPT) | |
+----------------------+------------+--------------+----------------+
| ACCESS | REQ | | Section 18.1 |
I | BACKCHANNEL_CTL | REQ | | Section 18.33 |
I | BIND_CONN_TO_SESSION | REQ | | Section 18.34 |
| CLOSE | REQ | | Section 18.2 |
| COMMIT | REQ | | Section 18.3 |
| CREATE | REQ | | Section 18.4 |
I | CREATE_SESSION | REQ | | Section 18.36 |
NS*| DELEGPURGE | OPT | FDELG (REQ) | Section 18.5 |
| DELEGRETURN | OPT | FDELG, | Section 18.6 |
| | | DDELG, pNFS | |
| | | (REQ) | |
I | DESTROY_CLIENTID | REQ | | Section 18.50 |
I | DESTROY_SESSION | REQ | | Section 18.37 |
I | EXCHANGE_ID | REQ | | Section 18.35 |
I | FREE_STATEID | REQ | | Section 18.38 |
| GETATTR | REQ | | Section 18.7 |
I | GETDEVICEINFO | OPT | pNFS (REQ) | Section 18.40 |
NS*| GETDEVICELIST | OPT | pNFS (OPT) | Section 18.41 |
| GETFH | REQ | | Section 18.8 |
NS*| GET_DIR_DELEGATION | OPT | DDELG (REQ) | Section 18.39 |
I | LAYOUTCOMMIT | OPT | pNFS (REQ) | Section 18.42 |
I | LAYOUTGET | OPT | pNFS (REQ) | Section 18.43 |
I | LAYOUTRETURN | OPT | pNFS (REQ) | Section 18.44 |
| LINK | OPT | | Section 18.9 |
| LOCK | REQ | | Section 18.10 |
| LOCKT | REQ | | Section 18.11 |
| LOCKU | REQ | | Section 18.12 |
| LOOKUP | REQ | | Section 18.13 |
| LOOKUPP | REQ | | Section 18.14 |
| NVERIFY | REQ | | Section 18.15 |
| OPEN | REQ | | Section 18.16 |
NS*| OPENATTR | OPT | | Section 18.17 |
| OPEN_CONFIRM | MNI | | N/A |
| OPEN_DOWNGRADE | REQ | | Section 18.18 |
| PUTFH | REQ | | Section 18.19 |
| PUTPUBFH | REQ | | Section 18.20 |
| PUTROOTFH | REQ | | Section 18.21 |
| READ | REQ | | Section 18.22 |
| READDIR | REQ | | Section 18.23 |
| READLINK | OPT | | Section 18.24 |
| RECLAIM_COMPLETE | REQ | | Section 18.51 |
| RELEASE_LOCKOWNER | MNI | | N/A |
| REMOVE | REQ | | Section 18.25 |
| RENAME | REQ | | Section 18.26 |
| RENEW | MNI | | N/A |
| RESTOREFH | REQ | | Section 18.27 |
| SAVEFH | REQ | | Section 18.28 |
| SECINFO | REQ | | Section 18.29 |
I | SECINFO_NO_NAME | REC | pNFS files | Section 18.45, |
| | | layout (REQ) | Section 13.12 |
I | SEQUENCE | REQ | | Section 18.46 |
| SETATTR | REQ | | Section 18.30 |
| SETCLIENTID | MNI | | N/A |
| SETCLIENTID_CONFIRM | MNI | | N/A |
NS | SET_SSV | REQ | | Section 18.47 |
I | TEST_STATEID | REQ | | Section 18.48 |
| VERIFY | REQ | | Section 18.31 |
NS*| WANT_DELEGATION | OPT | FDELG (OPT) | Section 18.49 |
| WRITE | REQ | | Section 18.32 |
Callback Operations
+-------------------------+-----------+-------------+---------------+
| Operation | REQ, REC, | Feature | Definition |
| | OPT, or | (REQ, REC, | |
| | MNI | or OPT) | |
+-------------------------+-----------+-------------+---------------+
| CB_GETATTR | OPT | FDELG (REQ) | Section 20.1 |
I | CB_LAYOUTRECALL | OPT | pNFS (REQ) | Section 20.3 |
NS*| CB_NOTIFY | OPT | DDELG (REQ) | Section 20.4 |
NS*| CB_NOTIFY_DEVICEID | OPT | pNFS (OPT) | Section 20.12 |
NS*| CB_NOTIFY_LOCK | OPT | | Section 20.11 |
NS*| CB_PUSH_DELEG | OPT | FDELG (OPT) | Section 20.5 |
| CB_RECALL | OPT | FDELG, | Section 20.2 |
| | | DDELG, pNFS | |
| | | (REQ) | |
NS*| CB_RECALL_ANY | OPT | FDELG, | Section 20.6 |
| | | DDELG, pNFS | |
| | | (REQ) | |
NS | CB_RECALL_SLOT | REQ | | Section 20.8 |
NS*| CB_RECALLABLE_OBJ_AVAIL | OPT | DDELG, pNFS | Section 20.7 |
| | | (REQ) | |
I | CB_SEQUENCE | OPT | FDELG, | Section 20.9 |
| | | DDELG, pNFS | |
| | | (REQ) | |
NS*| CB_WANTS_CANCELLED | OPT | FDELG, | Section 20.10 |
| | | DDELG, pNFS | |
| | | (REQ) | |
+-------------------------+-----------+-------------+---------------+
Implementation notes:
SSV:
* The spec claims this is mandatory, but we don't actually know of any
implementations, so we're ignoring it for now. The server returns
NFS4ERR_ENCR_ALG_UNSUPP on EXCHANGE_ID, which should be future-proof.
GSS on the backchannel:
* Again, theoretically required but not widely implemented (in
particular, the current Linux client doesn't request it). We return
NFS4ERR_ENCR_ALG_UNSUPP on CREATE_SESSION.
DELEGPURGE:
* mandatory only for servers that support CLAIM_DELEGATE_PREV and/or
CLAIM_DELEG_PREV_FH (which allows clients to keep delegations that
persist across client reboots). Thus we need not implement this for
now.
EXCHANGE_ID:
* implementation ids are ignored
CREATE_SESSION:
* backchannel attributes are ignored
SEQUENCE:
* no support for dynamic slot table renegotiation (optional)
Nonstandard compound limitations:
* No support for a sessions fore channel RPC compound that requires both a
ca_maxrequestsize request and a ca_maxresponsesize reply, so we may
fail to live up to the promise we made in CREATE_SESSION fore channel
negotiation.
See also http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues.
.. SPDX-License-Identifier: GPL-2.0
:orphan: :orphan:
.. UBIFS Authentication .. UBIFS Authentication
...@@ -92,11 +94,11 @@ UBIFS Index & Tree Node Cache ...@@ -92,11 +94,11 @@ UBIFS Index & Tree Node Cache
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Basic on-flash UBIFS entities are called *nodes*. UBIFS knows different types Basic on-flash UBIFS entities are called *nodes*. UBIFS knows different types
of nodes. Eg. data nodes (`struct ubifs_data_node`) which store chunks of file of nodes. Eg. data nodes (``struct ubifs_data_node``) which store chunks of file
contents or inode nodes (`struct ubifs_ino_node`) which represent VFS inodes. contents or inode nodes (``struct ubifs_ino_node``) which represent VFS inodes.
Almost all types of nodes share a common header (`ubifs_ch`) containing basic Almost all types of nodes share a common header (``ubifs_ch``) containing basic
information like node type, node length, a sequence number, etc. (see information like node type, node length, a sequence number, etc. (see
`fs/ubifs/ubifs-media.h`in kernel source). Exceptions are entries of the LPT ``fs/ubifs/ubifs-media.h`` in kernel source). Exceptions are entries of the LPT
and some less important node types like padding nodes which are used to pad and some less important node types like padding nodes which are used to pad
unusable content at the end of LEBs. unusable content at the end of LEBs.
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment