aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r--Documentation/filesystems/Locking10
-rw-r--r--Documentation/filesystems/nfs/nfsroot.txt2
-rw-r--r--Documentation/filesystems/nilfs2.txt1
-rw-r--r--Documentation/filesystems/porting28
-rw-r--r--Documentation/filesystems/ubifs.txt28
-rw-r--r--Documentation/filesystems/vfs.txt30
6 files changed, 56 insertions, 43 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index 82e8e52e8790..653380793a6c 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -52,7 +52,7 @@ ata *);
52 void (*put_link) (struct dentry *, struct nameidata *, void *); 52 void (*put_link) (struct dentry *, struct nameidata *, void *);
53 void (*truncate) (struct inode *); 53 void (*truncate) (struct inode *);
54 int (*permission) (struct inode *, int, unsigned int); 54 int (*permission) (struct inode *, int, unsigned int);
55 int (*check_acl)(struct inode *, int, unsigned int); 55 int (*get_acl)(struct inode *, int);
56 int (*setattr) (struct dentry *, struct iattr *); 56 int (*setattr) (struct dentry *, struct iattr *);
57 int (*getattr) (struct vfsmount *, struct dentry *, struct kstat *); 57 int (*getattr) (struct vfsmount *, struct dentry *, struct kstat *);
58 int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); 58 int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
@@ -80,7 +80,7 @@ put_link: no
80truncate: yes (see below) 80truncate: yes (see below)
81setattr: yes 81setattr: yes
82permission: no (may not block if called in rcu-walk mode) 82permission: no (may not block if called in rcu-walk mode)
83check_acl: no 83get_acl: no
84getattr: no 84getattr: no
85setxattr: yes 85setxattr: yes
86getxattr: no 86getxattr: no
@@ -412,7 +412,7 @@ prototypes:
412 int (*open) (struct inode *, struct file *); 412 int (*open) (struct inode *, struct file *);
413 int (*flush) (struct file *); 413 int (*flush) (struct file *);
414 int (*release) (struct inode *, struct file *); 414 int (*release) (struct inode *, struct file *);
415 int (*fsync) (struct file *, int datasync); 415 int (*fsync) (struct file *, loff_t start, loff_t end, int datasync);
416 int (*aio_fsync) (struct kiocb *, int datasync); 416 int (*aio_fsync) (struct kiocb *, int datasync);
417 int (*fasync) (int, struct file *, int); 417 int (*fasync) (int, struct file *, int);
418 int (*lock) (struct file *, int, struct file_lock *); 418 int (*lock) (struct file *, int, struct file_lock *);
@@ -438,9 +438,7 @@ prototypes:
438 438
439locking rules: 439locking rules:
440 All may block except for ->setlease. 440 All may block except for ->setlease.
441 No VFS locks held on entry except for ->fsync and ->setlease. 441 No VFS locks held on entry except for ->setlease.
442
443->fsync() has i_mutex on inode.
444 442
445->setlease has the file_list_lock held and must not sleep. 443->setlease has the file_list_lock held and must not sleep.
446 444
diff --git a/Documentation/filesystems/nfs/nfsroot.txt b/Documentation/filesystems/nfs/nfsroot.txt
index 90c71c6f0d00..ffdd9d866ad7 100644
--- a/Documentation/filesystems/nfs/nfsroot.txt
+++ b/Documentation/filesystems/nfs/nfsroot.txt
@@ -226,7 +226,7 @@ They depend on various facilities being available:
226 cdrecord. 226 cdrecord.
227 227
228 e.g. 228 e.g.
229 cdrecord dev=ATAPI:1,0,0 arch/i386/boot/image.iso 229 cdrecord dev=ATAPI:1,0,0 arch/x86/boot/image.iso
230 230
231 For more information on isolinux, including how to create bootdisks 231 For more information on isolinux, including how to create bootdisks
232 for prebuilt kernels, see http://syslinux.zytor.com/ 232 for prebuilt kernels, see http://syslinux.zytor.com/
diff --git a/Documentation/filesystems/nilfs2.txt b/Documentation/filesystems/nilfs2.txt
index d5c0cef38a71..873a2ab2e9f8 100644
--- a/Documentation/filesystems/nilfs2.txt
+++ b/Documentation/filesystems/nilfs2.txt
@@ -40,7 +40,6 @@ Features which NILFS2 does not support yet:
40 - POSIX ACLs 40 - POSIX ACLs
41 - quotas 41 - quotas
42 - fsck 42 - fsck
43 - resize
44 - defragmentation 43 - defragmentation
45 44
46Mount options 45Mount options
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index 6e29954851a2..b4a3d765ff9a 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -400,10 +400,32 @@ a file off.
400 400
401-- 401--
402[mandatory] 402[mandatory]
403
404--
405[mandatory]
406 ->get_sb() is gone. Switch to use of ->mount(). Typically it's just 403 ->get_sb() is gone. Switch to use of ->mount(). Typically it's just
407a matter of switching from calling get_sb_... to mount_... and changing the 404a matter of switching from calling get_sb_... to mount_... and changing the
408function type. If you were doing it manually, just switch from setting ->mnt_root 405function type. If you were doing it manually, just switch from setting ->mnt_root
409to some pointer to returning that pointer. On errors return ERR_PTR(...). 406to some pointer to returning that pointer. On errors return ERR_PTR(...).
407
408--
409[mandatory]
410 ->permission() and generic_permission()have lost flags
411argument; instead of passing IPERM_FLAG_RCU we add MAY_NOT_BLOCK into mask.
412 generic_permission() has also lost the check_acl argument; ACL checking
413has been taken to VFS and filesystems need to provide a non-NULL ->i_op->get_acl
414to read an ACL from disk.
415
416--
417[mandatory]
418 If you implement your own ->llseek() you must handle SEEK_HOLE and
419SEEK_DATA. You can hanle this by returning -EINVAL, but it would be nicer to
420support it in some way. The generic handler assumes that the entire file is
421data and there is a virtual hole at the end of the file. So if the provided
422offset is less than i_size and SEEK_DATA is specified, return the same offset.
423If the above is true for the offset and you are given SEEK_HOLE, return the end
424of the file. If the offset is i_size or greater return -ENXIO in either case.
425
426[mandatory]
427 If you have your own ->fsync() you must make sure to call
428filemap_write_and_wait_range() so that all dirty pages are synced out properly.
429You must also keep in mind that ->fsync() is not called with i_mutex held
430anymore, so if you require i_mutex locking you must make sure to take it and
431release it yourself.
diff --git a/Documentation/filesystems/ubifs.txt b/Documentation/filesystems/ubifs.txt
index 8e4fab639d9c..a0a61d2f389f 100644
--- a/Documentation/filesystems/ubifs.txt
+++ b/Documentation/filesystems/ubifs.txt
@@ -111,34 +111,6 @@ The following is an example of the kernel boot arguments to attach mtd0
111to UBI and mount volume "rootfs": 111to UBI and mount volume "rootfs":
112ubi.mtd=0 root=ubi0:rootfs rootfstype=ubifs 112ubi.mtd=0 root=ubi0:rootfs rootfstype=ubifs
113 113
114
115Module Parameters for Debugging
116===============================
117
118When UBIFS has been compiled with debugging enabled, there are 2 module
119parameters that are available to control aspects of testing and debugging.
120
121debug_chks Selects extra checks that UBIFS can do while running:
122
123 Check Flag value
124
125 General checks 1
126 Check Tree Node Cache (TNC) 2
127 Check indexing tree size 4
128 Check orphan area 8
129 Check old indexing tree 16
130 Check LEB properties (lprops) 32
131 Check leaf nodes and inodes 64
132
133debug_tsts Selects a mode of testing, as follows:
134
135 Test mode Flag value
136
137 Failure mode for recovery testing 4
138
139For example, set debug_chks to 3 to enable general and TNC checks.
140
141
142References 114References
143========== 115==========
144 116
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index 88b9f5519af9..52d8fb81cfff 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -229,6 +229,8 @@ struct super_operations {
229 229
230 ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); 230 ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
231 ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); 231 ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
232 int (*nr_cached_objects)(struct super_block *);
233 void (*free_cached_objects)(struct super_block *, int);
232}; 234};
233 235
234All methods are called without any locks being held, unless otherwise 236All methods are called without any locks being held, unless otherwise
@@ -301,6 +303,26 @@ or bottom half).
301 303
302 quota_write: called by the VFS to write to filesystem quota file. 304 quota_write: called by the VFS to write to filesystem quota file.
303 305
306 nr_cached_objects: called by the sb cache shrinking function for the
307 filesystem to return the number of freeable cached objects it contains.
308 Optional.
309
310 free_cache_objects: called by the sb cache shrinking function for the
311 filesystem to scan the number of objects indicated to try to free them.
312 Optional, but any filesystem implementing this method needs to also
313 implement ->nr_cached_objects for it to be called correctly.
314
315 We can't do anything with any errors that the filesystem might
316 encountered, hence the void return type. This will never be called if
317 the VM is trying to reclaim under GFP_NOFS conditions, hence this
318 method does not need to handle that situation itself.
319
320 Implementations must include conditional reschedule calls inside any
321 scanning loop that is done. This allows the VFS to determine
322 appropriate scan batch sizes without having to worry about whether
323 implementations will cause holdoff problems due to large scan batch
324 sizes.
325
304Whoever sets up the inode is responsible for filling in the "i_op" field. This 326Whoever sets up the inode is responsible for filling in the "i_op" field. This
305is a pointer to a "struct inode_operations" which describes the methods that 327is a pointer to a "struct inode_operations" which describes the methods that
306can be performed on individual inodes. 328can be performed on individual inodes.
@@ -333,8 +355,8 @@ struct inode_operations {
333 void * (*follow_link) (struct dentry *, struct nameidata *); 355 void * (*follow_link) (struct dentry *, struct nameidata *);
334 void (*put_link) (struct dentry *, struct nameidata *, void *); 356 void (*put_link) (struct dentry *, struct nameidata *, void *);
335 void (*truncate) (struct inode *); 357 void (*truncate) (struct inode *);
336 int (*permission) (struct inode *, int, unsigned int); 358 int (*permission) (struct inode *, int);
337 int (*check_acl)(struct inode *, int, unsigned int); 359 int (*get_acl)(struct inode *, int);
338 int (*setattr) (struct dentry *, struct iattr *); 360 int (*setattr) (struct dentry *, struct iattr *);
339 int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); 361 int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
340 int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); 362 int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
@@ -423,7 +445,7 @@ otherwise noted.
423 permission: called by the VFS to check for access rights on a POSIX-like 445 permission: called by the VFS to check for access rights on a POSIX-like
424 filesystem. 446 filesystem.
425 447
426 May be called in rcu-walk mode (flags & IPERM_FLAG_RCU). If in rcu-walk 448 May be called in rcu-walk mode (mask & MAY_NOT_BLOCK). If in rcu-walk
427 mode, the filesystem must check the permission without blocking or 449 mode, the filesystem must check the permission without blocking or
428 storing to the inode. 450 storing to the inode.
429 451
@@ -755,7 +777,7 @@ struct file_operations {
755 int (*open) (struct inode *, struct file *); 777 int (*open) (struct inode *, struct file *);
756 int (*flush) (struct file *); 778 int (*flush) (struct file *);
757 int (*release) (struct inode *, struct file *); 779 int (*release) (struct inode *, struct file *);
758 int (*fsync) (struct file *, int datasync); 780 int (*fsync) (struct file *, loff_t, loff_t, int datasync);
759 int (*aio_fsync) (struct kiocb *, int datasync); 781 int (*aio_fsync) (struct kiocb *, int datasync);
760 int (*fasync) (int, struct file *, int); 782 int (*fasync) (int, struct file *, int);
761 int (*lock) (struct file *, int, struct file_lock *); 783 int (*lock) (struct file *, int, struct file_lock *);