aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r--Documentation/filesystems/Locking2
-rw-r--r--Documentation/filesystems/afs.txt214
-rw-r--r--Documentation/filesystems/proc.txt47
-rw-r--r--Documentation/filesystems/vfat.txt7
-rw-r--r--Documentation/filesystems/vfs.txt23
5 files changed, 217 insertions, 76 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index 28bfea75bcf2..59c14159cc47 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -15,6 +15,7 @@ prototypes:
15 int (*d_delete)(struct dentry *); 15 int (*d_delete)(struct dentry *);
16 void (*d_release)(struct dentry *); 16 void (*d_release)(struct dentry *);
17 void (*d_iput)(struct dentry *, struct inode *); 17 void (*d_iput)(struct dentry *, struct inode *);
18 char *(*d_dname)((struct dentry *dentry, char *buffer, int buflen);
18 19
19locking rules: 20locking rules:
20 none have BKL 21 none have BKL
@@ -25,6 +26,7 @@ d_compare: no yes no no
25d_delete: yes no yes no 26d_delete: yes no yes no
26d_release: no no no yes 27d_release: no no no yes
27d_iput: no no no yes 28d_iput: no no no yes
29d_dname: no no no no
28 30
29--------------------------- inode_operations --------------------------- 31--------------------------- inode_operations ---------------------------
30prototypes: 32prototypes:
diff --git a/Documentation/filesystems/afs.txt b/Documentation/filesystems/afs.txt
index 2f4237dfb8c7..12ad6c7f4e50 100644
--- a/Documentation/filesystems/afs.txt
+++ b/Documentation/filesystems/afs.txt
@@ -1,31 +1,82 @@
1 ====================
1 kAFS: AFS FILESYSTEM 2 kAFS: AFS FILESYSTEM
2 ==================== 3 ====================
3 4
4ABOUT 5Contents:
5===== 6
7 - Overview.
8 - Usage.
9 - Mountpoints.
10 - Proc filesystem.
11 - The cell database.
12 - Security.
13 - Examples.
14
15
16========
17OVERVIEW
18========
6 19
7This filesystem provides a fairly simple AFS filesystem driver. It is under 20This filesystem provides a fairly simple secure AFS filesystem driver. It is
8development and only provides very basic facilities. It does not yet support 21under development and does not yet provide the full feature set. The features
9the following AFS features: 22it does support include:
10 23
11 (*) Write support. 24 (*) Security (currently only AFS kaserver and KerberosIV tickets).
12 (*) Communications security.
13 (*) Local caching.
14 (*) pioctl() system call.
15 (*) Automatic mounting of embedded mountpoints.
16 25
26 (*) File reading.
17 27
28 (*) Automounting.
29
30It does not yet support the following AFS features:
31
32 (*) Write support.
33
34 (*) Local caching.
35
36 (*) pioctl() system call.
37
38
39===========
40COMPILATION
41===========
42
43The filesystem should be enabled by turning on the kernel configuration
44options:
45
46 CONFIG_AF_RXRPC - The RxRPC protocol transport
47 CONFIG_RXKAD - The RxRPC Kerberos security handler
48 CONFIG_AFS - The AFS filesystem
49
50Additionally, the following can be turned on to aid debugging:
51
52 CONFIG_AF_RXRPC_DEBUG - Permit AF_RXRPC debugging to be enabled
53 CONFIG_AFS_DEBUG - Permit AFS debugging to be enabled
54
55They permit the debugging messages to be turned on dynamically by manipulating
56the masks in the following files:
57
58 /sys/module/af_rxrpc/parameters/debug
59 /sys/module/afs/parameters/debug
60
61
62=====
18USAGE 63USAGE
19===== 64=====
20 65
21When inserting the driver modules the root cell must be specified along with a 66When inserting the driver modules the root cell must be specified along with a
22list of volume location server IP addresses: 67list of volume location server IP addresses:
23 68
24 insmod rxrpc.o 69 insmod af_rxrpc.o
70 insmod rxkad.o
25 insmod kafs.o rootcell=cambridge.redhat.com:172.16.18.73:172.16.18.91 71 insmod kafs.o rootcell=cambridge.redhat.com:172.16.18.73:172.16.18.91
26 72
27The first module is a driver for the RxRPC remote operation protocol, and the 73The first module is the AF_RXRPC network protocol driver. This provides the
28second is the actual filesystem driver for the AFS filesystem. 74RxRPC remote operation protocol and may also be accessed from userspace. See:
75
76 Documentation/networking/rxrpc.txt
77
78The second module is the kerberos RxRPC security driver, and the third module
79is the actual filesystem driver for the AFS filesystem.
29 80
30Once the module has been loaded, more modules can be added by the following 81Once the module has been loaded, more modules can be added by the following
31procedure: 82procedure:
@@ -33,7 +84,7 @@ procedure:
33 echo add grand.central.org 18.7.14.88:128.2.191.224 >/proc/fs/afs/cells 84 echo add grand.central.org 18.7.14.88:128.2.191.224 >/proc/fs/afs/cells
34 85
35Where the parameters to the "add" command are the name of a cell and a list of 86Where the parameters to the "add" command are the name of a cell and a list of
36volume location servers within that cell. 87volume location servers within that cell, with the latter separated by colons.
37 88
38Filesystems can be mounted anywhere by commands similar to the following: 89Filesystems can be mounted anywhere by commands similar to the following:
39 90
@@ -42,11 +93,6 @@ Filesystems can be mounted anywhere by commands similar to the following:
42 mount -t afs "#root.afs." /afs 93 mount -t afs "#root.afs." /afs
43 mount -t afs "#root.cell." /afs/cambridge 94 mount -t afs "#root.cell." /afs/cambridge
44 95
45 NB: When using this on Linux 2.4, the mount command has to be different,
46 since the filesystem doesn't have access to the device name argument:
47
48 mount -t afs none /afs -ovol="#root.afs."
49
50Where the initial character is either a hash or a percent symbol depending on 96Where the initial character is either a hash or a percent symbol depending on
51whether you definitely want a R/W volume (hash) or whether you'd prefer a R/O 97whether you definitely want a R/W volume (hash) or whether you'd prefer a R/O
52volume, but are willing to use a R/W volume instead (percent). 98volume, but are willing to use a R/W volume instead (percent).
@@ -60,55 +106,66 @@ named volume will be looked up in the cell specified during insmod.
60Additional cells can be added through /proc (see later section). 106Additional cells can be added through /proc (see later section).
61 107
62 108
109===========
63MOUNTPOINTS 110MOUNTPOINTS
64=========== 111===========
65 112
66AFS has a concept of mountpoints. These are specially formatted symbolic links 113AFS has a concept of mountpoints. In AFS terms, these are specially formatted
67(of the same form as the "device name" passed to mount). kAFS presents these 114symbolic links (of the same form as the "device name" passed to mount). kAFS
68to the user as directories that have special properties: 115presents these to the user as directories that have a follow-link capability
116(ie: symbolic link semantics). If anyone attempts to access them, they will
117automatically cause the target volume to be mounted (if possible) on that site.
69 118
70 (*) They cannot be listed. Running a program like "ls" on them will incur an 119Automatically mounted filesystems will be automatically unmounted approximately
71 EREMOTE error (Object is remote). 120twenty minutes after they were last used. Alternatively they can be unmounted
121directly with the umount() system call.
72 122
73 (*) Other objects can't be looked up inside of them. This also incurs an 123Manually unmounting an AFS volume will cause any idle submounts upon it to be
74 EREMOTE error. 124culled first. If all are culled, then the requested volume will also be
125unmounted, otherwise error EBUSY will be returned.
75 126
76 (*) They can be queried with the readlink() system call, which will return 127This can be used by the administrator to attempt to unmount the whole AFS tree
77 the name of the mountpoint to which they point. The "readlink" program 128mounted on /afs in one go by doing:
78 will also work.
79 129
80 (*) They can be mounted on (which symbolic links can't). 130 umount /afs
81 131
82 132
133===============
83PROC FILESYSTEM 134PROC FILESYSTEM
84=============== 135===============
85 136
86The rxrpc module creates a number of files in various places in the /proc
87filesystem:
88
89 (*) Firstly, some information files are made available in a directory called
90 "/proc/net/rxrpc/". These list the extant transport endpoint, peer,
91 connection and call records.
92
93 (*) Secondly, some control files are made available in a directory called
94 "/proc/sys/rxrpc/". Currently, all these files can be used for is to
95 turn on various levels of tracing.
96
97The AFS modules creates a "/proc/fs/afs/" directory and populates it: 137The AFS modules creates a "/proc/fs/afs/" directory and populates it:
98 138
99 (*) A "cells" file that lists cells currently known to the afs module. 139 (*) A "cells" file that lists cells currently known to the afs module and
140 their usage counts:
141
142 [root@andromeda ~]# cat /proc/fs/afs/cells
143 USE NAME
144 3 cambridge.redhat.com
100 145
101 (*) A directory per cell that contains files that list volume location 146 (*) A directory per cell that contains files that list volume location
102 servers, volumes, and active servers known within that cell. 147 servers, volumes, and active servers known within that cell.
103 148
149 [root@andromeda ~]# cat /proc/fs/afs/cambridge.redhat.com/servers
150 USE ADDR STATE
151 4 172.16.18.91 0
152 [root@andromeda ~]# cat /proc/fs/afs/cambridge.redhat.com/vlservers
153 ADDRESS
154 172.16.18.91
155 [root@andromeda ~]# cat /proc/fs/afs/cambridge.redhat.com/volumes
156 USE STT VLID[0] VLID[1] VLID[2] NAME
157 1 Val 20000000 20000001 20000002 root.afs
104 158
159
160=================
105THE CELL DATABASE 161THE CELL DATABASE
106================= 162=================
107 163
108The filesystem maintains an internal database of all the cells it knows and 164The filesystem maintains an internal database of all the cells it knows and the
109the IP addresses of the volume location servers for those cells. The cell to 165IP addresses of the volume location servers for those cells. The cell to which
110which the computer belongs is added to the database when insmod is performed 166the system belongs is added to the database when insmod is performed by the
111by the "rootcell=" argument. 167"rootcell=" argument or, if compiled in, using a "kafs.rootcell=" argument on
168the kernel command line.
112 169
113Further cells can be added by commands similar to the following: 170Further cells can be added by commands similar to the following:
114 171
@@ -118,20 +175,65 @@ Further cells can be added by commands similar to the following:
118No other cell database operations are available at this time. 175No other cell database operations are available at this time.
119 176
120 177
178========
179SECURITY
180========
181
182Secure operations are initiated by acquiring a key using the klog program. A
183very primitive klog program is available at:
184
185 http://people.redhat.com/~dhowells/rxrpc/klog.c
186
187This should be compiled by:
188
189 make klog LDLIBS="-lcrypto -lcrypt -lkrb4 -lkeyutils"
190
191And then run as:
192
193 ./klog
194
195Assuming it's successful, this adds a key of type RxRPC, named for the service
196and cell, eg: "afs@<cellname>". This can be viewed with the keyctl program or
197by cat'ing /proc/keys:
198
199 [root@andromeda ~]# keyctl show
200 Session Keyring
201 -3 --alswrv 0 0 keyring: _ses.3268
202 2 --alswrv 0 0 \_ keyring: _uid.0
203 111416553 --als--v 0 0 \_ rxrpc: afs@CAMBRIDGE.REDHAT.COM
204
205Currently the username, realm, password and proposed ticket lifetime are
206compiled in to the program.
207
208It is not required to acquire a key before using AFS facilities, but if one is
209not acquired then all operations will be governed by the anonymous user parts
210of the ACLs.
211
212If a key is acquired, then all AFS operations, including mounts and automounts,
213made by a possessor of that key will be secured with that key.
214
215If a file is opened with a particular key and then the file descriptor is
216passed to a process that doesn't have that key (perhaps over an AF_UNIX
217socket), then the operations on the file will be made with key that was used to
218open the file.
219
220
221========
121EXAMPLES 222EXAMPLES
122======== 223========
123 224
124Here's what I use to test this. Some of the names and IP addresses are local 225Here's what I use to test this. Some of the names and IP addresses are local
125to my internal DNS. My "root.afs" partition has a mount point within it for 226to my internal DNS. My "root.afs" partition has a mount point within it for
126some public volumes volumes. 227some public volumes volumes.
127 228
128insmod -S /tmp/rxrpc.o 229insmod /tmp/rxrpc.o
129insmod -S /tmp/kafs.o rootcell=cambridge.redhat.com:172.16.18.73:172.16.18.91 230insmod /tmp/rxkad.o
231insmod /tmp/kafs.o rootcell=cambridge.redhat.com:172.16.18.91
130 232
131mount -t afs \%root.afs. /afs 233mount -t afs \%root.afs. /afs
132mount -t afs \%cambridge.redhat.com:root.cell. /afs/cambridge.redhat.com/ 234mount -t afs \%cambridge.redhat.com:root.cell. /afs/cambridge.redhat.com/
133 235
134echo add grand.central.org 18.7.14.88:128.2.191.224 > /proc/fs/afs/cells 236echo add grand.central.org 18.7.14.88:128.2.191.224 > /proc/fs/afs/cells
135mount -t afs "#grand.central.org:root.cell." /afs/grand.central.org/ 237mount -t afs "#grand.central.org:root.cell." /afs/grand.central.org/
136mount -t afs "#grand.central.org:root.archive." /afs/grand.central.org/archive 238mount -t afs "#grand.central.org:root.archive." /afs/grand.central.org/archive
137mount -t afs "#grand.central.org:root.contrib." /afs/grand.central.org/contrib 239mount -t afs "#grand.central.org:root.contrib." /afs/grand.central.org/contrib
@@ -141,15 +243,7 @@ mount -t afs "#grand.central.org:root.service." /afs/grand.central.org/service
141mount -t afs "#grand.central.org:root.software." /afs/grand.central.org/software 243mount -t afs "#grand.central.org:root.software." /afs/grand.central.org/software
142mount -t afs "#grand.central.org:root.user." /afs/grand.central.org/user 244mount -t afs "#grand.central.org:root.user." /afs/grand.central.org/user
143 245
144umount /afs/grand.central.org/user
145umount /afs/grand.central.org/software
146umount /afs/grand.central.org/service
147umount /afs/grand.central.org/project
148umount /afs/grand.central.org/doc
149umount /afs/grand.central.org/contrib
150umount /afs/grand.central.org/archive
151umount /afs/grand.central.org
152umount /afs/cambridge.redhat.com
153umount /afs 246umount /afs
154rmmod kafs 247rmmod kafs
248rmmod rxkad
155rmmod rxrpc 249rmmod rxrpc
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index 5484ab5efd4f..4f3e84c520a5 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -122,21 +122,22 @@ subdirectory has the entries listed in Table 1-1.
122 122
123Table 1-1: Process specific entries in /proc 123Table 1-1: Process specific entries in /proc
124.............................................................................. 124..............................................................................
125 File Content 125 File Content
126 cmdline Command line arguments 126 clear_refs Clears page referenced bits shown in smaps output
127 cpu Current and last cpu in which it was executed (2.4)(smp) 127 cmdline Command line arguments
128 cwd Link to the current working directory 128 cpu Current and last cpu in which it was executed (2.4)(smp)
129 environ Values of environment variables 129 cwd Link to the current working directory
130 exe Link to the executable of this process 130 environ Values of environment variables
131 fd Directory, which contains all file descriptors 131 exe Link to the executable of this process
132 maps Memory maps to executables and library files (2.4) 132 fd Directory, which contains all file descriptors
133 mem Memory held by this process 133 maps Memory maps to executables and library files (2.4)
134 root Link to the root directory of this process 134 mem Memory held by this process
135 stat Process status 135 root Link to the root directory of this process
136 statm Process memory status information 136 stat Process status
137 status Process status in human readable form 137 statm Process memory status information
138 wchan If CONFIG_KALLSYMS is set, a pre-decoded wchan 138 status Process status in human readable form
139 smaps Extension based on maps, presenting the rss size for each mapped file 139 wchan If CONFIG_KALLSYMS is set, a pre-decoded wchan
140 smaps Extension based on maps, the rss size for each mapped file
140.............................................................................. 141..............................................................................
141 142
142For example, to get the status information of a process, all you have to do is 143For example, to get the status information of a process, all you have to do is
@@ -1137,6 +1138,13 @@ determine whether or not they are still functioning properly.
1137Because the NMI watchdog shares registers with oprofile, by disabling the NMI 1138Because the NMI watchdog shares registers with oprofile, by disabling the NMI
1138watchdog, oprofile may have more registers to utilize. 1139watchdog, oprofile may have more registers to utilize.
1139 1140
1141maps_protect
1142------------
1143
1144Enables/Disables the protection of the per-process proc entries "maps" and
1145"smaps". When enabled, the contents of these files are visible only to
1146readers that are allowed to ptrace() the given process.
1147
1140 1148
11412.4 /proc/sys/vm - The virtual memory subsystem 11492.4 /proc/sys/vm - The virtual memory subsystem
1142----------------------------------------------- 1150-----------------------------------------------
@@ -1421,6 +1429,15 @@ fewer messages that will be written. Message_burst controls when messages will
1421be dropped. The default settings limit warning messages to one every five 1429be dropped. The default settings limit warning messages to one every five
1422seconds. 1430seconds.
1423 1431
1432warnings
1433--------
1434
1435This controls console messages from the networking stack that can occur because
1436of problems on the network like duplicate address or bad checksums. Normally,
1437this should be enabled, but if the problem persists the messages can be
1438disabled.
1439
1440
1424netdev_max_backlog 1441netdev_max_backlog
1425------------------ 1442------------------
1426 1443
diff --git a/Documentation/filesystems/vfat.txt b/Documentation/filesystems/vfat.txt
index 069cb1094300..fcc123ffa252 100644
--- a/Documentation/filesystems/vfat.txt
+++ b/Documentation/filesystems/vfat.txt
@@ -57,6 +57,13 @@ nonumtail=<bool> -- When creating 8.3 aliases, normally the alias will
57 currently exist in the directory, 'longfile.txt' will 57 currently exist in the directory, 'longfile.txt' will
58 be the short alias instead of 'longfi~1.txt'. 58 be the short alias instead of 'longfi~1.txt'.
59 59
60usefree -- Use the "free clusters" value stored on FSINFO. It'll
61 be used to determine number of free clusters without
62 scanning disk. But it's not used by default, because
63 recent Windows don't update it correctly in some
64 case. If you are sure the "free clusters" on FSINFO is
65 correct, by this option you can avoid scanning disk.
66
60quiet -- Stops printing certain warning messages. 67quiet -- Stops printing certain warning messages.
61 68
62check=s|r|n -- Case sensitivity checking setting. 69check=s|r|n -- Case sensitivity checking setting.
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index ea271f2d3954..a47cc819f37b 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -827,7 +827,7 @@ This describes how a filesystem can overload the standard dentry
827operations. Dentries and the dcache are the domain of the VFS and the 827operations. Dentries and the dcache are the domain of the VFS and the
828individual filesystem implementations. Device drivers have no business 828individual filesystem implementations. Device drivers have no business
829here. These methods may be set to NULL, as they are either optional or 829here. These methods may be set to NULL, as they are either optional or
830the VFS uses a default. As of kernel 2.6.13, the following members are 830the VFS uses a default. As of kernel 2.6.22, the following members are
831defined: 831defined:
832 832
833struct dentry_operations { 833struct dentry_operations {
@@ -837,6 +837,7 @@ struct dentry_operations {
837 int (*d_delete)(struct dentry *); 837 int (*d_delete)(struct dentry *);
838 void (*d_release)(struct dentry *); 838 void (*d_release)(struct dentry *);
839 void (*d_iput)(struct dentry *, struct inode *); 839 void (*d_iput)(struct dentry *, struct inode *);
840 char *(*d_dname)(struct dentry *, char *, int);
840}; 841};
841 842
842 d_revalidate: called when the VFS needs to revalidate a dentry. This 843 d_revalidate: called when the VFS needs to revalidate a dentry. This
@@ -859,6 +860,26 @@ struct dentry_operations {
859 VFS calls iput(). If you define this method, you must call 860 VFS calls iput(). If you define this method, you must call
860 iput() yourself 861 iput() yourself
861 862
863 d_dname: called when the pathname of a dentry should be generated.
864 Usefull for some pseudo filesystems (sockfs, pipefs, ...) to delay
865 pathname generation. (Instead of doing it when dentry is created,
866 its done only when the path is needed.). Real filesystems probably
867 dont want to use it, because their dentries are present in global
868 dcache hash, so their hash should be an invariant. As no lock is
869 held, d_dname() should not try to modify the dentry itself, unless
870 appropriate SMP safety is used. CAUTION : d_path() logic is quite
871 tricky. The correct way to return for example "Hello" is to put it
872 at the end of the buffer, and returns a pointer to the first char.
873 dynamic_dname() helper function is provided to take care of this.
874
875Example :
876
877static char *pipefs_dname(struct dentry *dent, char *buffer, int buflen)
878{
879 return dynamic_dname(dentry, buffer, buflen, "pipe:[%lu]",
880 dentry->d_inode->i_ino);
881}
882
862Each dentry has a pointer to its parent dentry, as well as a hash list 883Each dentry has a pointer to its parent dentry, as well as a hash list
863of child dentries. Child dentries are basically like files in a 884of child dentries. Child dentries are basically like files in a
864directory. 885directory.