Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2327856ybb; Fri, 27 Mar 2020 03:31:24 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuOqewr8SPFEEMzTVWjz3kFdIt33fFrWlM6wg3Qj4tSCzEN48DAzcZXAZYzo1+czN/fnxXa X-Received: by 2002:a05:6830:1c65:: with SMTP id s5mr7000266otg.25.1585305084593; Fri, 27 Mar 2020 03:31:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585305084; cv=none; d=google.com; s=arc-20160816; b=DTLqkd0yvDsRQni7ThsnH+w0cqUGFBslNot8wcYntTFHIsER21gd4S3OnLXNwAzuwq 6i0VOBV95W2c6iB3zp8QFkVd3z0yJhx4FkiQ3D7ofWVjH9dlIRD2gzV2S5UWO+6LrJG1 jFy4/Sr2xFLNPoDW07Epcx3XtTf/YEcWoGGrO7f/Z7a7DA3dbfBh/nrbfh5qYm+8ke8/ eTaTiG6fru3OhfeNCdRvmOU+vI6uwvnrpSHna/JGZ8gs/u+59cvXOfDIy+Sk/iLbUftA gjxzoQa0S48GFde726uB0qgrDBv95+g4t70Jfqgae+k1fuDA834GY4kLCqVqTQYyQdnE i4fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=Thapt64gBibUNUikcGgyvDjacVqXIEjZzOM0AvjyjbE=; b=WsZOCDzw43au5uiTo9/AGcQ93ywbz/vcfGGNGf7x0rv12lht77NJ+OEypEsQ5Ffvid kmlp+5GFSQlNMcpZjLpHnUtYZwgQSH96qsCDLg+X+45xX09mG0tOUriz5r51X78HAzPI aEIP5Yir94D962diaYhtMKXyi8aGxMSdwPNXYHihV+mysc/LEVWU2jBJy1aVqHK6RhNV Yu99qOqDp2pcqrbMyhPTKJqgFcfZOkGZEyPzACczTbrq1gU5sx6mncj8ZtUrEr6EDd4s tNeihJI8i3zcKOH/hdBy7qiiDmkhb7DdON8oYerSAqfBtD0x7ZUle8pUtdIaW4Lniup+ kXpg== 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 r6si1993751oij.49.2020.03.27.03.31.11; Fri, 27 Mar 2020 03:31:24 -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 S1727444AbgC0KaM (ORCPT + 99 others); Fri, 27 Mar 2020 06:30:12 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:38600 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726002AbgC0KaM (ORCPT ); Fri, 27 Mar 2020 06:30:12 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 7AE4EB349D00C049249D; Fri, 27 Mar 2020 18:30:03 +0800 (CST) Received: from szvp000203569.huawei.com (10.120.216.130) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.487.0; Fri, 27 Mar 2020 18:29:57 +0800 From: Chao Yu To: CC: , , , Chao Yu Subject: [PATCH 2/3] f2fs: keep inline_data when compression conversion Date: Fri, 27 Mar 2020 18:29:52 +0800 Message-ID: <20200327102953.104035-2-yuchao0@huawei.com> X-Mailer: git-send-email 2.18.0.rc1 In-Reply-To: <20200327102953.104035-1-yuchao0@huawei.com> References: <20200327102953.104035-1-yuchao0@huawei.com> 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 We can keep compressed inode's data inline before inline conversion. Signed-off-by: Chao Yu --- fs/f2fs/file.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 6cb3c6cae7cd..21f7108ca2ba 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1822,11 +1822,6 @@ static int f2fs_setflags_common(struct inode *inode, u32 iflags, u32 mask) if (iflags & F2FS_NOCOMP_FL) return -EINVAL; if (iflags & F2FS_COMPR_FL) { - int err = f2fs_convert_inline_inode(inode); - - if (err) - return err; - if (!f2fs_may_compress(inode)) return -EINVAL; -- 2.18.0.rc1