Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1133171rwd; Thu, 18 May 2023 08:20:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ62JkLYEeA9v5sowG0RJz/D9pGdFFMtFSo+NMAJx38XDPeS/cSJzDU0X4eH6+xJLhzx8mOb X-Received: by 2002:a05:6a20:baa8:b0:106:ff3c:a60d with SMTP id fb40-20020a056a20baa800b00106ff3ca60dmr2014213pzb.38.1684423211368; Thu, 18 May 2023 08:20:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684423211; cv=none; d=google.com; s=arc-20160816; b=JD9EuyNjNOkUwmJpz7QRJYiZxpQqfiwaIYxFqUhuVRXW1YQJgIevSEgEVkptorJaNY JXMJ544lx/qrLKhZI6KnWeXclMU2G1YAjCq5R9I93cQAkp0GQ5yAJj6niZeO2BX5b7gj VyO24NVuR5Vf5Rbd3uzz9wDkU7ko0DXPvfuwXifiPjN41cYwL1LNIvc8VTZz8S5xWHG3 cWHTUb7aDUO73kN+ctUObVrGOmAoqd8uF8OF4HUjU3u3qQCwEVSqJS5pKz8t7xKcZmiH 2DipDIzlfUBBePvTKJPM6xxEmlPTnilCppaPNL8q6aNWznlEbTn9uTRilgKOajcoz4Ds NKEQ== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=CoK00IvDzsh9+aKqB45P/1hvIg+G2G4PV8ZXqUFsdcU=; b=qytjuXB3NyCfyRppPvgftq0F6tg2ivgAW1/VqyS13iUcbGAHfmYF+TkUBmOp6cpTHB xlL04NZJwQvl7cg9X+8msDvdpa8NNNYCw2wLhDpwhHBaAbQa9LH9pyarjvC8bV0+m11j ZslkMQD+PXXBaBIwoNSFMf/5bQAtplUm0oQeBqr9PzIdYxAV1LeszcuwYsZDymLqo/OH JCBBNGgiwWZWxXVLSY+fg/VoI8kzBzwxdBOXpW2qKsezwsur1pvk553qEnHKahwyhPjY 5Xgj84G5NXUFs1sr+QY6rQvy71RjB7WoOcSsywkgesrUd9cxyNu7sLPplaJ9siaMDe9F 943w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=V1fbw1T7; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v71-20020a63894a000000b0052866b25be5si1587901pgd.746.2023.05.18.08.19.52; Thu, 18 May 2023 08:20:11 -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=@gmail.com header.s=20221208 header.b=V1fbw1T7; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231622AbjERPDk (ORCPT + 99 others); Thu, 18 May 2023 11:03:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231220AbjERPDi (ORCPT ); Thu, 18 May 2023 11:03:38 -0400 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7374B1990 for ; Thu, 18 May 2023 08:03:03 -0700 (PDT) Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-64d18d7738dso584142b3a.3 for ; Thu, 18 May 2023 08:03:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684422136; x=1687014136; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=CoK00IvDzsh9+aKqB45P/1hvIg+G2G4PV8ZXqUFsdcU=; b=V1fbw1T77nRy/lhnGOpp6lridH1ahnJP6ytYDL0MYFtupEvD6uoYezzJsYe2+E3879 laMaQ9LsISaOIja7y6pYu3b8NQd5tMKkr/tjDzsYcxhRVoBTEbxmfyulNB7LldaFpsYO WxzN1hjcHlYlu0XWY+Y4P7aBSCSi3nGrzehFBTvS848iOA1wNG2aB8KsYfHCVJD+392T +zukQrqVmKd6Dv8DNLRStWH0CZJN/NCMfs97IyqyDDPsOPkPuZmuH2l2ssMTxR9z0T4r nh5GHbz8iy58BKDk/SNC0TFQzaHGJNgUUr0fa9tqEqfODOBAs6a9HphFNMF4jsdNb8Gz h4dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684422136; x=1687014136; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CoK00IvDzsh9+aKqB45P/1hvIg+G2G4PV8ZXqUFsdcU=; b=Im43OzjJtCEqNau13iEg3pOvaJOOJv93WfhkJiCCJZzpiENfZd4JmqoFhZNE0XqPPd VaF58HQT13fpmM+hyilXN580rsNht2KgIgh2hGRIC5lUqb5f7nmEMd3I0A6NXG1tAFYv sWk+x9ve3gFaJfKd84LIPQF61onElBxcANxjmD4ROuTzrmyrxu3paxFxNWSAfe3/fXT4 moNbZgDNJH0KDztjw43aHV8fY48mc7yJBK7cNT40f9mplU8YnSavMTjMNuhs2zNw3kTu 6nW/r9xsXDhIn8KApwkzL9UsMO2GIE96cdzkQ+iUaKsDwnpxo+eqz9cdFpltj2eODlXy 7vEw== X-Gm-Message-State: AC+VfDzk6ASBG9gcfgYMeeuGZLBpji4tKS1Ao4vAqFlqRkvzAUonI8rM ua48hjZv7NJPP7uA7BvurJk2xr7/zDpiZ3plOMw= X-Received: by 2002:aa7:88cf:0:b0:625:efa4:4c01 with SMTP id k15-20020aa788cf000000b00625efa44c01mr5329631pff.3.1684422135734; Thu, 18 May 2023 08:02:15 -0700 (PDT) Received: from [192.168.50.227] (n119236112082.netvigator.com. [119.236.112.82]) by smtp.gmail.com with ESMTPSA id e19-20020aa78c53000000b0063d2bb0d107sm1465767pfd.64.2023.05.18.08.02.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 May 2023 08:02:15 -0700 (PDT) Message-ID: Date: Thu, 18 May 2023 23:02:04 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [f2fs-dev] [PATCH 1/1] f2fs: pass I_NEW flag to trace event To: Jaegeuk Kim Cc: Chao Yu , Wu Bo , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org References: <45eb63c6-a147-776a-99b5-7ac06848ede8@kernel.org> <20230517035953.47810-1-bo.wu@vivo.com> <94958409-f726-9da6-3b9f-76efa022ee9d@kernel.org> <4a512db8-cfca-80a5-ba62-780f56d014f6@gmail.com> Content-Language: en-US From: Wu Bo In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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 On 2023/5/18 08:32, Jaegeuk Kim wrote: > On 05/17, Wu Bo wrote: >> On 2023/5/17 16:36, Chao Yu wrote: >>> On 2023/5/17 11:59, Wu Bo wrote: >>>> On 2023/5/17 10:44, Chao Yu wrote: >>>>> On 2023/5/16 20:07, Wu Bo wrote: >>>>>> Modify the order between 'trace_f2fs_iget' & >>>>>> 'unlock_new_inode', so the >>>>>> I_NEW can pass to the trace event when the inode initialised. >>>>> Why is it needed? And trace_f2fs_iget() won't print inode->i_state? >>>> When connect a trace_probe to f2fs_iget, it will be able to >>>> determine whether >>>> the inode is new initialised in order to do different process. >>> I didn't get it, you want to hook __tracepoint_f2fs_iget() w/ your own >>> callback? >> Yes,  to use 'tracepoint_probe_register ' to register a probe at >> trace_f2fs_iget > Why? Sorry, I don't understand what is your real question. In my understanding, a trace_event is also a  non-volatile point in kernel for probing. And for my case, I want to develop a tool by trace_probe to collect some information. Thanks > >>> Thanks, >>> >>>>> Thanks, >>>>> >>>>>> Signed-off-by: Wu Bo >>>>>> --- >>>>>>    fs/f2fs/inode.c | 2 +- >>>>>>    1 file changed, 1 insertion(+), 1 deletion(-) >>>>>> >>>>>> diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c >>>>>> index cf4327ad106c..caf959289fe7 100644 >>>>>> --- a/fs/f2fs/inode.c >>>>>> +++ b/fs/f2fs/inode.c >>>>>> @@ -577,8 +577,8 @@ struct inode *f2fs_iget(struct super_block *sb, >>>>>> unsigned long ino) >>>>>>            file_dont_truncate(inode); >>>>>>        } >>>>>>    -    unlock_new_inode(inode); >>>>>>        trace_f2fs_iget(inode); >>>>>> +    unlock_new_inode(inode); >>>>>>        return inode; >>>>>>      bad_inode: >>>>> >>>>> _______________________________________________ >>>>> Linux-f2fs-devel mailing list >>>>> Linux-f2fs-devel@lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel >>>>>