diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bio.c | 2 | ||||
-rw-r--r-- | fs/buffer.c | 11 | ||||
-rw-r--r-- | fs/fs-writeback.c | 4 | ||||
-rw-r--r-- | fs/mpage.c | 92 | ||||
-rw-r--r-- | fs/proc/base.c | 2 | ||||
-rw-r--r-- | fs/seq_file.c | 9 | ||||
-rw-r--r-- | fs/sysfs/file.c | 4 |
7 files changed, 67 insertions, 57 deletions
@@ -140,6 +140,7 @@ inline void bio_init(struct bio *bio) | |||
140 | * bio_alloc_bioset - allocate a bio for I/O | 140 | * bio_alloc_bioset - allocate a bio for I/O |
141 | * @gfp_mask: the GFP_ mask given to the slab allocator | 141 | * @gfp_mask: the GFP_ mask given to the slab allocator |
142 | * @nr_iovecs: number of iovecs to pre-allocate | 142 | * @nr_iovecs: number of iovecs to pre-allocate |
143 | * @bs: the bio_set to allocate from | ||
143 | * | 144 | * |
144 | * Description: | 145 | * Description: |
145 | * bio_alloc_bioset will first try it's on mempool to satisfy the allocation. | 146 | * bio_alloc_bioset will first try it's on mempool to satisfy the allocation. |
@@ -629,6 +630,7 @@ out: | |||
629 | 630 | ||
630 | /** | 631 | /** |
631 | * bio_map_user - map user address into bio | 632 | * bio_map_user - map user address into bio |
633 | * @q: the request_queue_t for the bio | ||
632 | * @bdev: destination block device | 634 | * @bdev: destination block device |
633 | * @uaddr: start of user address | 635 | * @uaddr: start of user address |
634 | * @len: length in bytes | 636 | * @len: length in bytes |
diff --git a/fs/buffer.c b/fs/buffer.c index 792cbacbbf41..5f525b3c6d9f 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -774,15 +774,14 @@ repeat: | |||
774 | /** | 774 | /** |
775 | * sync_mapping_buffers - write out and wait upon a mapping's "associated" | 775 | * sync_mapping_buffers - write out and wait upon a mapping's "associated" |
776 | * buffers | 776 | * buffers |
777 | * @buffer_mapping - the mapping which backs the buffers' data | 777 | * @mapping: the mapping which wants those buffers written |
778 | * @mapping - the mapping which wants those buffers written | ||
779 | * | 778 | * |
780 | * Starts I/O against the buffers at mapping->private_list, and waits upon | 779 | * Starts I/O against the buffers at mapping->private_list, and waits upon |
781 | * that I/O. | 780 | * that I/O. |
782 | * | 781 | * |
783 | * Basically, this is a convenience function for fsync(). @buffer_mapping is | 782 | * Basically, this is a convenience function for fsync(). |
784 | * the blockdev which "owns" the buffers and @mapping is a file or directory | 783 | * @mapping is a file or directory which needs those buffers to be written for |
785 | * which needs those buffers to be written for a successful fsync(). | 784 | * a successful fsync(). |
786 | */ | 785 | */ |
787 | int sync_mapping_buffers(struct address_space *mapping) | 786 | int sync_mapping_buffers(struct address_space *mapping) |
788 | { | 787 | { |
@@ -1263,6 +1262,7 @@ __getblk_slow(struct block_device *bdev, sector_t block, int size) | |||
1263 | 1262 | ||
1264 | /** | 1263 | /** |
1265 | * mark_buffer_dirty - mark a buffer_head as needing writeout | 1264 | * mark_buffer_dirty - mark a buffer_head as needing writeout |
1265 | * @bh: the buffer_head to mark dirty | ||
1266 | * | 1266 | * |
1267 | * mark_buffer_dirty() will set the dirty bit against the buffer, then set its | 1267 | * mark_buffer_dirty() will set the dirty bit against the buffer, then set its |
1268 | * backing page dirty, then tag the page as dirty in its address_space's radix | 1268 | * backing page dirty, then tag the page as dirty in its address_space's radix |
@@ -1501,6 +1501,7 @@ EXPORT_SYMBOL(__breadahead); | |||
1501 | 1501 | ||
1502 | /** | 1502 | /** |
1503 | * __bread() - reads a specified block and returns the bh | 1503 | * __bread() - reads a specified block and returns the bh |
1504 | * @bdev: the block_device to read from | ||
1504 | * @block: number of block | 1505 | * @block: number of block |
1505 | * @size: size (in bytes) to read | 1506 | * @size: size (in bytes) to read |
1506 | * | 1507 | * |
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index d6efb36cab2a..8e050fa58218 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c | |||
@@ -512,7 +512,8 @@ restart: | |||
512 | } | 512 | } |
513 | 513 | ||
514 | /** | 514 | /** |
515 | * sync_inodes | 515 | * sync_inodes - writes all inodes to disk |
516 | * @wait: wait for completion | ||
516 | * | 517 | * |
517 | * sync_inodes() goes through each super block's dirty inode list, writes the | 518 | * sync_inodes() goes through each super block's dirty inode list, writes the |
518 | * inodes out, waits on the writeout and puts the inodes back on the normal | 519 | * inodes out, waits on the writeout and puts the inodes back on the normal |
@@ -604,6 +605,7 @@ EXPORT_SYMBOL(sync_inode); | |||
604 | /** | 605 | /** |
605 | * generic_osync_inode - flush all dirty data for a given inode to disk | 606 | * generic_osync_inode - flush all dirty data for a given inode to disk |
606 | * @inode: inode to write | 607 | * @inode: inode to write |
608 | * @mapping: the address_space that should be flushed | ||
607 | * @what: what to write and wait upon | 609 | * @what: what to write and wait upon |
608 | * | 610 | * |
609 | * This can be called by file_write functions for files which have the | 611 | * This can be called by file_write functions for files which have the |
diff --git a/fs/mpage.c b/fs/mpage.c index 3923facf94eb..32c7c8fcfce7 100644 --- a/fs/mpage.c +++ b/fs/mpage.c | |||
@@ -160,52 +160,6 @@ map_buffer_to_page(struct page *page, struct buffer_head *bh, int page_block) | |||
160 | } while (page_bh != head); | 160 | } while (page_bh != head); |
161 | } | 161 | } |
162 | 162 | ||
163 | /** | ||
164 | * mpage_readpages - populate an address space with some pages, and | ||
165 | * start reads against them. | ||
166 | * | ||
167 | * @mapping: the address_space | ||
168 | * @pages: The address of a list_head which contains the target pages. These | ||
169 | * pages have their ->index populated and are otherwise uninitialised. | ||
170 | * | ||
171 | * The page at @pages->prev has the lowest file offset, and reads should be | ||
172 | * issued in @pages->prev to @pages->next order. | ||
173 | * | ||
174 | * @nr_pages: The number of pages at *@pages | ||
175 | * @get_block: The filesystem's block mapper function. | ||
176 | * | ||
177 | * This function walks the pages and the blocks within each page, building and | ||
178 | * emitting large BIOs. | ||
179 | * | ||
180 | * If anything unusual happens, such as: | ||
181 | * | ||
182 | * - encountering a page which has buffers | ||
183 | * - encountering a page which has a non-hole after a hole | ||
184 | * - encountering a page with non-contiguous blocks | ||
185 | * | ||
186 | * then this code just gives up and calls the buffer_head-based read function. | ||
187 | * It does handle a page which has holes at the end - that is a common case: | ||
188 | * the end-of-file on blocksize < PAGE_CACHE_SIZE setups. | ||
189 | * | ||
190 | * BH_Boundary explanation: | ||
191 | * | ||
192 | * There is a problem. The mpage read code assembles several pages, gets all | ||
193 | * their disk mappings, and then submits them all. That's fine, but obtaining | ||
194 | * the disk mappings may require I/O. Reads of indirect blocks, for example. | ||
195 | * | ||
196 | * So an mpage read of the first 16 blocks of an ext2 file will cause I/O to be | ||
197 | * submitted in the following order: | ||
198 | * 12 0 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16 | ||
199 | * because the indirect block has to be read to get the mappings of blocks | ||
200 | * 13,14,15,16. Obviously, this impacts performance. | ||
201 | * | ||
202 | * So what we do it to allow the filesystem's get_block() function to set | ||
203 | * BH_Boundary when it maps block 11. BH_Boundary says: mapping of the block | ||
204 | * after this one will require I/O against a block which is probably close to | ||
205 | * this one. So you should push what I/O you have currently accumulated. | ||
206 | * | ||
207 | * This all causes the disk requests to be issued in the correct order. | ||
208 | */ | ||
209 | static struct bio * | 163 | static struct bio * |
210 | do_mpage_readpage(struct bio *bio, struct page *page, unsigned nr_pages, | 164 | do_mpage_readpage(struct bio *bio, struct page *page, unsigned nr_pages, |
211 | sector_t *last_block_in_bio, get_block_t get_block) | 165 | sector_t *last_block_in_bio, get_block_t get_block) |
@@ -320,6 +274,52 @@ confused: | |||
320 | goto out; | 274 | goto out; |
321 | } | 275 | } |
322 | 276 | ||
277 | /** | ||
278 | * mpage_readpages - populate an address space with some pages, and | ||
279 | * start reads against them. | ||
280 | * | ||
281 | * @mapping: the address_space | ||
282 | * @pages: The address of a list_head which contains the target pages. These | ||
283 | * pages have their ->index populated and are otherwise uninitialised. | ||
284 | * | ||
285 | * The page at @pages->prev has the lowest file offset, and reads should be | ||
286 | * issued in @pages->prev to @pages->next order. | ||
287 | * | ||
288 | * @nr_pages: The number of pages at *@pages | ||
289 | * @get_block: The filesystem's block mapper function. | ||
290 | * | ||
291 | * This function walks the pages and the blocks within each page, building and | ||
292 | * emitting large BIOs. | ||
293 | * | ||
294 | * If anything unusual happens, such as: | ||
295 | * | ||
296 | * - encountering a page which has buffers | ||
297 | * - encountering a page which has a non-hole after a hole | ||
298 | * - encountering a page with non-contiguous blocks | ||
299 | * | ||
300 | * then this code just gives up and calls the buffer_head-based read function. | ||
301 | * It does handle a page which has holes at the end - that is a common case: | ||
302 | * the end-of-file on blocksize < PAGE_CACHE_SIZE setups. | ||
303 | * | ||
304 | * BH_Boundary explanation: | ||
305 | * | ||
306 | * There is a problem. The mpage read code assembles several pages, gets all | ||
307 | * their disk mappings, and then submits them all. That's fine, but obtaining | ||
308 | * the disk mappings may require I/O. Reads of indirect blocks, for example. | ||
309 | * | ||
310 | * So an mpage read of the first 16 blocks of an ext2 file will cause I/O to be | ||
311 | * submitted in the following order: | ||
312 | * 12 0 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16 | ||
313 | * because the indirect block has to be read to get the mappings of blocks | ||
314 | * 13,14,15,16. Obviously, this impacts performance. | ||
315 | * | ||
316 | * So what we do it to allow the filesystem's get_block() function to set | ||
317 | * BH_Boundary when it maps block 11. BH_Boundary says: mapping of the block | ||
318 | * after this one will require I/O against a block which is probably close to | ||
319 | * this one. So you should push what I/O you have currently accumulated. | ||
320 | * | ||
321 | * This all causes the disk requests to be issued in the correct order. | ||
322 | */ | ||
323 | int | 323 | int |
324 | mpage_readpages(struct address_space *mapping, struct list_head *pages, | 324 | mpage_readpages(struct address_space *mapping, struct list_head *pages, |
325 | unsigned nr_pages, get_block_t get_block) | 325 | unsigned nr_pages, get_block_t get_block) |
diff --git a/fs/proc/base.c b/fs/proc/base.c index 2b8cd045111c..07cafdf74ef2 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -1742,7 +1742,7 @@ struct dentry *proc_pid_unhash(struct task_struct *p) | |||
1742 | 1742 | ||
1743 | /** | 1743 | /** |
1744 | * proc_pid_flush - recover memory used by stale /proc/@pid/x entries | 1744 | * proc_pid_flush - recover memory used by stale /proc/@pid/x entries |
1745 | * @proc_entry: directoy to prune. | 1745 | * @proc_dentry: directoy to prune. |
1746 | * | 1746 | * |
1747 | * Shrink the /proc directory that was used by the just killed thread. | 1747 | * Shrink the /proc directory that was used by the just killed thread. |
1748 | */ | 1748 | */ |
diff --git a/fs/seq_file.c b/fs/seq_file.c index 650c43ba86c4..38ef913767ff 100644 --- a/fs/seq_file.c +++ b/fs/seq_file.c | |||
@@ -51,7 +51,10 @@ EXPORT_SYMBOL(seq_open); | |||
51 | 51 | ||
52 | /** | 52 | /** |
53 | * seq_read - ->read() method for sequential files. | 53 | * seq_read - ->read() method for sequential files. |
54 | * @file, @buf, @size, @ppos: see file_operations method | 54 | * @file: the file to read from |
55 | * @buf: the buffer to read to | ||
56 | * @size: the maximum number of bytes to read | ||
57 | * @ppos: the current position in the file | ||
55 | * | 58 | * |
56 | * Ready-made ->f_op->read() | 59 | * Ready-made ->f_op->read() |
57 | */ | 60 | */ |
@@ -219,7 +222,9 @@ Eoverflow: | |||
219 | 222 | ||
220 | /** | 223 | /** |
221 | * seq_lseek - ->llseek() method for sequential files. | 224 | * seq_lseek - ->llseek() method for sequential files. |
222 | * @file, @offset, @origin: see file_operations method | 225 | * @file: the file in question |
226 | * @offset: new position | ||
227 | * @origin: 0 for absolute, 1 for relative position | ||
223 | * | 228 | * |
224 | * Ready-made ->f_op->llseek() | 229 | * Ready-made ->f_op->llseek() |
225 | */ | 230 | */ |
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index da25aeb0e062..364208071e17 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c | |||
@@ -96,7 +96,7 @@ static int fill_read_buffer(struct dentry * dentry, struct sysfs_buffer * buffer | |||
96 | /** | 96 | /** |
97 | * flush_read_buffer - push buffer to userspace. | 97 | * flush_read_buffer - push buffer to userspace. |
98 | * @buffer: data buffer for file. | 98 | * @buffer: data buffer for file. |
99 | * @userbuf: user-passed buffer. | 99 | * @buf: user-passed buffer. |
100 | * @count: number of bytes requested. | 100 | * @count: number of bytes requested. |
101 | * @ppos: file position. | 101 | * @ppos: file position. |
102 | * | 102 | * |
@@ -164,7 +164,7 @@ out: | |||
164 | /** | 164 | /** |
165 | * fill_write_buffer - copy buffer from userspace. | 165 | * fill_write_buffer - copy buffer from userspace. |
166 | * @buffer: data buffer for file. | 166 | * @buffer: data buffer for file. |
167 | * @userbuf: data from user. | 167 | * @buf: data from user. |
168 | * @count: number of bytes in @userbuf. | 168 | * @count: number of bytes in @userbuf. |
169 | * | 169 | * |
170 | * Allocate @buffer->page if it hasn't been already, then | 170 | * Allocate @buffer->page if it hasn't been already, then |