Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp422589ybb; Wed, 25 Mar 2020 02:28:39 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs4799r7zgIWK/jOLGP6F6VWtyGk6JQyZ9D7lU7QuWQiQv56dEUts+F5ZBMv6I+u3/Ztk9e X-Received: by 2002:a9d:264a:: with SMTP id a68mr1763613otb.176.1585128519495; Wed, 25 Mar 2020 02:28:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585128519; cv=none; d=google.com; s=arc-20160816; b=ib6qUdf4UXjKSAxpSiMr8NJodumTuGqLiYSgY5gWrv/4M0AK1RCSucMVb2XbRTgKML 2rQkOjnHU/N6v30bK4nQeG+IR7uAEwKyiKDvYG1NUI6+1Tc7/31DEyOUFQoakr0SdPvJ ka2gIUx5B2nArypa0hd1ROYfbELrY1R9Qoo5nzMYATHyXeyQ2LqC7+FoEuzy8SDevvhf PMueYVOKb1g6XF/P6kJHb7NQdFOap/oZizPgMXz6mpUw0bH450WERotVcQj27g7VvIKj CsLQZMwywCF4mSw9d6VQP4Xoxv+vf0hzfYf/HxXay+KtlvM23SI9aUzWYn2v+jEXLPn0 67kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=YbZxNwPMOjEPk9FZq08lJmnTJvPBViYKqPzj3gau33k=; b=T7Ynu59XzDwxZocsge/TXZ2YoKIZ6Cw8CvN8lfWBrK5zGQ2bKhXe1XnSj8QWjmDOC7 2wJxugVqjz4EjV+5hNacGGEK7pdQFPeNdps11wZ3EY2PoCbKG9Ax4O4fimuk1nmlifkh cGuFZaDoeFPuAJSJ6BWxUF+yVGBPPLbVIPBvKMDY9yiEvL4osRbcTSY792VKv3zSHHhe nmTzSY1U5DnvWLsYpxp1rJXBcc493Q8J/x3fnSRXp+QTKWPftsXl9QmLCb6Mj6rERI4u 6czv/QIwwZQxwu2bhRgJaMKFrYuAM0xJrDU2yPZ9H9wThBd35v6UazXkGgldXUE7FP8U LmxA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w83si9947899oie.244.2020.03.25.02.28.27; Wed, 25 Mar 2020 02:28:39 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726276AbgCYJ2L (ORCPT + 99 others); Wed, 25 Mar 2020 05:28:11 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:50722 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726139AbgCYJ2L (ORCPT ); Wed, 25 Mar 2020 05:28:11 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id E29A9AD761091BAF960F; Wed, 25 Mar 2020 17:28:07 +0800 (CST) Received: from szvp000203569.huawei.com (10.120.216.130) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Wed, 25 Mar 2020 17:27:59 +0800 From: Chao Yu To: CC: , , , Chao Yu Subject: [PATCH RFC] f2fs: don't inline compressed inode Date: Wed, 25 Mar 2020 17:27:54 +0800 Message-ID: <20200325092754.63411-1-yuchao0@huawei.com> X-Mailer: git-send-email 2.18.0.rc1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.120.216.130] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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