From patchwork Sun Jul 21 13:17:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Sun X-Patchwork-Id: 13738002 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6B7CFC3DA61 for ; Sun, 21 Jul 2024 13:17:57 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1sVWRn-0007x5-5D; Sun, 21 Jul 2024 13:17:55 +0000 Received: from [172.30.29.67] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sVWRm-0007wz-6V for linux-f2fs-devel@lists.sourceforge.net; Sun, 21 Jul 2024 13:17:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=GzEpCjsjIp6sYSRacrUzJwQO3F6b2sWIew49EATOwp8=; b=O/VeTwCHTRaOlKLjCXyURS36AH mVfimO2LkO1KxjuTG7X0cjDYtKlcsbNlpBfB3LNchVetTAXZgtfcJfPYQ1s1/2rr1Uacnl0lIBuxD U2+z2LMsb5wsEzrOAs69grQAs/kQo5foAjgKCvgrvNKoYGD91L8nrw7wmd81JckDrraw=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From :Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=GzEpCjsjIp6sYSRacrUzJwQO3F6b2sWIew49EATOwp8=; b=S ZRXtcv8y7Vu8vGrbDFf0NUDFgNqDIMg7xW+hf5ztA86qAQzWgek48/KTe4wa9tqZ5EADWNS5EOoQh jQwb4yLITczn7UGva+O5zWKDT/UiNXbTt1GgWcTQ3cnC43R+7Br82Xj/1WldIPglcsI2GslzUHwT/ lUGl7zYA6X3jeVtg=; Received: from mail-pl1-f180.google.com ([209.85.214.180]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1sVWRl-0001dQ-J5 for linux-f2fs-devel@lists.sourceforge.net; Sun, 21 Jul 2024 13:17:54 +0000 Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-1fd66cddd07so12257515ad.2 for ; Sun, 21 Jul 2024 06:17:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721567862; x=1722172662; darn=lists.sourceforge.net; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=GzEpCjsjIp6sYSRacrUzJwQO3F6b2sWIew49EATOwp8=; b=aS8yMdztipxeKjmMySnQN57Fjdf/POTJS94d2+p6TJik5ZxPCf+slZz8YDsLlwTbrX EVsNI/4oI9Iyj5gCtpdsKqOw982/Sjjc7nnE/Xvw5cCcQc2uTFGqPDdx/j1AMO1MgQ/L jE19CFuhOCALW+CL6iakbtCNHZNmWoH2Hl8QZadspDxEKWCYGp0exx6LyWuvJ3LIIJ6s nrtE/D98xAdvogw8rP+PLnx7ZhfyTN0pTAhXv7jZuWruPDFSzLIW196IoclapMTwtuIw ZfaRLJKEAt+wjN7hmjUrxZYurymBQ6NrU7wBME529/+4GCw43mztbgP3J5OjY4TRsUrP VwsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721567862; x=1722172662; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GzEpCjsjIp6sYSRacrUzJwQO3F6b2sWIew49EATOwp8=; b=HKnmgS39UXLuDyKqzd1gODj6iL0plhiPp9enGz27tp1uR3DSSfX1CCe2082ABulkxx zxoUXMIV2jOWMjfu8xiQB8W+E27CQouc+t/rGRi85zTLLr4UZEOFQYr2tp7BzjpQJgdD ZCbPd9wSVboPhJQjdisRykIop/b6eMrd0VbbRHDRyRlfr/V87Lbv7TOaHz92tRWPtWiz 7mdz87yMe7c4Te4p+zge3gwW6Ts//pMHJTfO71CPSLV57XT8Wevv6IOL3NAeYd/btU75 oniiajrHYcjQmUZtzafNjZC+Smht7tFzMNiE78NApREXmXJoZoVvnJjJVpmYn9dXO+8z U0Bg== X-Gm-Message-State: AOJu0Yz7x3QR4YMw/Fxji//Qlz6aI0cKw8KM+A0SmGBsqFNi/kuxQq5U jFjvckA93taYDFv/h8eQB0qW3BE9Y/VGZvJi7LSkHRKYz9qsCU3CY32s4umx0kg= X-Google-Smtp-Source: AGHT+IH6R9ynfwE+0eurshHVOLF91ave0yo4EXhomkxky+OGsAGKKl+QkiJ4vRxMLdduLWidgO4QMw== X-Received: by 2002:a17:902:d4d0:b0:1fd:5eab:8c73 with SMTP id d9443c01a7336-1fd745e0028mr29657735ad.35.1721567862415; Sun, 21 Jul 2024 06:17:42 -0700 (PDT) Received: from localhost ([60.206.64.40]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fd6f436d26sm36171475ad.201.2024.07.21.06.17.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jul 2024 06:17:42 -0700 (PDT) From: Julian Sun To: linux-f2fs-devel@lists.sourceforge.net Date: Sun, 21 Jul 2024 09:17:38 -0400 Message-Id: <20240721131739.260027-1-sunjunchao2870@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Headers-End: 1sVWRl-0001dQ-J5 Subject: [f2fs-dev] [PATCH 1/2] f2fs: fix macro definition on_f2fs_build_free_nids X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Julian Sun , jaegeuk@kernel.org Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net The macro on_f2fs_build_free_nids accepts a parameter nmi, but it was not used, rather the variable nm_i was directly used, which may be a local variable inside a function that calls the macros. Signed-off-by: Julian Sun --- fs/f2fs/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index b72ef96f7e33..34eeb2a8598c 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -20,7 +20,7 @@ #include "iostat.h" #include -#define on_f2fs_build_free_nids(nmi) mutex_is_locked(&(nm_i)->build_lock) +#define on_f2fs_build_free_nids(nmi) mutex_is_locked(&(nmi)->build_lock) static struct kmem_cache *nat_entry_slab; static struct kmem_cache *free_nid_slab; From patchwork Sun Jul 21 13:17:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Sun X-Patchwork-Id: 13738003 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7C50AC3DA5D for ; Sun, 21 Jul 2024 13:18:01 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1sVWRt-0007c6-Lg; Sun, 21 Jul 2024 13:18:01 +0000 Received: from [172.30.29.67] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sVWRr-0007bz-VE for linux-f2fs-devel@lists.sourceforge.net; Sun, 21 Jul 2024 13:17:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=39rKwaXgTU+K+vm0snLvnvmGVNQXYxZpOwm5PhJ1vf0=; b=QhE7nwPljAgbb519l4wimnMJoO QVSPXHrqSYlhuEImfqdgCADjM5WELXrwqL9lh29Kl5v5ePorCE5g9lyu10mFwj68/wHfHCjjHlm9U lBqrdFlxdzgExPQd7WbIOVbrbiwNUwrVL/u75i/3EI9BeADUQLwRRZ7dwjG15AgremyI=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=39rKwaXgTU+K+vm0snLvnvmGVNQXYxZpOwm5PhJ1vf0=; b=KEdGwHe2DIrJNy7I1F9xERKTjM PhIItGsCpM5KZkMAWdjJqN1Xh28Ul6PZUrqKp4GJDdoCSbmdslsPo8f0a7UvM6jDf4Nn6pTL/t2Z1 2cYSSrApxkB9uj3/xQG1bhJ0o598q8cg+YCkRihuZz6x2Q2ULb+t/0xbV2YwKWgbIAhM=; Received: from mail-pf1-f174.google.com ([209.85.210.174]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1sVWRq-0001dv-Hd for linux-f2fs-devel@lists.sourceforge.net; Sun, 21 Jul 2024 13:17:59 +0000 Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-70d1158d149so214283b3a.1 for ; Sun, 21 Jul 2024 06:17:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721567867; x=1722172667; darn=lists.sourceforge.net; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=39rKwaXgTU+K+vm0snLvnvmGVNQXYxZpOwm5PhJ1vf0=; b=RgayYEQQsHd2wT+ETHHGIlNOhvlHEPQFVvt3G9UHiu+99m3tYHQGtYjE79/qJ1+iFH cXrIW7OmzvaRuyG0+hXHhJL+BOav0ypbrx/aOpLnun0yyN2xwyoi0dyZ4fV/4cv50Vkb ILWoDb/C5hBar/nnIPaIrx9Dn/gSH95Jpf8CJ0PmYkHnB6kj7rCL6liFCf3GUgt4jVIM FAkS47XjW7KqDg4gZcty67vu1k2bHtX9WxAkeTC5u0N3r7+cwVucoPxWO9MmQt5sJA+b +ui8ZtWO4goXVli5qhLGq7apQ5mgOj2CQjFZ7uCvgYc4srVxBgZ4nbieNiZ1w2p7BUj6 TKOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721567867; x=1722172667; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=39rKwaXgTU+K+vm0snLvnvmGVNQXYxZpOwm5PhJ1vf0=; b=Bai5Qvu5x0Kc1zxwLCbQvTXjd4o/Ui8tLbG2iGdAyvAIjgJtgp9BoF1X2i54VkyOoA pfz3f6z8AfxocrfVRl7AFETlONzgO+WQ6jNigNC794Zf3F9hTF+9XLiybFEebxoC/Scg XrdBniQwCKqzMaJZXuw2Ko5IJHdr3O43KAIlGe+u3nV6OM4EhP6ahx7VTd+jmJz/ausf d/Rq1U6spj7tW5U/8u66JDn8dCum9UgUhJBL2kiJaQ0SsaddjZhlpZN10k1/WFQ3lkAL HfikcuYIXaTC+o9FaZ/JtQrlKKLLYtKkzvCZQEWrHqxc8QgT5EtmGEA9wc58ELkA5pU3 L0Zg== X-Gm-Message-State: AOJu0YzJaUxHjuk9N0SljVmxOKDs983XSL7TE7UQQcKf5NvR4mFbUeWP FfL/snhjydiSPb4VhtdXbhvUv9E4rlzCn/FWMff675NG5WCu4RdjsUzK9dggQS8= X-Google-Smtp-Source: AGHT+IFZ3VyIO/lyYxoIUVhWvb6N1jObCY+pR1FZp7/A89Vp/7kXO0NRU9Y7BPaQlsdiR2ss2wsaBg== X-Received: by 2002:a05:6a00:4b43:b0:705:bd9d:a7c0 with SMTP id d2e1a72fcca58-70d0869e652mr4098939b3a.8.1721567867225; Sun, 21 Jul 2024 06:17:47 -0700 (PDT) Received: from localhost ([60.206.64.40]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70cff4915a7sm3817236b3a.6.2024.07.21.06.17.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jul 2024 06:17:46 -0700 (PDT) From: Julian Sun To: linux-f2fs-devel@lists.sourceforge.net Date: Sun, 21 Jul 2024 09:17:39 -0400 Message-Id: <20240721131739.260027-2-sunjunchao2870@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240721131739.260027-1-sunjunchao2870@gmail.com> References: <20240721131739.260027-1-sunjunchao2870@gmail.com> MIME-Version: 1.0 X-Headers-End: 1sVWRq-0001dv-Hd Subject: [f2fs-dev] [PATCH 2/2] f2fs: fix macro definition stat_inc_cp_count X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Julian Sun , jaegeuk@kernel.org Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net The macro stat_inc_cp_count accepts a parameter si, but it was not used, rather the variable sbi was directly used, which may be a local variable inside a function that calls the macros. Signed-off-by: Julian Sun --- fs/f2fs/f2fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 8a9d910aa552..c9925d1ca2df 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -3987,7 +3987,7 @@ static inline struct f2fs_stat_info *F2FS_STAT(struct f2fs_sb_info *sbi) #define stat_inc_cp_call_count(sbi, foreground) \ atomic_inc(&sbi->cp_call_count[(foreground)]) -#define stat_inc_cp_count(si) (F2FS_STAT(sbi)->cp_count++) +#define stat_inc_cp_count(_sbi) (F2FS_STAT(_sbi)->cp_count++) #define stat_io_skip_bggc_count(sbi) ((sbi)->io_skip_bggc++) #define stat_other_skip_bggc_count(sbi) ((sbi)->other_skip_bggc++) #define stat_inc_dirty_inode(sbi, type) ((sbi)->ndirty_inode[type]++)