aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-01-24 16:17:06 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-24 16:17:06 -0500
commite92427b289d252cfbd4cb5282d92f4ce1a5bb1fb (patch)
tree6d30e5e7b7f8e9aaa51d43b7128ac56860fa03bb /Documentation/filesystems
parentc506653d35249bb4738bb139c24362e1ae724bc1 (diff)
parentec30f343d61391ab23705e50a525da1d55395780 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r--Documentation/filesystems/Locking9
-rw-r--r--Documentation/filesystems/ntfs.txt3
-rw-r--r--Documentation/filesystems/porting17
-rw-r--r--Documentation/filesystems/proc.txt7
-rw-r--r--Documentation/filesystems/vfs.txt47
5 files changed, 73 insertions, 10 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index 977d8919cc69..4471a416c274 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -19,6 +19,8 @@ prototypes:
19 void (*d_release)(struct dentry *); 19 void (*d_release)(struct dentry *);
20 void (*d_iput)(struct dentry *, struct inode *); 20 void (*d_iput)(struct dentry *, struct inode *);
21 char *(*d_dname)((struct dentry *dentry, char *buffer, int buflen); 21 char *(*d_dname)((struct dentry *dentry, char *buffer, int buflen);
22 struct vfsmount *(*d_automount)(struct path *path);
23 int (*d_manage)(struct dentry *, bool);
22 24
23locking rules: 25locking rules:
24 rename_lock ->d_lock may block rcu-walk 26 rename_lock ->d_lock may block rcu-walk
@@ -29,6 +31,8 @@ d_delete: no yes no no
29d_release: no no yes no 31d_release: no no yes no
30d_iput: no no yes no 32d_iput: no no yes no
31d_dname: no no no no 33d_dname: no no no no
34d_automount: no no yes no
35d_manage: no no yes (ref-walk) maybe
32 36
33--------------------------- inode_operations --------------------------- 37--------------------------- inode_operations ---------------------------
34prototypes: 38prototypes:
@@ -56,7 +60,6 @@ ata *);
56 ssize_t (*listxattr) (struct dentry *, char *, size_t); 60 ssize_t (*listxattr) (struct dentry *, char *, size_t);
57 int (*removexattr) (struct dentry *, const char *); 61 int (*removexattr) (struct dentry *, const char *);
58 void (*truncate_range)(struct inode *, loff_t, loff_t); 62 void (*truncate_range)(struct inode *, loff_t, loff_t);
59 long (*fallocate)(struct inode *inode, int mode, loff_t offset, loff_t len);
60 int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len); 63 int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len);
61 64
62locking rules: 65locking rules:
@@ -84,7 +87,6 @@ getxattr: no
84listxattr: no 87listxattr: no
85removexattr: yes 88removexattr: yes
86truncate_range: yes 89truncate_range: yes
87fallocate: no
88fiemap: no 90fiemap: no
89 Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on 91 Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on
90victim. 92victim.
@@ -343,7 +345,6 @@ prototypes:
343 int (*fl_grant)(struct file_lock *, struct file_lock *, int); 345 int (*fl_grant)(struct file_lock *, struct file_lock *, int);
344 void (*fl_release_private)(struct file_lock *); 346 void (*fl_release_private)(struct file_lock *);
345 void (*fl_break)(struct file_lock *); /* break_lease callback */ 347 void (*fl_break)(struct file_lock *); /* break_lease callback */
346 int (*fl_mylease)(struct file_lock *, struct file_lock *);
347 int (*fl_change)(struct file_lock **, int); 348 int (*fl_change)(struct file_lock **, int);
348 349
349locking rules: 350locking rules:
@@ -353,7 +354,6 @@ fl_notify: yes no
353fl_grant: no no 354fl_grant: no no
354fl_release_private: maybe no 355fl_release_private: maybe no
355fl_break: yes no 356fl_break: yes no
356fl_mylease: yes no
357fl_change yes no 357fl_change yes no
358 358
359--------------------------- buffer_head ----------------------------------- 359--------------------------- buffer_head -----------------------------------
@@ -435,6 +435,7 @@ prototypes:
435 ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, 435 ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *,
436 size_t, unsigned int); 436 size_t, unsigned int);
437 int (*setlease)(struct file *, long, struct file_lock **); 437 int (*setlease)(struct file *, long, struct file_lock **);
438 long (*fallocate)(struct file *, int, loff_t, loff_t);
438}; 439};
439 440
440locking rules: 441locking rules:
diff --git a/Documentation/filesystems/ntfs.txt b/Documentation/filesystems/ntfs.txt
index ac2a261c5f7d..6ef8cf3bc9a3 100644
--- a/Documentation/filesystems/ntfs.txt
+++ b/Documentation/filesystems/ntfs.txt
@@ -457,6 +457,9 @@ ChangeLog
457 457
458Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog. 458Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog.
459 459
4602.1.30:
461 - Fix writev() (it kept writing the first segment over and over again
462 instead of moving onto subsequent segments).
4602.1.29: 4632.1.29:
461 - Fix a deadlock when mounting read-write. 464 - Fix a deadlock when mounting read-write.
4622.1.28: 4652.1.28:
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index 07a32b42cf9c..dfbcd1b00b0a 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -365,8 +365,8 @@ must be done in the RCU callback.
365[recommended] 365[recommended]
366 vfs now tries to do path walking in "rcu-walk mode", which avoids 366 vfs now tries to do path walking in "rcu-walk mode", which avoids
367atomic operations and scalability hazards on dentries and inodes (see 367atomic operations and scalability hazards on dentries and inodes (see
368Documentation/filesystems/path-walk.txt). d_hash and d_compare changes (above) 368Documentation/filesystems/path-lookup.txt). d_hash and d_compare changes
369are examples of the changes required to support this. For more complex 369(above) are examples of the changes required to support this. For more complex
370filesystem callbacks, the vfs drops out of rcu-walk mode before the fs call, so 370filesystem callbacks, the vfs drops out of rcu-walk mode before the fs call, so
371no changes are required to the filesystem. However, this is costly and loses 371no changes are required to the filesystem. However, this is costly and loses
372the benefits of rcu-walk mode. We will begin to add filesystem callbacks that 372the benefits of rcu-walk mode. We will begin to add filesystem callbacks that
@@ -383,5 +383,14 @@ Documentation/filesystems/vfs.txt for more details.
383 383
384 permission and check_acl are inode permission checks that are called 384 permission and check_acl are inode permission checks that are called
385on many or all directory inodes on the way down a path walk (to check for 385on many or all directory inodes on the way down a path walk (to check for
386exec permission). These must now be rcu-walk aware (flags & IPERM_RCU). See 386exec permission). These must now be rcu-walk aware (flags & IPERM_FLAG_RCU).
387Documentation/filesystems/vfs.txt for more details. 387See Documentation/filesystems/vfs.txt for more details.
388
389--
390[mandatory]
391 In ->fallocate() you must check the mode option passed in. If your
392filesystem does not support hole punching (deallocating space in the middle of a
393file) you must return -EOPNOTSUPP if FALLOC_FL_PUNCH_HOLE is set in mode.
394Currently you can only have FALLOC_FL_PUNCH_HOLE with FALLOC_FL_KEEP_SIZE set,
395so the i_size should not change when hole punching, even when puching the end of
396a file off.
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index 9471225212c4..23cae6548d3a 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -375,6 +375,7 @@ Anonymous: 0 kB
375Swap: 0 kB 375Swap: 0 kB
376KernelPageSize: 4 kB 376KernelPageSize: 4 kB
377MMUPageSize: 4 kB 377MMUPageSize: 4 kB
378Locked: 374 kB
378 379
379The first of these lines shows the same information as is displayed for the 380The first of these lines shows the same information as is displayed for the
380mapping in /proc/PID/maps. The remaining lines show the size of the mapping 381mapping in /proc/PID/maps. The remaining lines show the size of the mapping
@@ -670,6 +671,8 @@ varies by architecture and compile options. The following is from a
670 671
671> cat /proc/meminfo 672> cat /proc/meminfo
672 673
674The "Locked" indicates whether the mapping is locked in memory or not.
675
673 676
674MemTotal: 16344972 kB 677MemTotal: 16344972 kB
675MemFree: 13634064 kB 678MemFree: 13634064 kB
@@ -1320,6 +1323,10 @@ scaled linearly with /proc/<pid>/oom_score_adj.
1320Writing to /proc/<pid>/oom_score_adj or /proc/<pid>/oom_adj will change the 1323Writing to /proc/<pid>/oom_score_adj or /proc/<pid>/oom_adj will change the
1321other with its scaled value. 1324other with its scaled value.
1322 1325
1326The value of /proc/<pid>/oom_score_adj may be reduced no lower than the last
1327value set by a CAP_SYS_RESOURCE process. To reduce the value any lower
1328requires CAP_SYS_RESOURCE.
1329
1323NOTICE: /proc/<pid>/oom_adj is deprecated and will be removed, please see 1330NOTICE: /proc/<pid>/oom_adj is deprecated and will be removed, please see
1324Documentation/feature-removal-schedule.txt. 1331Documentation/feature-removal-schedule.txt.
1325 1332
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index fbb324e2bd43..94cf97b901d7 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -415,8 +415,8 @@ otherwise noted.
415 permission: called by the VFS to check for access rights on a POSIX-like 415 permission: called by the VFS to check for access rights on a POSIX-like
416 filesystem. 416 filesystem.
417 417
418 May be called in rcu-walk mode (flags & IPERM_RCU). If in rcu-walk 418 May be called in rcu-walk mode (flags & IPERM_FLAG_RCU). If in rcu-walk
419 mode, the filesystem must check the permission without blocking or 419 mode, the filesystem must check the permission without blocking or
420 storing to the inode. 420 storing to the inode.
421 421
422 If a situation is encountered that rcu-walk cannot handle, return 422 If a situation is encountered that rcu-walk cannot handle, return
@@ -864,6 +864,8 @@ struct dentry_operations {
864 void (*d_release)(struct dentry *); 864 void (*d_release)(struct dentry *);
865 void (*d_iput)(struct dentry *, struct inode *); 865 void (*d_iput)(struct dentry *, struct inode *);
866 char *(*d_dname)(struct dentry *, char *, int); 866 char *(*d_dname)(struct dentry *, char *, int);
867 struct vfsmount *(*d_automount)(struct path *);
868 int (*d_manage)(struct dentry *, bool, bool);
867}; 869};
868 870
869 d_revalidate: called when the VFS needs to revalidate a dentry. This 871 d_revalidate: called when the VFS needs to revalidate a dentry. This
@@ -930,6 +932,47 @@ struct dentry_operations {
930 at the end of the buffer, and returns a pointer to the first char. 932 at the end of the buffer, and returns a pointer to the first char.
931 dynamic_dname() helper function is provided to take care of this. 933 dynamic_dname() helper function is provided to take care of this.
932 934
935 d_automount: called when an automount dentry is to be traversed (optional).
936 This should create a new VFS mount record and return the record to the
937 caller. The caller is supplied with a path parameter giving the
938 automount directory to describe the automount target and the parent
939 VFS mount record to provide inheritable mount parameters. NULL should
940 be returned if someone else managed to make the automount first. If
941 the vfsmount creation failed, then an error code should be returned.
942 If -EISDIR is returned, then the directory will be treated as an
943 ordinary directory and returned to pathwalk to continue walking.
944
945 If a vfsmount is returned, the caller will attempt to mount it on the
946 mountpoint and will remove the vfsmount from its expiration list in
947 the case of failure. The vfsmount should be returned with 2 refs on
948 it to prevent automatic expiration - the caller will clean up the
949 additional ref.
950
951 This function is only used if DCACHE_NEED_AUTOMOUNT is set on the
952 dentry. This is set by __d_instantiate() if S_AUTOMOUNT is set on the
953 inode being added.
954
955 d_manage: called to allow the filesystem to manage the transition from a
956 dentry (optional). This allows autofs, for example, to hold up clients
957 waiting to explore behind a 'mountpoint' whilst letting the daemon go
958 past and construct the subtree there. 0 should be returned to let the
959 calling process continue. -EISDIR can be returned to tell pathwalk to
960 use this directory as an ordinary directory and to ignore anything
961 mounted on it and not to check the automount flag. Any other error
962 code will abort pathwalk completely.
963
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
969 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
971 -ECHILD.
972
973 This function is only used if DCACHE_MANAGE_TRANSIT is set on the
974 dentry being transited from.
975
933Example : 976Example :
934 977
935static char *pipefs_dname(struct dentry *dent, char *buffer, int buflen) 978static char *pipefs_dname(struct dentry *dent, char *buffer, int buflen)