diff options
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r-- | Documentation/filesystems/Locking | 12 | ||||
-rw-r--r-- | Documentation/filesystems/vfat.txt | 32 | ||||
-rw-r--r-- | Documentation/filesystems/vfs.txt | 39 | ||||
-rw-r--r-- | Documentation/filesystems/xip.txt | 9 |
4 files changed, 47 insertions, 45 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 8362860e21a7..23d2f4460deb 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -161,8 +161,12 @@ prototypes: | |||
161 | int (*set_page_dirty)(struct page *page); | 161 | int (*set_page_dirty)(struct page *page); |
162 | int (*readpages)(struct file *filp, struct address_space *mapping, | 162 | int (*readpages)(struct file *filp, struct address_space *mapping, |
163 | struct list_head *pages, unsigned nr_pages); | 163 | struct list_head *pages, unsigned nr_pages); |
164 | int (*prepare_write)(struct file *, struct page *, unsigned, unsigned); | 164 | int (*write_begin)(struct file *, struct address_space *mapping, |
165 | int (*commit_write)(struct file *, struct page *, unsigned, unsigned); | 165 | loff_t pos, unsigned len, unsigned flags, |
166 | struct page **pagep, void **fsdata); | ||
167 | int (*write_end)(struct file *, struct address_space *mapping, | ||
168 | loff_t pos, unsigned len, unsigned copied, | ||
169 | struct page *page, void *fsdata); | ||
166 | sector_t (*bmap)(struct address_space *, sector_t); | 170 | sector_t (*bmap)(struct address_space *, sector_t); |
167 | int (*invalidatepage) (struct page *, unsigned long); | 171 | int (*invalidatepage) (struct page *, unsigned long); |
168 | int (*releasepage) (struct page *, int); | 172 | int (*releasepage) (struct page *, int); |
@@ -180,8 +184,6 @@ sync_page: no maybe | |||
180 | writepages: no | 184 | writepages: no |
181 | set_page_dirty no no | 185 | set_page_dirty no no |
182 | readpages: no | 186 | readpages: no |
183 | prepare_write: no yes yes | ||
184 | commit_write: no yes yes | ||
185 | write_begin: no locks the page yes | 187 | write_begin: no locks the page yes |
186 | write_end: no yes, unlocks yes | 188 | write_end: no yes, unlocks yes |
187 | perform_write: no n/a yes | 189 | perform_write: no n/a yes |
@@ -191,7 +193,7 @@ releasepage: no yes | |||
191 | direct_IO: no | 193 | direct_IO: no |
192 | launder_page: no yes | 194 | launder_page: no yes |
193 | 195 | ||
194 | ->prepare_write(), ->commit_write(), ->sync_page() and ->readpage() | 196 | ->write_begin(), ->write_end(), ->sync_page() and ->readpage() |
195 | may be called from the request handler (/dev/loop). | 197 | may be called from the request handler (/dev/loop). |
196 | 198 | ||
197 | ->readpage() unlocks the page, either synchronously or via I/O | 199 | ->readpage() unlocks the page, either synchronously or via I/O |
diff --git a/Documentation/filesystems/vfat.txt b/Documentation/filesystems/vfat.txt index bbac4f1d9056..3a5ddc96901a 100644 --- a/Documentation/filesystems/vfat.txt +++ b/Documentation/filesystems/vfat.txt | |||
@@ -8,6 +8,12 @@ if you want to format from within Linux. | |||
8 | 8 | ||
9 | VFAT MOUNT OPTIONS | 9 | VFAT MOUNT OPTIONS |
10 | ---------------------------------------------------------------------- | 10 | ---------------------------------------------------------------------- |
11 | uid=### -- Set the owner of all files on this filesystem. | ||
12 | The default is the uid of current process. | ||
13 | |||
14 | gid=### -- Set the group of all files on this filesystem. | ||
15 | The default is the gid of current process. | ||
16 | |||
11 | umask=### -- The permission mask (for files and directories, see umask(1)). | 17 | umask=### -- The permission mask (for files and directories, see umask(1)). |
12 | The default is the umask of current process. | 18 | The default is the umask of current process. |
13 | 19 | ||
@@ -36,7 +42,7 @@ codepage=### -- Sets the codepage number for converting to shortname | |||
36 | characters on FAT filesystem. | 42 | characters on FAT filesystem. |
37 | By default, FAT_DEFAULT_CODEPAGE setting is used. | 43 | By default, FAT_DEFAULT_CODEPAGE setting is used. |
38 | 44 | ||
39 | iocharset=name -- Character set to use for converting between the | 45 | iocharset=<name> -- Character set to use for converting between the |
40 | encoding is used for user visible filename and 16 bit | 46 | encoding is used for user visible filename and 16 bit |
41 | Unicode characters. Long filenames are stored on disk | 47 | Unicode characters. Long filenames are stored on disk |
42 | in Unicode format, but Unix for the most part doesn't | 48 | in Unicode format, but Unix for the most part doesn't |
@@ -86,6 +92,8 @@ check=s|r|n -- Case sensitivity checking setting. | |||
86 | r: relaxed, case insensitive | 92 | r: relaxed, case insensitive |
87 | n: normal, default setting, currently case insensitive | 93 | n: normal, default setting, currently case insensitive |
88 | 94 | ||
95 | nocase -- This was deprecated for vfat. Use shortname=win95 instead. | ||
96 | |||
89 | shortname=lower|win95|winnt|mixed | 97 | shortname=lower|win95|winnt|mixed |
90 | -- Shortname display/create setting. | 98 | -- Shortname display/create setting. |
91 | lower: convert to lowercase for display, | 99 | lower: convert to lowercase for display, |
@@ -99,11 +107,31 @@ shortname=lower|win95|winnt|mixed | |||
99 | tz=UTC -- Interpret timestamps as UTC rather than local time. | 107 | tz=UTC -- Interpret timestamps as UTC rather than local time. |
100 | This option disables the conversion of timestamps | 108 | This option disables the conversion of timestamps |
101 | between local time (as used by Windows on FAT) and UTC | 109 | between local time (as used by Windows on FAT) and UTC |
102 | (which Linux uses internally). This is particuluarly | 110 | (which Linux uses internally). This is particularly |
103 | useful when mounting devices (like digital cameras) | 111 | useful when mounting devices (like digital cameras) |
104 | that are set to UTC in order to avoid the pitfalls of | 112 | that are set to UTC in order to avoid the pitfalls of |
105 | local time. | 113 | local time. |
106 | 114 | ||
115 | showexec -- If set, the execute permission bits of the file will be | ||
116 | allowed only if the extension part of the name is .EXE, | ||
117 | .COM, or .BAT. Not set by default. | ||
118 | |||
119 | debug -- Can be set, but unused by the current implementation. | ||
120 | |||
121 | sys_immutable -- If set, ATTR_SYS attribute on FAT is handled as | ||
122 | IMMUTABLE flag on Linux. Not set by default. | ||
123 | |||
124 | flush -- If set, the filesystem will try to flush to disk more | ||
125 | early than normal. Not set by default. | ||
126 | |||
127 | rodir -- FAT has the ATTR_RO (read-only) attribute. But on Windows, | ||
128 | the ATTR_RO of the directory will be just ignored actually, | ||
129 | and is used by only applications as flag. E.g. it's setted | ||
130 | for the customized folder. | ||
131 | |||
132 | If you want to use ATTR_RO as read-only flag even for | ||
133 | the directory, set this option. | ||
134 | |||
107 | <bool>: 0,1,yes,no,true,false | 135 | <bool>: 0,1,yes,no,true,false |
108 | 136 | ||
109 | TODO | 137 | TODO |
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index c4d348dabe94..5579bda58a6d 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -492,7 +492,7 @@ written-back to storage typically in whole pages, however the | |||
492 | address_space has finer control of write sizes. | 492 | address_space has finer control of write sizes. |
493 | 493 | ||
494 | The read process essentially only requires 'readpage'. The write | 494 | The read process essentially only requires 'readpage'. The write |
495 | process is more complicated and uses prepare_write/commit_write or | 495 | process is more complicated and uses write_begin/write_end or |
496 | set_page_dirty to write data into the address_space, and writepage, | 496 | set_page_dirty to write data into the address_space, and writepage, |
497 | sync_page, and writepages to writeback data to storage. | 497 | sync_page, and writepages to writeback data to storage. |
498 | 498 | ||
@@ -521,8 +521,6 @@ struct address_space_operations { | |||
521 | int (*set_page_dirty)(struct page *page); | 521 | int (*set_page_dirty)(struct page *page); |
522 | int (*readpages)(struct file *filp, struct address_space *mapping, | 522 | int (*readpages)(struct file *filp, struct address_space *mapping, |
523 | struct list_head *pages, unsigned nr_pages); | 523 | struct list_head *pages, unsigned nr_pages); |
524 | int (*prepare_write)(struct file *, struct page *, unsigned, unsigned); | ||
525 | int (*commit_write)(struct file *, struct page *, unsigned, unsigned); | ||
526 | int (*write_begin)(struct file *, struct address_space *mapping, | 524 | int (*write_begin)(struct file *, struct address_space *mapping, |
527 | loff_t pos, unsigned len, unsigned flags, | 525 | loff_t pos, unsigned len, unsigned flags, |
528 | struct page **pagep, void **fsdata); | 526 | struct page **pagep, void **fsdata); |
@@ -598,37 +596,7 @@ struct address_space_operations { | |||
598 | readpages is only used for read-ahead, so read errors are | 596 | readpages is only used for read-ahead, so read errors are |
599 | ignored. If anything goes wrong, feel free to give up. | 597 | ignored. If anything goes wrong, feel free to give up. |
600 | 598 | ||
601 | prepare_write: called by the generic write path in VM to set up a write | 599 | write_begin: |
602 | request for a page. This indicates to the address space that | ||
603 | the given range of bytes is about to be written. The | ||
604 | address_space should check that the write will be able to | ||
605 | complete, by allocating space if necessary and doing any other | ||
606 | internal housekeeping. If the write will update parts of | ||
607 | any basic-blocks on storage, then those blocks should be | ||
608 | pre-read (if they haven't been read already) so that the | ||
609 | updated blocks can be written out properly. | ||
610 | The page will be locked. | ||
611 | |||
612 | Note: the page _must not_ be marked uptodate in this function | ||
613 | (or anywhere else) unless it actually is uptodate right now. As | ||
614 | soon as a page is marked uptodate, it is possible for a concurrent | ||
615 | read(2) to copy it to userspace. | ||
616 | |||
617 | commit_write: If prepare_write succeeds, new data will be copied | ||
618 | into the page and then commit_write will be called. It will | ||
619 | typically update the size of the file (if appropriate) and | ||
620 | mark the inode as dirty, and do any other related housekeeping | ||
621 | operations. It should avoid returning an error if possible - | ||
622 | errors should have been handled by prepare_write. | ||
623 | |||
624 | write_begin: This is intended as a replacement for prepare_write. The | ||
625 | key differences being that: | ||
626 | - it returns a locked page (in *pagep) rather than being | ||
627 | given a pre locked page; | ||
628 | - it must be able to cope with short writes (where the | ||
629 | length passed to write_begin is greater than the number | ||
630 | of bytes copied into the page). | ||
631 | |||
632 | Called by the generic buffered write code to ask the filesystem to | 600 | Called by the generic buffered write code to ask the filesystem to |
633 | prepare to write len bytes at the given offset in the file. The | 601 | prepare to write len bytes at the given offset in the file. The |
634 | address_space should check that the write will be able to complete, | 602 | address_space should check that the write will be able to complete, |
@@ -640,6 +608,9 @@ struct address_space_operations { | |||
640 | The filesystem must return the locked pagecache page for the specified | 608 | The filesystem must return the locked pagecache page for the specified |
641 | offset, in *pagep, for the caller to write into. | 609 | offset, in *pagep, for the caller to write into. |
642 | 610 | ||
611 | It must be able to cope with short writes (where the length passed to | ||
612 | write_begin is greater than the number of bytes copied into the page). | ||
613 | |||
643 | flags is a field for AOP_FLAG_xxx flags, described in | 614 | flags is a field for AOP_FLAG_xxx flags, described in |
644 | include/linux/fs.h. | 615 | include/linux/fs.h. |
645 | 616 | ||
diff --git a/Documentation/filesystems/xip.txt b/Documentation/filesystems/xip.txt index 3cc4010521a0..0466ee569278 100644 --- a/Documentation/filesystems/xip.txt +++ b/Documentation/filesystems/xip.txt | |||
@@ -39,10 +39,11 @@ The block device operation is optional, these block devices support it as of | |||
39 | today: | 39 | today: |
40 | - dcssblk: s390 dcss block device driver | 40 | - dcssblk: s390 dcss block device driver |
41 | 41 | ||
42 | An address space operation named get_xip_page is used to retrieve reference | 42 | An address space operation named get_xip_mem is used to retrieve references |
43 | to a struct page. To address the target page, a reference to an address_space, | 43 | to a page frame number and a kernel address. To obtain these values a reference |
44 | and a sector number is provided. A 3rd argument indicates whether the | 44 | to an address_space is provided. This function assigns values to the kmem and |
45 | function should allocate blocks if needed. | 45 | pfn parameters. The third argument indicates whether the function should allocate |
46 | blocks if needed. | ||
46 | 47 | ||
47 | This address space operation is mutually exclusive with readpage&writepage that | 48 | This address space operation is mutually exclusive with readpage&writepage that |
48 | do page cache read/write operations. | 49 | do page cache read/write operations. |