diff options
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r-- | Documentation/filesystems/Locking | 8 | ||||
-rw-r--r-- | Documentation/filesystems/adfs.txt | 18 | ||||
-rw-r--r-- | Documentation/filesystems/exofs.txt | 10 | ||||
-rw-r--r-- | Documentation/filesystems/nfs/pnfs.txt | 7 | ||||
-rw-r--r-- | Documentation/filesystems/porting | 23 | ||||
-rw-r--r-- | Documentation/filesystems/romfs.txt | 3 | ||||
-rw-r--r-- | Documentation/filesystems/squashfs.txt | 28 | ||||
-rw-r--r-- | Documentation/filesystems/sysfs.txt | 16 | ||||
-rw-r--r-- | Documentation/filesystems/ubifs.txt | 4 | ||||
-rw-r--r-- | Documentation/filesystems/vfs.txt | 64 | ||||
-rw-r--r-- | Documentation/filesystems/xfs-delayed-logging-design.txt | 7 |
11 files changed, 120 insertions, 68 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 4471a416c274..61b31acb9176 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -128,7 +128,7 @@ alloc_inode: | |||
128 | destroy_inode: | 128 | destroy_inode: |
129 | dirty_inode: (must not sleep) | 129 | dirty_inode: (must not sleep) |
130 | write_inode: | 130 | write_inode: |
131 | drop_inode: !!!inode_lock!!! | 131 | drop_inode: !!!inode->i_lock!!! |
132 | evict_inode: | 132 | evict_inode: |
133 | put_super: write | 133 | put_super: write |
134 | write_super: read | 134 | write_super: read |
@@ -166,13 +166,11 @@ prototypes: | |||
166 | void (*kill_sb) (struct super_block *); | 166 | void (*kill_sb) (struct super_block *); |
167 | locking rules: | 167 | locking rules: |
168 | may block | 168 | may block |
169 | get_sb yes | ||
170 | mount yes | 169 | mount yes |
171 | kill_sb yes | 170 | kill_sb yes |
172 | 171 | ||
173 | ->get_sb() returns error or 0 with locked superblock attached to the vfsmount | 172 | ->mount() returns ERR_PTR or the root dentry; its superblock should be locked |
174 | (exclusive on ->s_umount). | 173 | on return. |
175 | ->mount() returns ERR_PTR or the root dentry. | ||
176 | ->kill_sb() takes a write-locked superblock, does all shutdown work on it, | 174 | ->kill_sb() takes a write-locked superblock, does all shutdown work on it, |
177 | unlocks and drops the reference. | 175 | unlocks and drops the reference. |
178 | 176 | ||
diff --git a/Documentation/filesystems/adfs.txt b/Documentation/filesystems/adfs.txt index 9e8811f92b84..5949766353f7 100644 --- a/Documentation/filesystems/adfs.txt +++ b/Documentation/filesystems/adfs.txt | |||
@@ -9,6 +9,9 @@ Mount options for ADFS | |||
9 | will be nnn. Default 0700. | 9 | will be nnn. Default 0700. |
10 | othmask=nnn The permission mask for ADFS 'other' permissions | 10 | othmask=nnn The permission mask for ADFS 'other' permissions |
11 | will be nnn. Default 0077. | 11 | will be nnn. Default 0077. |
12 | ftsuffix=n When ftsuffix=0, no file type suffix will be applied. | ||
13 | When ftsuffix=1, a hexadecimal suffix corresponding to | ||
14 | the RISC OS file type will be added. Default 0. | ||
12 | 15 | ||
13 | Mapping of ADFS permissions to Linux permissions | 16 | Mapping of ADFS permissions to Linux permissions |
14 | ------------------------------------------------ | 17 | ------------------------------------------------ |
@@ -55,3 +58,18 @@ Mapping of ADFS permissions to Linux permissions | |||
55 | 58 | ||
56 | You can therefore tailor the permission translation to whatever you | 59 | You can therefore tailor the permission translation to whatever you |
57 | desire the permissions should be under Linux. | 60 | desire the permissions should be under Linux. |
61 | |||
62 | RISC OS file type suffix | ||
63 | ------------------------ | ||
64 | |||
65 | RISC OS file types are stored in bits 19..8 of the file load address. | ||
66 | |||
67 | To enable non-RISC OS systems to be used to store files without losing | ||
68 | file type information, a file naming convention was devised (initially | ||
69 | for use with NFS) such that a hexadecimal suffix of the form ,xyz | ||
70 | denoted the file type: e.g. BasicFile,ffb is a BASIC (0xffb) file. This | ||
71 | naming convention is now also used by RISC OS emulators such as RPCEmu. | ||
72 | |||
73 | Mounting an ADFS disc with option ftsuffix=1 will cause appropriate file | ||
74 | type suffixes to be appended to file names read from a directory. If the | ||
75 | ftsuffix option is zero or omitted, no file type suffixes will be added. | ||
diff --git a/Documentation/filesystems/exofs.txt b/Documentation/filesystems/exofs.txt index abd2a9b5b787..23583a136975 100644 --- a/Documentation/filesystems/exofs.txt +++ b/Documentation/filesystems/exofs.txt | |||
@@ -104,7 +104,15 @@ Where: | |||
104 | exofs specific options: Options are separated by commas (,) | 104 | exofs specific options: Options are separated by commas (,) |
105 | pid=<integer> - The partition number to mount/create as | 105 | pid=<integer> - The partition number to mount/create as |
106 | container of the filesystem. | 106 | container of the filesystem. |
107 | This option is mandatory. | 107 | This option is mandatory. integer can be |
108 | Hex by pre-pending an 0x to the number. | ||
109 | osdname=<id> - Mount by a device's osdname. | ||
110 | osdname is usually a 36 character uuid of the | ||
111 | form "d2683732-c906-4ee1-9dbd-c10c27bb40df". | ||
112 | It is one of the device's uuid specified in the | ||
113 | mkfs.exofs format command. | ||
114 | If this option is specified then the /dev/osdX | ||
115 | above can be empty and is ignored. | ||
108 | to=<integer> - Timeout in ticks for a single command. | 116 | to=<integer> - Timeout in ticks for a single command. |
109 | default is (60 * HZ) [for debugging only] | 117 | default is (60 * HZ) [for debugging only] |
110 | 118 | ||
diff --git a/Documentation/filesystems/nfs/pnfs.txt b/Documentation/filesystems/nfs/pnfs.txt index bc0b9cfe095b..983e14abe7e9 100644 --- a/Documentation/filesystems/nfs/pnfs.txt +++ b/Documentation/filesystems/nfs/pnfs.txt | |||
@@ -46,3 +46,10 @@ data server cache | |||
46 | file driver devices refer to data servers, which are kept in a module | 46 | file driver devices refer to data servers, which are kept in a module |
47 | level cache. Its reference is held over the lifetime of the deviceid | 47 | level cache. Its reference is held over the lifetime of the deviceid |
48 | pointing to it. | 48 | pointing to it. |
49 | |||
50 | lseg | ||
51 | ---- | ||
52 | lseg maintains an extra reference corresponding to the NFS_LSEG_VALID | ||
53 | bit which holds it in the pnfs_layout_hdr's list. When the final lseg | ||
54 | is removed from the pnfs_layout_hdr's list, the NFS_LAYOUT_DESTROYED | ||
55 | bit is set, preventing any new lsegs from being added. | ||
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index dfbcd1b00b0a..6e29954851a2 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting | |||
@@ -298,11 +298,14 @@ be used instead. It gets called whenever the inode is evicted, whether it has | |||
298 | remaining links or not. Caller does *not* evict the pagecache or inode-associated | 298 | remaining links or not. Caller does *not* evict the pagecache or inode-associated |
299 | metadata buffers; getting rid of those is responsibility of method, as it had | 299 | metadata buffers; getting rid of those is responsibility of method, as it had |
300 | been for ->delete_inode(). | 300 | been for ->delete_inode(). |
301 | ->drop_inode() returns int now; it's called on final iput() with inode_lock | 301 | |
302 | held and it returns true if filesystems wants the inode to be dropped. As before, | 302 | ->drop_inode() returns int now; it's called on final iput() with |
303 | generic_drop_inode() is still the default and it's been updated appropriately. | 303 | inode->i_lock held and it returns true if filesystems wants the inode to be |
304 | generic_delete_inode() is also alive and it consists simply of return 1. Note that | 304 | dropped. As before, generic_drop_inode() is still the default and it's been |
305 | all actual eviction work is done by caller after ->drop_inode() returns. | 305 | updated appropriately. generic_delete_inode() is also alive and it consists |
306 | simply of return 1. Note that all actual eviction work is done by caller after | ||
307 | ->drop_inode() returns. | ||
308 | |||
306 | clear_inode() is gone; use end_writeback() instead. As before, it must | 309 | clear_inode() is gone; use end_writeback() instead. As before, it must |
307 | be called exactly once on each call of ->evict_inode() (as it used to be for | 310 | be called exactly once on each call of ->evict_inode() (as it used to be for |
308 | each call of ->delete_inode()). Unlike before, if you are using inode-associated | 311 | each call of ->delete_inode()). Unlike before, if you are using inode-associated |
@@ -394,3 +397,13 @@ file) you must return -EOPNOTSUPP if FALLOC_FL_PUNCH_HOLE is set in mode. | |||
394 | Currently you can only have FALLOC_FL_PUNCH_HOLE with FALLOC_FL_KEEP_SIZE set, | 397 | Currently you can only have FALLOC_FL_PUNCH_HOLE with FALLOC_FL_KEEP_SIZE set, |
395 | so the i_size should not change when hole punching, even when puching the end of | 398 | so the i_size should not change when hole punching, even when puching the end of |
396 | a file off. | 399 | a file off. |
400 | |||
401 | -- | ||
402 | [mandatory] | ||
403 | |||
404 | -- | ||
405 | [mandatory] | ||
406 | ->get_sb() is gone. Switch to use of ->mount(). Typically it's just | ||
407 | a matter of switching from calling get_sb_... to mount_... and changing the | ||
408 | function type. If you were doing it manually, just switch from setting ->mnt_root | ||
409 | to some pointer to returning that pointer. On errors return ERR_PTR(...). | ||
diff --git a/Documentation/filesystems/romfs.txt b/Documentation/filesystems/romfs.txt index 2d2a7b2a16b9..e2b07cc9120a 100644 --- a/Documentation/filesystems/romfs.txt +++ b/Documentation/filesystems/romfs.txt | |||
@@ -17,8 +17,7 @@ comparison, an actual rescue disk used up 3202 blocks with ext2, while | |||
17 | with romfs, it needed 3079 blocks. | 17 | with romfs, it needed 3079 blocks. |
18 | 18 | ||
19 | To create such a file system, you'll need a user program named | 19 | To create such a file system, you'll need a user program named |
20 | genromfs. It is available via anonymous ftp on sunsite.unc.edu and | 20 | genromfs. It is available on http://romfs.sourceforge.net/ |
21 | its mirrors, in the /pub/Linux/system/recovery/ directory. | ||
22 | 21 | ||
23 | As the name suggests, romfs could be also used (space-efficiently) on | 22 | As the name suggests, romfs could be also used (space-efficiently) on |
24 | various read-only media, like (E)EPROM disks if someone will have the | 23 | various read-only media, like (E)EPROM disks if someone will have the |
diff --git a/Documentation/filesystems/squashfs.txt b/Documentation/filesystems/squashfs.txt index 66699afd66ca..2d78f1911844 100644 --- a/Documentation/filesystems/squashfs.txt +++ b/Documentation/filesystems/squashfs.txt | |||
@@ -59,12 +59,15 @@ obtained from this site also. | |||
59 | 3. SQUASHFS FILESYSTEM DESIGN | 59 | 3. SQUASHFS FILESYSTEM DESIGN |
60 | ----------------------------- | 60 | ----------------------------- |
61 | 61 | ||
62 | A squashfs filesystem consists of a maximum of eight parts, packed together on a byte | 62 | A squashfs filesystem consists of a maximum of nine parts, packed together on a |
63 | alignment: | 63 | byte alignment: |
64 | 64 | ||
65 | --------------- | 65 | --------------- |
66 | | superblock | | 66 | | superblock | |
67 | |---------------| | 67 | |---------------| |
68 | | compression | | ||
69 | | options | | ||
70 | |---------------| | ||
68 | | datablocks | | 71 | | datablocks | |
69 | | & fragments | | 72 | | & fragments | |
70 | |---------------| | 73 | |---------------| |
@@ -91,7 +94,14 @@ the source directory, and checked for duplicates. Once all file data has been | |||
91 | written the completed inode, directory, fragment, export and uid/gid lookup | 94 | written the completed inode, directory, fragment, export and uid/gid lookup |
92 | tables are written. | 95 | tables are written. |
93 | 96 | ||
94 | 3.1 Inodes | 97 | 3.1 Compression options |
98 | ----------------------- | ||
99 | |||
100 | Compressors can optionally support compression specific options (e.g. | ||
101 | dictionary size). If non-default compression options have been used, then | ||
102 | these are stored here. | ||
103 | |||
104 | 3.2 Inodes | ||
95 | ---------- | 105 | ---------- |
96 | 106 | ||
97 | Metadata (inodes and directories) are compressed in 8Kbyte blocks. Each | 107 | Metadata (inodes and directories) are compressed in 8Kbyte blocks. Each |
@@ -114,7 +124,7 @@ directory inode are defined: inodes optimised for frequently occurring | |||
114 | regular files and directories, and extended types where extra | 124 | regular files and directories, and extended types where extra |
115 | information has to be stored. | 125 | information has to be stored. |
116 | 126 | ||
117 | 3.2 Directories | 127 | 3.3 Directories |
118 | --------------- | 128 | --------------- |
119 | 129 | ||
120 | Like inodes, directories are packed into compressed metadata blocks, stored | 130 | Like inodes, directories are packed into compressed metadata blocks, stored |
@@ -144,7 +154,7 @@ decompressed to do a lookup irrespective of the length of the directory. | |||
144 | This scheme has the advantage that it doesn't require extra memory overhead | 154 | This scheme has the advantage that it doesn't require extra memory overhead |
145 | and doesn't require much extra storage on disk. | 155 | and doesn't require much extra storage on disk. |
146 | 156 | ||
147 | 3.3 File data | 157 | 3.4 File data |
148 | ------------- | 158 | ------------- |
149 | 159 | ||
150 | Regular files consist of a sequence of contiguous compressed blocks, and/or a | 160 | Regular files consist of a sequence of contiguous compressed blocks, and/or a |
@@ -163,7 +173,7 @@ Larger files use multiple slots, with 1.75 TiB files using all 8 slots. | |||
163 | The index cache is designed to be memory efficient, and by default uses | 173 | The index cache is designed to be memory efficient, and by default uses |
164 | 16 KiB. | 174 | 16 KiB. |
165 | 175 | ||
166 | 3.4 Fragment lookup table | 176 | 3.5 Fragment lookup table |
167 | ------------------------- | 177 | ------------------------- |
168 | 178 | ||
169 | Regular files can contain a fragment index which is mapped to a fragment | 179 | Regular files can contain a fragment index which is mapped to a fragment |
@@ -173,7 +183,7 @@ A second index table is used to locate these. This second index table for | |||
173 | speed of access (and because it is small) is read at mount time and cached | 183 | speed of access (and because it is small) is read at mount time and cached |
174 | in memory. | 184 | in memory. |
175 | 185 | ||
176 | 3.5 Uid/gid lookup table | 186 | 3.6 Uid/gid lookup table |
177 | ------------------------ | 187 | ------------------------ |
178 | 188 | ||
179 | For space efficiency regular files store uid and gid indexes, which are | 189 | For space efficiency regular files store uid and gid indexes, which are |
@@ -182,7 +192,7 @@ stored compressed into metadata blocks. A second index table is used to | |||
182 | locate these. This second index table for speed of access (and because it | 192 | locate these. This second index table for speed of access (and because it |
183 | is small) is read at mount time and cached in memory. | 193 | is small) is read at mount time and cached in memory. |
184 | 194 | ||
185 | 3.6 Export table | 195 | 3.7 Export table |
186 | ---------------- | 196 | ---------------- |
187 | 197 | ||
188 | To enable Squashfs filesystems to be exportable (via NFS etc.) filesystems | 198 | To enable Squashfs filesystems to be exportable (via NFS etc.) filesystems |
@@ -196,7 +206,7 @@ This table is stored compressed into metadata blocks. A second index table is | |||
196 | used to locate these. This second index table for speed of access (and because | 206 | used to locate these. This second index table for speed of access (and because |
197 | it is small) is read at mount time and cached in memory. | 207 | it is small) is read at mount time and cached in memory. |
198 | 208 | ||
199 | 3.7 Xattr table | 209 | 3.8 Xattr table |
200 | --------------- | 210 | --------------- |
201 | 211 | ||
202 | The xattr table contains extended attributes for each inode. The xattrs | 212 | The xattr table contains extended attributes for each inode. The xattrs |
diff --git a/Documentation/filesystems/sysfs.txt b/Documentation/filesystems/sysfs.txt index 5d1335faec2d..f806e50aaa63 100644 --- a/Documentation/filesystems/sysfs.txt +++ b/Documentation/filesystems/sysfs.txt | |||
@@ -39,10 +39,12 @@ userspace. Top-level directories in sysfs represent the common | |||
39 | ancestors of object hierarchies; i.e. the subsystems the objects | 39 | ancestors of object hierarchies; i.e. the subsystems the objects |
40 | belong to. | 40 | belong to. |
41 | 41 | ||
42 | Sysfs internally stores the kobject that owns the directory in the | 42 | Sysfs internally stores a pointer to the kobject that implements a |
43 | ->d_fsdata pointer of the directory's dentry. This allows sysfs to do | 43 | directory in the sysfs_dirent object associated with the directory. In |
44 | reference counting directly on the kobject when the file is opened and | 44 | the past this kobject pointer has been used by sysfs to do reference |
45 | closed. | 45 | counting directly on the kobject whenever the file is opened or closed. |
46 | With the current sysfs implementation the kobject reference count is | ||
47 | only modified directly by the function sysfs_schedule_callback(). | ||
46 | 48 | ||
47 | 49 | ||
48 | Attributes | 50 | Attributes |
@@ -208,9 +210,9 @@ Other notes: | |||
208 | is 4096. | 210 | is 4096. |
209 | 211 | ||
210 | - show() methods should return the number of bytes printed into the | 212 | - show() methods should return the number of bytes printed into the |
211 | buffer. This is the return value of snprintf(). | 213 | buffer. This is the return value of scnprintf(). |
212 | 214 | ||
213 | - show() should always use snprintf(). | 215 | - show() should always use scnprintf(). |
214 | 216 | ||
215 | - store() should return the number of bytes used from the buffer. If the | 217 | - store() should return the number of bytes used from the buffer. If the |
216 | entire buffer has been used, just return the count argument. | 218 | entire buffer has been used, just return the count argument. |
@@ -229,7 +231,7 @@ A very simple (and naive) implementation of a device attribute is: | |||
229 | static ssize_t show_name(struct device *dev, struct device_attribute *attr, | 231 | static ssize_t show_name(struct device *dev, struct device_attribute *attr, |
230 | char *buf) | 232 | char *buf) |
231 | { | 233 | { |
232 | return snprintf(buf, PAGE_SIZE, "%s\n", dev->name); | 234 | return scnprintf(buf, PAGE_SIZE, "%s\n", dev->name); |
233 | } | 235 | } |
234 | 236 | ||
235 | static ssize_t store_name(struct device *dev, struct device_attribute *attr, | 237 | static ssize_t store_name(struct device *dev, struct device_attribute *attr, |
diff --git a/Documentation/filesystems/ubifs.txt b/Documentation/filesystems/ubifs.txt index 12fedb7834c6..d7b13b01e980 100644 --- a/Documentation/filesystems/ubifs.txt +++ b/Documentation/filesystems/ubifs.txt | |||
@@ -82,12 +82,12 @@ Mount options | |||
82 | bulk_read read more in one go to take advantage of flash | 82 | bulk_read read more in one go to take advantage of flash |
83 | media that read faster sequentially | 83 | media that read faster sequentially |
84 | no_bulk_read (*) do not bulk-read | 84 | no_bulk_read (*) do not bulk-read |
85 | no_chk_data_crc skip checking of CRCs on data nodes in order to | 85 | no_chk_data_crc (*) skip checking of CRCs on data nodes in order to |
86 | improve read performance. Use this option only | 86 | improve read performance. Use this option only |
87 | if the flash media is highly reliable. The effect | 87 | if the flash media is highly reliable. The effect |
88 | of this option is that corruption of the contents | 88 | of this option is that corruption of the contents |
89 | of a file can go unnoticed. | 89 | of a file can go unnoticed. |
90 | chk_data_crc (*) do not skip checking CRCs on data nodes | 90 | chk_data_crc do not skip checking CRCs on data nodes |
91 | compr=none override default compressor and set it to "none" | 91 | compr=none override default compressor and set it to "none" |
92 | compr=lzo override default compressor and set it to "lzo" | 92 | compr=lzo override default compressor and set it to "lzo" |
93 | compr=zlib override default compressor and set it to "zlib" | 93 | compr=zlib override default compressor and set it to "zlib" |
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 94cf97b901d7..80815ed654cb 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -95,10 +95,11 @@ functions: | |||
95 | extern int unregister_filesystem(struct file_system_type *); | 95 | extern int unregister_filesystem(struct file_system_type *); |
96 | 96 | ||
97 | The passed struct file_system_type describes your filesystem. When a | 97 | The passed struct file_system_type describes your filesystem. When a |
98 | request is made to mount a device onto a directory in your filespace, | 98 | request is made to mount a filesystem onto a directory in your namespace, |
99 | the VFS will call the appropriate get_sb() method for the specific | 99 | the VFS will call the appropriate mount() method for the specific |
100 | filesystem. The dentry for the mount point will then be updated to | 100 | filesystem. New vfsmount refering to the tree returned by ->mount() |
101 | point to the root inode for the new filesystem. | 101 | will be attached to the mountpoint, so that when pathname resolution |
102 | reaches the mountpoint it will jump into the root of that vfsmount. | ||
102 | 103 | ||
103 | You can see all filesystems that are registered to the kernel in the | 104 | You can see all filesystems that are registered to the kernel in the |
104 | file /proc/filesystems. | 105 | file /proc/filesystems. |
@@ -107,14 +108,14 @@ file /proc/filesystems. | |||
107 | struct file_system_type | 108 | struct file_system_type |
108 | ----------------------- | 109 | ----------------------- |
109 | 110 | ||
110 | This describes the filesystem. As of kernel 2.6.22, the following | 111 | This describes the filesystem. As of kernel 2.6.39, the following |
111 | members are defined: | 112 | members are defined: |
112 | 113 | ||
113 | struct file_system_type { | 114 | struct file_system_type { |
114 | const char *name; | 115 | const char *name; |
115 | int fs_flags; | 116 | int fs_flags; |
116 | int (*get_sb) (struct file_system_type *, int, | 117 | struct dentry (*mount) (struct file_system_type *, int, |
117 | const char *, void *, struct vfsmount *); | 118 | const char *, void *); |
118 | void (*kill_sb) (struct super_block *); | 119 | void (*kill_sb) (struct super_block *); |
119 | struct module *owner; | 120 | struct module *owner; |
120 | struct file_system_type * next; | 121 | struct file_system_type * next; |
@@ -128,11 +129,11 @@ struct file_system_type { | |||
128 | 129 | ||
129 | fs_flags: various flags (i.e. FS_REQUIRES_DEV, FS_NO_DCACHE, etc.) | 130 | fs_flags: various flags (i.e. FS_REQUIRES_DEV, FS_NO_DCACHE, etc.) |
130 | 131 | ||
131 | get_sb: the method to call when a new instance of this | 132 | mount: the method to call when a new instance of this |
132 | filesystem should be mounted | 133 | filesystem should be mounted |
133 | 134 | ||
134 | kill_sb: the method to call when an instance of this filesystem | 135 | kill_sb: the method to call when an instance of this filesystem |
135 | should be unmounted | 136 | should be shut down |
136 | 137 | ||
137 | owner: for internal VFS use: you should initialize this to THIS_MODULE in | 138 | owner: for internal VFS use: you should initialize this to THIS_MODULE in |
138 | most cases. | 139 | most cases. |
@@ -141,7 +142,7 @@ struct file_system_type { | |||
141 | 142 | ||
142 | s_lock_key, s_umount_key: lockdep-specific | 143 | s_lock_key, s_umount_key: lockdep-specific |
143 | 144 | ||
144 | The get_sb() method has the following arguments: | 145 | The mount() method has the following arguments: |
145 | 146 | ||
146 | struct file_system_type *fs_type: describes the filesystem, partly initialized | 147 | struct file_system_type *fs_type: describes the filesystem, partly initialized |
147 | by the specific filesystem code | 148 | by the specific filesystem code |
@@ -153,32 +154,39 @@ The get_sb() method has the following arguments: | |||
153 | void *data: arbitrary mount options, usually comes as an ASCII | 154 | void *data: arbitrary mount options, usually comes as an ASCII |
154 | string (see "Mount Options" section) | 155 | string (see "Mount Options" section) |
155 | 156 | ||
156 | struct vfsmount *mnt: a vfs-internal representation of a mount point | 157 | The mount() method must return the root dentry of the tree requested by |
158 | caller. An active reference to its superblock must be grabbed and the | ||
159 | superblock must be locked. On failure it should return ERR_PTR(error). | ||
157 | 160 | ||
158 | The get_sb() method must determine if the block device specified | 161 | The arguments match those of mount(2) and their interpretation |
159 | in the dev_name and fs_type contains a filesystem of the type the method | 162 | depends on filesystem type. E.g. for block filesystems, dev_name is |
160 | supports. If it succeeds in opening the named block device, it initializes a | 163 | interpreted as block device name, that device is opened and if it |
161 | struct super_block descriptor for the filesystem contained by the block device. | 164 | contains a suitable filesystem image the method creates and initializes |
162 | On failure it returns an error. | 165 | struct super_block accordingly, returning its root dentry to caller. |
166 | |||
167 | ->mount() may choose to return a subtree of existing filesystem - it | ||
168 | doesn't have to create a new one. The main result from the caller's | ||
169 | point of view is a reference to dentry at the root of (sub)tree to | ||
170 | be attached; creation of new superblock is a common side effect. | ||
163 | 171 | ||
164 | The most interesting member of the superblock structure that the | 172 | The most interesting member of the superblock structure that the |
165 | get_sb() method fills in is the "s_op" field. This is a pointer to | 173 | mount() method fills in is the "s_op" field. This is a pointer to |
166 | a "struct super_operations" which describes the next level of the | 174 | a "struct super_operations" which describes the next level of the |
167 | filesystem implementation. | 175 | filesystem implementation. |
168 | 176 | ||
169 | Usually, a filesystem uses one of the generic get_sb() implementations | 177 | Usually, a filesystem uses one of the generic mount() implementations |
170 | and provides a fill_super() method instead. The generic methods are: | 178 | and provides a fill_super() callback instead. The generic variants are: |
171 | 179 | ||
172 | get_sb_bdev: mount a filesystem residing on a block device | 180 | mount_bdev: mount a filesystem residing on a block device |
173 | 181 | ||
174 | get_sb_nodev: mount a filesystem that is not backed by a device | 182 | mount_nodev: mount a filesystem that is not backed by a device |
175 | 183 | ||
176 | get_sb_single: mount a filesystem which shares the instance between | 184 | mount_single: mount a filesystem which shares the instance between |
177 | all mounts | 185 | all mounts |
178 | 186 | ||
179 | A fill_super() method implementation has the following arguments: | 187 | A fill_super() callback implementation has the following arguments: |
180 | 188 | ||
181 | struct super_block *sb: the superblock structure. The method fill_super() | 189 | struct super_block *sb: the superblock structure. The callback |
182 | must initialize this properly. | 190 | must initialize this properly. |
183 | 191 | ||
184 | void *data: arbitrary mount options, usually comes as an ASCII | 192 | void *data: arbitrary mount options, usually comes as an ASCII |
@@ -246,7 +254,7 @@ or bottom half). | |||
246 | should be synchronous or not, not all filesystems check this flag. | 254 | should be synchronous or not, not all filesystems check this flag. |
247 | 255 | ||
248 | drop_inode: called when the last access to the inode is dropped, | 256 | drop_inode: called when the last access to the inode is dropped, |
249 | with the inode_lock spinlock held. | 257 | with the inode->i_lock spinlock held. |
250 | 258 | ||
251 | This method should be either NULL (normal UNIX filesystem | 259 | This method should be either NULL (normal UNIX filesystem |
252 | semantics) or "generic_delete_inode" (for filesystems that do not | 260 | semantics) or "generic_delete_inode" (for filesystems that do not |
@@ -865,7 +873,7 @@ struct dentry_operations { | |||
865 | void (*d_iput)(struct dentry *, struct inode *); | 873 | void (*d_iput)(struct dentry *, struct inode *); |
866 | char *(*d_dname)(struct dentry *, char *, int); | 874 | char *(*d_dname)(struct dentry *, char *, int); |
867 | struct vfsmount *(*d_automount)(struct path *); | 875 | struct vfsmount *(*d_automount)(struct path *); |
868 | int (*d_manage)(struct dentry *, bool, bool); | 876 | int (*d_manage)(struct dentry *, bool); |
869 | }; | 877 | }; |
870 | 878 | ||
871 | d_revalidate: called when the VFS needs to revalidate a dentry. This | 879 | d_revalidate: called when the VFS needs to revalidate a dentry. This |
@@ -961,10 +969,6 @@ struct dentry_operations { | |||
961 | mounted on it and not to check the automount flag. Any other error | 969 | mounted on it and not to check the automount flag. Any other error |
962 | code will abort pathwalk completely. | 970 | code will abort pathwalk completely. |
963 | 971 | ||
964 | If the 'mounting_here' parameter is true, then namespace_sem is being | ||
965 | held by the caller and the function should not initiate any mounts or | ||
966 | unmounts that it will then wait for. | ||
967 | |||
968 | If the 'rcu_walk' parameter is true, then the caller is doing a | 972 | If the 'rcu_walk' parameter is true, then the caller is doing a |
969 | pathwalk in RCU-walk mode. Sleeping is not permitted in this mode, | 973 | pathwalk in RCU-walk mode. Sleeping is not permitted in this mode, |
970 | and the caller can be asked to leave it and call again by returing | 974 | and the caller can be asked to leave it and call again by returing |
diff --git a/Documentation/filesystems/xfs-delayed-logging-design.txt b/Documentation/filesystems/xfs-delayed-logging-design.txt index 7445bf335dae..5282e3e51413 100644 --- a/Documentation/filesystems/xfs-delayed-logging-design.txt +++ b/Documentation/filesystems/xfs-delayed-logging-design.txt | |||
@@ -791,10 +791,3 @@ mount option. Fundamentally, there is no reason why the log manager would not | |||
791 | be able to swap methods automatically and transparently depending on load | 791 | be able to swap methods automatically and transparently depending on load |
792 | characteristics, but this should not be necessary if delayed logging works as | 792 | characteristics, but this should not be necessary if delayed logging works as |
793 | designed. | 793 | designed. |
794 | |||
795 | Roadmap: | ||
796 | |||
797 | 2.6.39 Switch default mount option to use delayed logging | ||
798 | => should be roughly 12 months after initial merge | ||
799 | => enough time to shake out remaining problems before next round of | ||
800 | enterprise distro kernel rebases | ||