Re: [f2fs-dev] [PATCH 2/2] f2fs: recover some i_inline flags

From: Chao Yu
Date: Sat Jan 20 2018 - 04:33:59 EST


On 2018/1/20 12:26, Jaegeuk Kim wrote:
> This fixes lost i_inline flags during roll-forward.
>
> Signed-off-by: Jaegeuk Kim <jaegeuk@xxxxxxxxxx>
> ---
> fs/f2fs/recovery.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
> index cbeef73bc4dd..2354f1e05e19 100644
> --- a/fs/f2fs/recovery.c
> +++ b/fs/f2fs/recovery.c
> @@ -211,6 +211,15 @@ static void recover_inode(struct inode *inode, struct page *page)
>
> F2FS_I(inode)->i_advise = raw->i_advise;

How about adding recover_inline_flags() including below changes?

>
> + if (raw->i_inline & F2FS_PIN_FILE)
> + set_inode_flag(inode, FI_PIN_FILE);

else
clear_inode_flag(inode, FI_PIN_FILE); ?

Thanks,

> + if (raw->i_inline & F2FS_DATA_EXIST)
> + set_inode_flag(inode, FI_DATA_EXIST);
> + else
> + clear_inode_flag(inode, FI_DATA_EXIST);
> + if (!(raw->i_inline & F2FS_INLINE_DOTS))
> + clear_inode_flag(inode, FI_INLINE_DOTS);
> +
> if (file_enc_name(inode))
> name = "<encrypted>";
> else
>