aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/data.c
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2013-12-21 05:02:14 -0500
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-12-22 20:26:03 -0500
commit4f4124d0b99682efa7307191a28ec050872d2079 (patch)
treeaf2ba4a8c2dba592834e7aea6dede7f680453bdd /fs/f2fs/data.c
parent7e8f23081ab3a11de90d7389f2c6fd44676c8df9 (diff)
f2fs: update several comments
Update several comments: 1. use f2fs_{un}lock_op install of mutex_{un}lock_op. 2. update comment of get_data_block(). 3. update description of node offset. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r--fs/f2fs/data.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index e46b5c52d2ed..0879d2aa97e6 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -508,8 +508,8 @@ repeat:
508 * Caller ensures that this data page is never allocated. 508 * Caller ensures that this data page is never allocated.
509 * A new zero-filled data page is allocated in the page cache. 509 * A new zero-filled data page is allocated in the page cache.
510 * 510 *
511 * Also, caller should grab and release a mutex by calling mutex_lock_op() and 511 * Also, caller should grab and release a rwsem by calling f2fs_lock_op() and
512 * mutex_unlock_op(). 512 * f2fs_unlock_op().
513 * Note that, npage is set only by make_empty_dir. 513 * Note that, npage is set only by make_empty_dir.
514 */ 514 */
515struct page *get_new_data_page(struct inode *inode, 515struct page *get_new_data_page(struct inode *inode,
@@ -595,10 +595,12 @@ static int __allocate_data_block(struct dnode_of_data *dn)
595} 595}
596 596
597/* 597/*
598 * This function should be used by the data read flow only where it 598 * get_data_block() now supported readahead/bmap/rw direct_IO with mapped bh.
599 * does not check the "create" flag that indicates block allocation. 599 * If original data blocks are allocated, then give them to blockdev.
600 * The reason for this special functionality is to exploit VFS readahead 600 * Otherwise,
601 * mechanism. 601 * a. preallocate requested block addresses
602 * b. do not use extent cache for better performance
603 * c. give the block addresses to blockdev
602 */ 604 */
603static int get_data_block(struct inode *inode, sector_t iblock, 605static int get_data_block(struct inode *inode, sector_t iblock,
604 struct buffer_head *bh_result, int create) 606 struct buffer_head *bh_result, int create)