Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2250998rwd; Wed, 17 May 2023 07:42:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ76dAIAaVdJtfRGDoDQCgQZRpFk38uBgj3mHaNiMLIbfQyjkvxcvGDLWfccNvGu2YpaT1ae X-Received: by 2002:a05:6a00:1916:b0:63f:32ed:92b1 with SMTP id y22-20020a056a00191600b0063f32ed92b1mr1273519pfi.7.1684334534991; Wed, 17 May 2023 07:42:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684334534; cv=none; d=google.com; s=arc-20160816; b=fBac0gnfDdMAVrpX7uAZVirT08yiO4iNRdZnrlgk+VfgG6teUxioyzLTWxRTeygSsj 0y3XUF3r7CRJwFaF9A862GST3yt9ohwqf33FxGYJfRvKKx6tERZ/EUPGJJfcsiBNlylP ZpTT4q9trN9M/FePQPDGpgvor0ir2RnCkDrCvlb4vW+pvOaMVkGn9IkGfiJ3khMYSv+U UzEqOoNPapXNZB7Pwu7K9xMN/iWymtiRXiKkLk6c1kXvJ9Uo0iTSZR1dqMCRfI6z+UZo YIDyef2nUqCj3/0zzDIOHbpZKTJgdo/bQyYNwN0ity3z/OjJejYJsIeBb1B5CLsF95wy C7Ow== 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=sWvt0pedQunu8y2B0dtBKUYcryiAQ5WtFEwu7jjInYQ=; b=fqxIa4A++Lp+Rlbfu+9AzouWtElkja0XKkTsY3YDaMjvQvc9QDRG/iI5egox1GeU65 71XD7TAqtNPlAMtMHLMukYx5xW6lH9ZSS8Yrz1sBflHSCKrQS9SXcbRCtaW2edRzqAGz R9HQwiM5tXp2WTK9BpRSrhl0x+X/wjqIZMjBplvu4bgw3LPcb5AI3IQ6FarLJCBxyths 2wVjcM4HKDCceDwippAR/siK7XH0y8MpMLGkX0kZTckUHk77Tk8CnnMNGibzNAulATeb 322783cH/nMNeNih9Q+ZxF3fQjr2xVhZvGC0XmGJwcc9UsWwj4UFaKQNTNOlJIRb9z9N vOIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=MIV2fh6E; 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 s10-20020aa78bca000000b00643430939acsi21778628pfd.164.2023.05.17.07.42.02; Wed, 17 May 2023 07:42:14 -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=MIV2fh6E; 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 S231890AbjEQObm (ORCPT + 99 others); Wed, 17 May 2023 10:31:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231926AbjEQObj (ORCPT ); Wed, 17 May 2023 10:31:39 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46C8A768C for ; Wed, 17 May 2023 07:31:34 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-64390dc0a7fso49821b3a.1 for ; Wed, 17 May 2023 07:31:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684333894; x=1686925894; 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=sWvt0pedQunu8y2B0dtBKUYcryiAQ5WtFEwu7jjInYQ=; b=MIV2fh6ELNK78jb9gvMfIOe2uEDfrKxtE2ojMULHIRLz4i4iXtzCLNratojT9TW1Ua b083dw3ij/fH38M2P57SwErE1GLSf7Nykqpp3IItLlbiuHL/b+hTuR/RtKTlEEax4TdT A6GQF1F/qzVJtLfNcuJxNQ16YErrIGoNCD51yBr6RM320MA6uYsn2HFmk8JpMj3n/gd8 4VFUq+IRKpmxneADrWO88/f/TI7Jd4pbXRSxnbJRVXCv48fp/Ub3ltn7bflHguzEc1dk AefzsUiSKAPmCZJuZ+JL751v5Jtk8gZ348B+0ktLYVnVS8tlFD6yzSthWJoxREptkOAD 3MKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684333894; x=1686925894; 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=sWvt0pedQunu8y2B0dtBKUYcryiAQ5WtFEwu7jjInYQ=; b=Bnv223D9aUA6s8JKnrys+vEXL213718WYOjisEh6XcyVmD4R0jPD2y4J1qp0+n4zcQ OGRMSEOmGqb+BYx/4qmez4jhmujSFgNoZWzStFZOtvPoa+TCYpAiA1txW+SvWpLajRH2 CcQRqu90LvkCJlsZscczpzD9Qr6RqbyGK1vtlrwMXKqr22/06A+ya5Ccw+h7mBgmFZDp GrxJ4nATulMdknsb9IMUdpuZ9WUvHVMZGcYAbBy3+JMVKPnaaGh8lFxC08HFshS0GIur 89EBL87RmQETIbGbm9rXyYlIS2jamAhNioKznMgeM2GoW8/XB6Yj1qxiE3QabZ8PNPLp WXzw== X-Gm-Message-State: AC+VfDykdZNigEnXkZU3BjD9k8WBtmqQCyKZX9JuPPOGgorKDIlPxJcG a6soq61VXkNoc2OgBMerPZU/NaNEbugkp96OPug= X-Received: by 2002:a05:6a20:8e15:b0:101:281c:494 with SMTP id y21-20020a056a208e1500b00101281c0494mr3079789pzj.27.1684333893627; Wed, 17 May 2023 07:31:33 -0700 (PDT) Received: from [192.168.50.128] ([157.245.157.44]) by smtp.gmail.com with ESMTPSA id c16-20020aa78810000000b0063b7b811ce8sm15232130pfo.205.2023.05.17.07.31.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 May 2023 07:31:33 -0700 (PDT) Message-ID: <4a512db8-cfca-80a5-ba62-780f56d014f6@gmail.com> Date: Wed, 17 May 2023 22:31:21 +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: Chao Yu , Wu Bo Cc: jaegeuk@kernel.org, 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> Content-Language: en-US From: Wu Bo In-Reply-To: <94958409-f726-9da6-3b9f-76efa022ee9d@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.5 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/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 > > 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 >>>