Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp7407216rwn; Tue, 13 Sep 2022 20:35:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR6EKD/adMT39imiI9ACaK+s0ls4fSHW1XRlQ0NuAi7vKSed0UxVtuZje/J8QJWx9nSyb5Ju X-Received: by 2002:a17:903:2410:b0:171:4bbc:2526 with SMTP id e16-20020a170903241000b001714bbc2526mr34589010plo.62.1663126549866; Tue, 13 Sep 2022 20:35:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663126549; cv=none; d=google.com; s=arc-20160816; b=NBXflZDfILwavchzwRED1FHfzCYoV43VSW/RJl2lu5YnvGsK76lBDzjKI03WogfQP5 WnLpnvzphYMPfQ/TSKHW6IbHBnM4oW1Elz56E7hoPnWK2V+4poaiN3cH+udT4w7m3IDw qnpgseJ+V0g1ADPL6hzmr2j+WXy5Y0sZHEae2qMtDmY92Dwt7d6ulNzgQ+qQkvfkzsWW O0pdTmPliiLvMHNlBY9dOyyXUG3pf++V6vpRTAN4uQGXeT+sa8GaWwgThUSzJGXhK21Y 7+mRMW6lZrtvsvUTO0NaT/N4gFvSONj9yxt9ocgvvrPzDsxmask4P1CRrSxwP8FtRxuz fM3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id :dkim-signature; bh=Hn4otagjumTw49USqUIv3aIESk39vSQ7nnrygHJA1RM=; b=kPC7E5O3h6W0LUeD7gfgj5bLaCZgD0dzAFvxBi+LXUYZuktT+lcsIXtp3vRxfpi79V 7Z/vLDq6T7XSIcBqDRD4sokceIQYJtoLFfsNoYO33b8CzJhpXgvODbPJDdlaQeqyIpCa KAwpUe4P6eIO1bgrlSe8RYqL+h4wD4JZvoXwKpLh7TbxT1g6YcCZf+rwTuuJ0xWXldAR y4iJJLGL8UVTzzScffwEMW95jq9CzByYwr6uUkUamNqwLhXJ4t0dHLN3L0uwIHieBj1P auamTzUoTqSn6Q+Dvwj+cZR1f5QxWvUlcqkv5kJIqrk28vnQ5UTbG+gGIkYoxQ29YLLI DFZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=Vv9q+dPE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y15-20020a056a00180f00b00540d7c20889si15697318pfa.8.2022.09.13.20.35.38; Tue, 13 Sep 2022 20:35:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=Vv9q+dPE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229544AbiINDPx (ORCPT + 99 others); Tue, 13 Sep 2022 23:15:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbiINDPt (ORCPT ); Tue, 13 Sep 2022 23:15:49 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59FA91EC40 for ; Tue, 13 Sep 2022 20:15:48 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id x1-20020a17090ab00100b001fda21bbc90so17512802pjq.3 for ; Tue, 13 Sep 2022 20:15:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date; bh=Hn4otagjumTw49USqUIv3aIESk39vSQ7nnrygHJA1RM=; b=Vv9q+dPE9Xt5hHPzis7fhX6kTsf1B9KGILvS9Ojq8U83fKBRmcuLAytyV2QPlwV4tm MxpCRzVvZOssnaXJZTjzUkqHQH6yPnaveU6FhJbYJm6NpNT3QwkJVx7cf8FMhTkZA5Dm nhXfarzfZC6Znu6jC8Q0FDXbCGV4vUa/bhcRXTIm4dskUe1cyzsInw23LNouaKzJuk5q tDzVCXjJkHoH1GgOKoRX7sPPHBjxq9j8JkBXCp3N6Dh54w4qgoGEYFB4TNxUh/I8wC4x cL3LeOT+MZ6xG7drZQmcK+eWC/ZVnbCSJX/C5Nje3JACRZB4GOGqC4K69NyWKizP0/Rq OleA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date; bh=Hn4otagjumTw49USqUIv3aIESk39vSQ7nnrygHJA1RM=; b=P0hDwaVGGezav06vvXYew/hfFP2Dd3CF9WnhliVkeiE9yl92fBNV9yyU4LxQX0Nt7u WZPkfqiYjWrQ8Uk66KyNoCpAORAZxTr6LIJhPjeyXSigX2JB57+x0lsLC00eGSIZquMz bv27/ImKmnX/gxC4fEjgBMlEgMlUNkGz3miTiNCwLP9x6zHJgFzVo3H/lbLDDMkDFl0E fsMji2apiCDgKqVxiS2/2xqGiqdFCikZNoMtfres/RGwCFVCq5MDJzpFEBJ+IsQSiQGJ sJDzKUp9wIOUn9N0qV7YkjIesVDsCdE11cWZIDXaRcIZ54SnDLV0Tq0VjYRSnnSprgqr CTvA== X-Gm-Message-State: ACrzQf3gButAj7EWUUTWYlf8H8J70JMaDG65CL1ZFNg1D50Y7z2B+GiA AohF3mqNZUYVT8xpMRb4Hmlj6Q== X-Received: by 2002:a17:90b:314b:b0:203:41c:2dbb with SMTP id ip11-20020a17090b314b00b00203041c2dbbmr2496401pjb.18.1663125347919; Tue, 13 Sep 2022 20:15:47 -0700 (PDT) Received: from ?IPV6:fdbd:ff1:ce00:427:1cff:3226:873b:1ccd? ([2400:8800:1f02:83:4000::9]) by smtp.gmail.com with ESMTPSA id o22-20020a17090a5b1600b001fd77933fb3sm8133364pji.17.2022.09.13.20.15.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Sep 2022 20:15:47 -0700 (PDT) Message-ID: <5f8b9a15-ec53-127b-63c3-b32005b35e05@bytedance.com> Date: Wed, 14 Sep 2022 11:15:39 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [External] Re: [PATCH V2 2/5] erofs: introduce fscache-based domain To: JeffleXu , linux-erofs@lists.ozlabs.org, xiang@kernel.org, chao@kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, yinxin.x@bytedance.com, huyue2@coolpad.com References: <20220902105305.79687-1-zhujia.zj@bytedance.com> <20220902105305.79687-3-zhujia.zj@bytedance.com> <56b0a8c1-94ce-3219-6b43-d91d2e0e85b5@linux.alibaba.com> From: Jia Zhu In-Reply-To: <56b0a8c1-94ce-3219-6b43-d91d2e0e85b5@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2022/9/14 11:02, JeffleXu 写道: > > > On 9/2/22 6:53 PM, Jia Zhu wrote: > >> int erofs_fscache_register_cookie(struct super_block *sb, >> struct erofs_fscache **fscache, >> char *name, bool need_inode) >> @@ -495,7 +581,8 @@ int erofs_fscache_register_fs(struct super_block *sb) >> char *name; >> int ret = 0; >> >> - name = kasprintf(GFP_KERNEL, "erofs,%s", sbi->opt.fsid); >> + name = kasprintf(GFP_KERNEL, "erofs,%s", >> + sbi->domain ? sbi->domain->domain_id : sbi->opt.fsid); >> if (!name) >> return -ENOMEM; >> > > What if domain_id and fsid has the same value? > > How about the format "erofs,,"? While in the > non-share-domain mode, is the format like "erofs,," or the default > "erofs,"? > Thanks for pointing this out. I'll revise it. >