Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp509872ybd; Sat, 29 Jun 2019 01:39:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwhO91h6vEp6CICCFhmkM/C8KsDhKa69jxyiMBVI5NpblQ84ff05l5EKePCzvojpi300bvZ X-Received: by 2002:a17:90a:a116:: with SMTP id s22mr18028191pjp.47.1561797554470; Sat, 29 Jun 2019 01:39:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561797554; cv=none; d=google.com; s=arc-20160816; b=FuIKBILA3b5StozyrkuqnRLN5OivxC7ZsQvgotraLMAEL2CS9YQUmTxX6TgXFad9+a HzeXwrOHcXSTJxVLSXJ0gAzOgLsGpikRlJW8AD3YeILNwxE4xLYffiOQXpAL/XuQb0KF j9LPdGUzGKlZLnwYxr2hhhXbbSsG3qjAzf7ohqDJh+tCXvcSp097/aSsRuOy/HlWGtAS cf8CubY54viZGlbeEj51cUwnUrKkamn5B28HLVtenQu+6lFxVr6bNeqqHqjXz+LaenAz tCPVwkfcURBwJ1/t3fTVDzZPzHJrubPTJzXlJToqLIwPl/59MB6lAPmstwzdDFEJcqPN xXhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=C/t21YFS78C4VWU1TTIJV4+oJ7JOhqtQMDjpJwnFEIg=; b=g5Ec66Y0YqzQJ6EGh/yOjZ5zqW6YSgPFR4n4zbGXeO/tV+PXucnDX/1mLYCcBNlFaH whoIaMkCy7xFivqm8/RVyKvTqPK/O0nF07FAqy60mky6SYsXYLVHD4EdHfjP5Pbd0Q/w 9giZBe6eFupcHAIRQDzWblAwTVt/ncdMRu/+o7Sd0Pjde/oINpAlJdAhodG+2z/F3UOa bM8leOqcbCc1hbrfyQsathjNP6OWIbR2tkgmv9QSmkox65uvVBI1/5xURhM3z0y790CD nESEjafgff+P0u7oITK7jwBYMJCb4SXn+SEK5tW4XIIF5RwT+nMov95to4d/hvjAXiUV P0IQ== 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 s14si4200528pgs.254.2019.06.29.01.38.58; Sat, 29 Jun 2019 01:39:14 -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 S1726844AbfF2Iit (ORCPT + 99 others); Sat, 29 Jun 2019 04:38:49 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:7680 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726795AbfF2Iis (ORCPT ); Sat, 29 Jun 2019 04:38:48 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 41C8D1123E9AD6730A49; Sat, 29 Jun 2019 16:38:46 +0800 (CST) Received: from [10.134.22.195] (10.134.22.195) by smtp.huawei.com (10.3.19.214) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 29 Jun 2019 16:38:39 +0800 Subject: Re: [PATCH] staging: erofs: don't check special inode layout To: Yue Hu , Gao Xiang CC: , , , , , Miao Xie References: <20190628034234.8832-1-zbestahu@gmail.com> <276837dc-b18a-6f20-fc33-d988dff5ae9f@huawei.com> <20190628121952.000028fc.zbestahu@gmail.com> From: Chao Yu Message-ID: Date: Sat, 29 Jun 2019 16:38:39 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190628121952.000028fc.zbestahu@gmail.com> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/6/28 12:19, Yue Hu wrote: > On Fri, 28 Jun 2019 11:50:21 +0800 > Gao Xiang wrote: > >> Hi Yue, >> >> On 2019/6/28 11:42, Yue Hu wrote: >>> From: Yue Hu >>> >>> Currently, we will check if inode layout is compression or inline if >>> the inode is special in fill_inode(). Also set ->i_mapping->a_ops for >>> it. That is pointless since the both modes won't be set for special >>> inode when creating EROFS filesystem image. So, let's avoid it. >>> >>> Signed-off-by: Yue Hu >> >> Have you test this patch with some actual image with legacy mkfs since >> new mkfs framework have not supported special inode... > > Hi Xiang, > > I'm studying the testing :) > > However, already check the code handling for special inode in leagcy mkfs as below: > > ```c > break; > case EROFS_FT_BLKDEV: > case EROFS_FT_CHRDEV: > case EROFS_FT_FIFO: > case EROFS_FT_SOCK: > mkfs_rank_inode(d); > break; > > default: > erofs_err("inode[%s] file_type error =%d", > d->i_fullpath, > ``` > > No special inode layout operations, so this change should be fine. > > Thx. > >> >> I think that is fine in priciple, however, in case to introduce some potential >> issues, I will test this patch later. I will give a Reviewed-by tag after I tested >> this patch. This patch looks good to me, if this won't fail any tests from Xiang, you can add: Reviewed-by: Chao Yu Thanks, > > Thanks. > >> >> Thanks, >> Gao Xiang >> >>> --- >>> drivers/staging/erofs/inode.c | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --git a/drivers/staging/erofs/inode.c b/drivers/staging/erofs/inode.c >>> index 1433f25..2fe0f6d 100644 >>> --- a/drivers/staging/erofs/inode.c >>> +++ b/drivers/staging/erofs/inode.c >>> @@ -205,6 +205,7 @@ static int fill_inode(struct inode *inode, int isdir) >>> S_ISFIFO(inode->i_mode) || S_ISSOCK(inode->i_mode)) { >>> inode->i_op = &erofs_generic_iops; >>> init_special_inode(inode, inode->i_mode, inode->i_rdev); >>> + goto out_unlock; >>> } else { >>> err = -EIO; >>> goto out_unlock; >>> > > . >