linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Jaegeuk Kim <jaegeuk@kernel.org>,
	linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH 2/2] f2fs: recover some i_inline flags
Date: Sat, 20 Jan 2018 17:33:15 +0800	[thread overview]
Message-ID: <d12c6d69-7141-d667-279e-323e4fce39af@kernel.org> (raw)
In-Reply-To: <20180120042643.20717-2-jaegeuk@kernel.org>

On 2018/1/20 12:26, Jaegeuk Kim wrote:
> This fixes lost i_inline flags during roll-forward.
> 
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
>  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
> 

  reply	other threads:[~2018-01-20  9:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-20  4:26 [PATCH 1/2] f2fs: allow to recover node blocks given updated checkpoint Jaegeuk Kim
2018-01-20  4:26 ` [PATCH 2/2] f2fs: recover some i_inline flags Jaegeuk Kim
2018-01-20  9:33   ` Chao Yu [this message]
2018-01-20 22:06   ` [PATCH 2/2 v2] " Jaegeuk Kim
2018-01-21  2:42     ` [f2fs-dev] " Chao Yu
2018-01-20  9:29 ` [f2fs-dev] [PATCH 1/2] f2fs: allow to recover node blocks given updated checkpoint Chao Yu
2018-01-20 22:05 ` [PATCH 1/2 v2] " Jaegeuk Kim
2018-01-21  2:41   ` [f2fs-dev] " Chao Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d12c6d69-7141-d667-279e-323e4fce39af@kernel.org \
    --to=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).