Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp753860ybb; Wed, 25 Mar 2020 08:58:58 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtIc6oTyR+DD+Do1RWUNDeuJ8cbCrJHWQzTgZrMZZMWpVWSWfqttEldRNDOmFkHDzJz7sEg X-Received: by 2002:a05:6830:4025:: with SMTP id i5mr3086106ots.203.1585151938757; Wed, 25 Mar 2020 08:58:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585151938; cv=none; d=google.com; s=arc-20160816; b=WCQU/lv+2tfQUYEg5g8iIjumPI1XmeiFXv/a11QWxb6Kve1ebXUzPvvgeC5FE7DD3Y O1LxTw+rUxYMMzXTZSXjHg/K3CbDt2RZjRhVEq538O5Yv2n9g4O21LLMGZO805bflw5E yBBJjOZZk1OrxVVObHr2hfgAhy1bAKbxx5v6saK9Kkiso2V9T8d24QAa0g/9u6lq+kgS iuW5ZqV9jHdDIv3TtkY7wonK960hjgywItMp9CVf3RO2QzMaJYC6ipSMJYorLUfD2hJT wKh4Mxh5XswvS+qIax9+DGc71vg5qyWlwR6Z+shgNnu0Q6J2zMNYxSvIx4iDtTdBhuJ3 S+LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Bgo+Wra9hmQz7pHxUHMG3wIw7vOhUiz/LWeqeYLGvqc=; b=OqBHRpjcvzyjHoxqIxfk7xWN2sO7p2WZp0t1uQ1ig2hvvv+jZvRPyvsBdL6w6VY7Fy 2c82hCPDvADLxYj19hk8HdCXfXz7oQW9zecM7MnAhLHg6/iK5d45YAUeawi1YlG/FnSe QAe0/6iQIRNoohXwA0JEHeGD9gXUmyvCbMbbLChekJXomynBgl4rLDGKj1AjTdwzE8ed J+NNcp7tS8C/vmTq1/8ZTTwU+ibOMQLPFEIHMUVmh1R/6PMy3elYjY8w9WvDcnM3IibJ 8KGeALRMI/28n9tc0MbzeXcD3lJa+g0UNNkQX0QTqR5aUBOnQiYFTirtOC1aNTbXGdwA u8Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=V+62TTJE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w23si11411864oti.18.2020.03.25.08.58.44; Wed, 25 Mar 2020 08:58:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=V+62TTJE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727936AbgCYP6I (ORCPT + 99 others); Wed, 25 Mar 2020 11:58:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:51536 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727448AbgCYP6H (ORCPT ); Wed, 25 Mar 2020 11:58:07 -0400 Received: from localhost (unknown [104.132.1.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1F0202073E; Wed, 25 Mar 2020 15:58:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585151887; bh=yuKPw9zHwSe4jPNUbVFEbNmFqcIFFFDut0JgQS3oKmM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=V+62TTJEnnakM8FVs3+TfAH+O1aXF1HvMmeMiJl/SqXlqkbVYSu62irvYLvhOUN74 9ev7B2Xcdw4Owa+w+k2grU+BoD5RMypGl7iUXrhiOEp6YankzEDZfP3nlJ56BPJpPl /sEtWZSo85MnjUDhIvS/bwuNA1k8K0yE3Prk7BcM= Date: Wed, 25 Mar 2020 08:58:06 -0700 From: Jaegeuk Kim To: Chao Yu Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, chao@kernel.org Subject: Re: [PATCH RFC] f2fs: don't inline compressed inode Message-ID: <20200325155806.GC65658@google.com> References: <20200325092754.63411-1-yuchao0@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200325092754.63411-1-yuchao0@huawei.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/25, Chao Yu wrote: > f2fs_may_inline_data() only check compressed flag on current inode > rather than on parent inode, however at this time compressed flag > has not been inherited yet. When write() or other allocation happens, it'll be reset. > > Signed-off-by: Chao Yu > --- > > Jaegeuk, > > I'm not sure about this, whether inline_data flag can be compatible with > compress flag, thoughts? > > fs/f2fs/namei.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c > index f54119da2217..3807d1b4c4bc 100644 > --- a/fs/f2fs/namei.c > +++ b/fs/f2fs/namei.c > @@ -86,7 +86,8 @@ static struct inode *f2fs_new_inode(struct inode *dir, umode_t mode) > if (test_opt(sbi, INLINE_XATTR)) > set_inode_flag(inode, FI_INLINE_XATTR); > > - if (test_opt(sbi, INLINE_DATA) && f2fs_may_inline_data(inode)) > + if (test_opt(sbi, INLINE_DATA) && f2fs_may_inline_data(inode) && > + !f2fs_compressed_file(dir)) > set_inode_flag(inode, FI_INLINE_DATA); > if (f2fs_may_inline_dentry(inode)) > set_inode_flag(inode, FI_INLINE_DENTRY); > -- > 2.18.0.rc1