f2fs: allocate blocks for pinned file
This patch allows fallocate to allocate physical blocks for pinned file. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
@@ -1528,7 +1528,12 @@ static int expand_inode_data(struct inode *inode, loff_t offset,
|
||||
if (off_end)
|
||||
map.m_len++;
|
||||
|
||||
err = f2fs_map_blocks(inode, &map, 1, F2FS_GET_BLOCK_PRE_AIO);
|
||||
if (f2fs_is_pinned_file(inode))
|
||||
map.m_seg_type = CURSEG_COLD_DATA;
|
||||
|
||||
err = f2fs_map_blocks(inode, &map, 1, (f2fs_is_pinned_file(inode) ?
|
||||
F2FS_GET_BLOCK_PRE_DIO :
|
||||
F2FS_GET_BLOCK_PRE_AIO));
|
||||
if (err) {
|
||||
pgoff_t last_off;
|
||||
|
||||
|
Reference in New Issue
Block a user