diff options
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r-- | Documentation/filesystems/Locking | 5 | ||||
-rw-r--r-- | Documentation/filesystems/ext3.txt | 6 | ||||
-rw-r--r-- | Documentation/filesystems/porting | 16 | ||||
-rw-r--r-- | Documentation/filesystems/proc.txt | 25 | ||||
-rw-r--r-- | Documentation/filesystems/vfs.txt | 17 |
5 files changed, 50 insertions, 19 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 4fca82e5276e..8e2da1e06e3b 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -60,8 +60,8 @@ ata *); | |||
60 | ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); | 60 | ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); |
61 | ssize_t (*listxattr) (struct dentry *, char *, size_t); | 61 | ssize_t (*listxattr) (struct dentry *, char *, size_t); |
62 | int (*removexattr) (struct dentry *, const char *); | 62 | int (*removexattr) (struct dentry *, const char *); |
63 | void (*truncate_range)(struct inode *, loff_t, loff_t); | ||
64 | 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); |
64 | void (*update_time)(struct inode *, struct timespec *, int); | ||
65 | 65 | ||
66 | locking rules: | 66 | locking rules: |
67 | all may block | 67 | all may block |
@@ -87,8 +87,9 @@ setxattr: yes | |||
87 | getxattr: no | 87 | getxattr: no |
88 | listxattr: no | 88 | listxattr: no |
89 | removexattr: yes | 89 | removexattr: yes |
90 | truncate_range: yes | ||
91 | fiemap: no | 90 | fiemap: no |
91 | update_time: no | ||
92 | |||
92 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on | 93 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on |
93 | victim. | 94 | victim. |
94 | cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem. | 95 | cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem. |
diff --git a/Documentation/filesystems/ext3.txt b/Documentation/filesystems/ext3.txt index b100adc38adb..293855e95000 100644 --- a/Documentation/filesystems/ext3.txt +++ b/Documentation/filesystems/ext3.txt | |||
@@ -59,9 +59,9 @@ commit=nrsec (*) Ext3 can be told to sync all its data and metadata | |||
59 | Setting it to very large values will improve | 59 | Setting it to very large values will improve |
60 | performance. | 60 | performance. |
61 | 61 | ||
62 | barrier=<0(*)|1> This enables/disables the use of write barriers in | 62 | barrier=<0|1(*)> This enables/disables the use of write barriers in |
63 | barrier the jbd code. barrier=0 disables, barrier=1 enables. | 63 | barrier (*) the jbd code. barrier=0 disables, barrier=1 enables. |
64 | nobarrier (*) This also requires an IO stack which can support | 64 | nobarrier This also requires an IO stack which can support |
65 | barriers, and if jbd gets an error on a barrier | 65 | barriers, and if jbd gets an error on a barrier |
66 | write, it will disable again with a warning. | 66 | write, it will disable again with a warning. |
67 | Write barriers enforce proper on-disk ordering | 67 | Write barriers enforce proper on-disk ordering |
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index 74acd9618819..8c91d1057d9a 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting | |||
@@ -297,7 +297,8 @@ in the beginning of ->setattr unconditionally. | |||
297 | be used instead. It gets called whenever the inode is evicted, whether it has | 297 | 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(). Caller makes sure async writeback cannot be running |
301 | for the inode while (or after) ->evict_inode() is called. | ||
301 | 302 | ||
302 | ->drop_inode() returns int now; it's called on final iput() with | 303 | ->drop_inode() returns int now; it's called on final iput() with |
303 | inode->i_lock held and it returns true if filesystems wants the inode to be | 304 | inode->i_lock held and it returns true if filesystems wants the inode to be |
@@ -306,14 +307,11 @@ 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 | simply of return 1. Note that all actual eviction work is done by caller after |
307 | ->drop_inode() returns. | 308 | ->drop_inode() returns. |
308 | 309 | ||
309 | clear_inode() is gone; use end_writeback() instead. As before, it must | 310 | As before, clear_inode() must be called exactly once on each call of |
310 | be called exactly once on each call of ->evict_inode() (as it used to be for | 311 | ->evict_inode() (as it used to be for each call of ->delete_inode()). Unlike |
311 | each call of ->delete_inode()). Unlike before, if you are using inode-associated | 312 | before, if you are using inode-associated metadata buffers (i.e. |
312 | metadata buffers (i.e. mark_buffer_dirty_inode()), it's your responsibility to | 313 | mark_buffer_dirty_inode()), it's your responsibility to call |
313 | call invalidate_inode_buffers() before end_writeback(). | 314 | invalidate_inode_buffers() before clear_inode(). |
314 | No async writeback (and thus no calls of ->write_inode()) will happen | ||
315 | after end_writeback() returns, so actions that should not overlap with ->write_inode() | ||
316 | (e.g. freeing on-disk inode if i_nlink is 0) ought to be done after that call. | ||
317 | 315 | ||
318 | NOTE: checking i_nlink in the beginning of ->write_inode() and bailing out | 316 | NOTE: checking i_nlink in the beginning of ->write_inode() and bailing out |
319 | if it's zero is not *and* *never* *had* *been* enough. Final unlink() and iput() | 317 | if it's zero is not *and* *never* *had* *been* enough. Final unlink() and iput() |
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index ef088e55ab2e..fb0a6aeb936c 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -40,6 +40,7 @@ Table of Contents | |||
40 | 3.4 /proc/<pid>/coredump_filter - Core dump filtering settings | 40 | 3.4 /proc/<pid>/coredump_filter - Core dump filtering settings |
41 | 3.5 /proc/<pid>/mountinfo - Information about mounts | 41 | 3.5 /proc/<pid>/mountinfo - Information about mounts |
42 | 3.6 /proc/<pid>/comm & /proc/<pid>/task/<tid>/comm | 42 | 3.6 /proc/<pid>/comm & /proc/<pid>/task/<tid>/comm |
43 | 3.7 /proc/<pid>/task/<tid>/children - Information about task children | ||
43 | 44 | ||
44 | 4 Configuring procfs | 45 | 4 Configuring procfs |
45 | 4.1 Mount options | 46 | 4.1 Mount options |
@@ -310,6 +311,11 @@ Table 1-4: Contents of the stat files (as of 2.6.30-rc7) | |||
310 | start_data address above which program data+bss is placed | 311 | start_data address above which program data+bss is placed |
311 | end_data address below which program data+bss is placed | 312 | end_data address below which program data+bss is placed |
312 | start_brk address above which program heap can be expanded with brk() | 313 | start_brk address above which program heap can be expanded with brk() |
314 | arg_start address above which program command line is placed | ||
315 | arg_end address below which program command line is placed | ||
316 | env_start address above which program environment is placed | ||
317 | env_end address below which program environment is placed | ||
318 | exit_code the thread's exit_code in the form reported by the waitpid system call | ||
313 | .............................................................................. | 319 | .............................................................................. |
314 | 320 | ||
315 | The /proc/PID/maps file containing the currently mapped memory regions and | 321 | The /proc/PID/maps file containing the currently mapped memory regions and |
@@ -743,6 +749,7 @@ Committed_AS: 100056 kB | |||
743 | VmallocTotal: 112216 kB | 749 | VmallocTotal: 112216 kB |
744 | VmallocUsed: 428 kB | 750 | VmallocUsed: 428 kB |
745 | VmallocChunk: 111088 kB | 751 | VmallocChunk: 111088 kB |
752 | AnonHugePages: 49152 kB | ||
746 | 753 | ||
747 | MemTotal: Total usable ram (i.e. physical ram minus a few reserved | 754 | MemTotal: Total usable ram (i.e. physical ram minus a few reserved |
748 | bits and the kernel binary code) | 755 | bits and the kernel binary code) |
@@ -776,6 +783,7 @@ VmallocChunk: 111088 kB | |||
776 | Dirty: Memory which is waiting to get written back to the disk | 783 | Dirty: Memory which is waiting to get written back to the disk |
777 | Writeback: Memory which is actively being written back to the disk | 784 | Writeback: Memory which is actively being written back to the disk |
778 | AnonPages: Non-file backed pages mapped into userspace page tables | 785 | AnonPages: Non-file backed pages mapped into userspace page tables |
786 | AnonHugePages: Non-file backed huge pages mapped into userspace page tables | ||
779 | Mapped: files which have been mmaped, such as libraries | 787 | Mapped: files which have been mmaped, such as libraries |
780 | Slab: in-kernel data structures cache | 788 | Slab: in-kernel data structures cache |
781 | SReclaimable: Part of Slab, that might be reclaimed, such as caches | 789 | SReclaimable: Part of Slab, that might be reclaimed, such as caches |
@@ -1576,6 +1584,23 @@ then the kernel's TASK_COMM_LEN (currently 16 chars) will result in a truncated | |||
1576 | comm value. | 1584 | comm value. |
1577 | 1585 | ||
1578 | 1586 | ||
1587 | 3.7 /proc/<pid>/task/<tid>/children - Information about task children | ||
1588 | ------------------------------------------------------------------------- | ||
1589 | This file provides a fast way to retrieve first level children pids | ||
1590 | of a task pointed by <pid>/<tid> pair. The format is a space separated | ||
1591 | stream of pids. | ||
1592 | |||
1593 | Note the "first level" here -- if a child has own children they will | ||
1594 | not be listed here, one needs to read /proc/<children-pid>/task/<tid>/children | ||
1595 | to obtain the descendants. | ||
1596 | |||
1597 | Since this interface is intended to be fast and cheap it doesn't | ||
1598 | guarantee to provide precise results and some children might be | ||
1599 | skipped, especially if they've exited right after we printed their | ||
1600 | pids, so one need to either stop or freeze processes being inspected | ||
1601 | if precise results are needed. | ||
1602 | |||
1603 | |||
1579 | ------------------------------------------------------------------------------ | 1604 | ------------------------------------------------------------------------------ |
1580 | Configuring procfs | 1605 | Configuring procfs |
1581 | ------------------------------------------------------------------------------ | 1606 | ------------------------------------------------------------------------------ |
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 0d0492028082..efd23f481704 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -363,7 +363,7 @@ struct inode_operations { | |||
363 | ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); | 363 | ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); |
364 | ssize_t (*listxattr) (struct dentry *, char *, size_t); | 364 | ssize_t (*listxattr) (struct dentry *, char *, size_t); |
365 | int (*removexattr) (struct dentry *, const char *); | 365 | int (*removexattr) (struct dentry *, const char *); |
366 | void (*truncate_range)(struct inode *, loff_t, loff_t); | 366 | void (*update_time)(struct inode *, struct timespec *, int); |
367 | }; | 367 | }; |
368 | 368 | ||
369 | Again, all methods are called without any locks being held, unless | 369 | Again, all methods are called without any locks being held, unless |
@@ -472,9 +472,9 @@ otherwise noted. | |||
472 | removexattr: called by the VFS to remove an extended attribute from | 472 | removexattr: called by the VFS to remove an extended attribute from |
473 | a file. This method is called by removexattr(2) system call. | 473 | a file. This method is called by removexattr(2) system call. |
474 | 474 | ||
475 | truncate_range: a method provided by the underlying filesystem to truncate a | 475 | update_time: called by the VFS to update a specific time or the i_version of |
476 | range of blocks , i.e. punch a hole somewhere in a file. | 476 | an inode. If this is not defined the VFS will update the inode itself |
477 | 477 | and call mark_inode_dirty_sync. | |
478 | 478 | ||
479 | The Address Space Object | 479 | The Address Space Object |
480 | ======================== | 480 | ======================== |
@@ -760,7 +760,7 @@ struct file_operations | |||
760 | ---------------------- | 760 | ---------------------- |
761 | 761 | ||
762 | This describes how the VFS can manipulate an open file. As of kernel | 762 | This describes how the VFS can manipulate an open file. As of kernel |
763 | 2.6.22, the following members are defined: | 763 | 3.5, the following members are defined: |
764 | 764 | ||
765 | struct file_operations { | 765 | struct file_operations { |
766 | struct module *owner; | 766 | struct module *owner; |
@@ -790,6 +790,8 @@ struct file_operations { | |||
790 | int (*flock) (struct file *, int, struct file_lock *); | 790 | int (*flock) (struct file *, int, struct file_lock *); |
791 | ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int); | 791 | ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int); |
792 | ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int); | 792 | ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int); |
793 | int (*setlease)(struct file *, long arg, struct file_lock **); | ||
794 | long (*fallocate)(struct file *, int mode, loff_t offset, loff_t len); | ||
793 | }; | 795 | }; |
794 | 796 | ||
795 | Again, all methods are called without any locks being held, unless | 797 | Again, all methods are called without any locks being held, unless |
@@ -858,6 +860,11 @@ otherwise noted. | |||
858 | splice_read: called by the VFS to splice data from file to a pipe. This | 860 | splice_read: called by the VFS to splice data from file to a pipe. This |
859 | method is used by the splice(2) system call | 861 | method is used by the splice(2) system call |
860 | 862 | ||
863 | setlease: called by the VFS to set or release a file lock lease. | ||
864 | setlease has the file_lock_lock held and must not sleep. | ||
865 | |||
866 | fallocate: called by the VFS to preallocate blocks or punch a hole. | ||
867 | |||
861 | Note that the file operations are implemented by the specific | 868 | Note that the file operations are implemented by the specific |
862 | filesystem in which the inode resides. When opening a device node | 869 | filesystem in which the inode resides. When opening a device node |
863 | (character or block special) most filesystems will call special | 870 | (character or block special) most filesystems will call special |