summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/gc.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2017-09-05 17:04:35 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2017-09-05 20:21:48 -0700
commitd4c759ee5faa51e0b0ee55d8a229ba5b80c4917e (patch)
tree7ca28f80d5556105f86196e39d03062ee9a9950d /fs/f2fs/gc.c
parent1958593e4fa9fa9e3e2d03b27e72af314c2891be (diff)
downloadop-kernel-dev-d4c759ee5faa51e0b0ee55d8a229ba5b80c4917e.zip
op-kernel-dev-d4c759ee5faa51e0b0ee55d8a229ba5b80c4917e.tar.gz
f2fs: use generic terms used for encrypted block management
This patch renames functions regarding to buffer management via META_MAPPING used for encrypted blocks especially. We can actually use them in generic way. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/gc.c')
-rw-r--r--fs/f2fs/gc.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 6a12f33..bfe6a8c 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -599,8 +599,12 @@ static bool is_alive(struct f2fs_sb_info *sbi, struct f2fs_summary *sum,
return true;
}
-static void move_encrypted_block(struct inode *inode, block_t bidx,
- unsigned int segno, int off)
+/*
+ * Move data block via META_MAPPING while keeping locked data page.
+ * This can be used to move blocks, aka LBAs, directly on disk.
+ */
+static void move_data_block(struct inode *inode, block_t bidx,
+ unsigned int segno, int off)
{
struct f2fs_io_info fio = {
.sbi = F2FS_I_SB(inode),
@@ -873,9 +877,10 @@ next_step:
start_bidx = start_bidx_of_node(nofs, inode)
+ ofs_in_node;
if (f2fs_encrypted_file(inode))
- move_encrypted_block(inode, start_bidx, segno, off);
+ move_data_block(inode, start_bidx, segno, off);
else
- move_data_page(inode, start_bidx, gc_type, segno, off);
+ move_data_page(inode, start_bidx, gc_type,
+ segno, off);
if (locked) {
up_write(&fi->dio_rwsem[WRITE]);
OpenPOWER on IntegriCloud