OCFS2: remove unused macros
PATCH 1/1 OCFS2: remove unused macros
O2HB_DEFAULT_BLOCK_BITS/DLM_THREAD_MAX_ASTS/DLM_MIGRATION_RETRY_MS and OCFS2_MAX_RESV_WINDOW_BITS/OCFS2_MIN_RESV_WINDOW_BITS are never used from they were introduced to kernel. so better to remove them.
--- fs/ocfs2/cluster/heartbeat.c | 2 -- fs/ocfs2/dlm/dlmmaster.c | 2 -- fs/ocfs2/dlm/dlmthread.c | 1 - fs/ocfs2/reservations.c | 3 --- 4 files changed, 8 deletions(-)
fs/ocfs2/cluster/heartbeat.c +0 -2
@@ -101,8 +101,6 @@ struct o2hb_debug_buf {static struct o2hb_callback *hbcall_from_type (enum o2hb_callback_type type); -#define O2HB_DEFAULT_BLOCK_BITS 9 -enum o2hb_heartbeat_modes {O2HB_HEARTBEAT_LOCAL =0 ,O2HB_HEARTBEAT_GLOBAL ,
fs/ocfs2/dlm/dlmmaster.c +0 -2
@@ -2751,8 +2751,6 @@ static int dlm_migrate_lockres(struct dlm_ctxt *dlm,return ret; } -#define DLM_MIGRATION_RETRY_MS 100 -/* * Should be called only after beginning the domain leave process. * There should not be any remaining locks on nonlocal lock resources,
fs/ocfs2/dlm/dlmthread.c +0 -1
@@ -680,7 +680,6 @@ static void dlm_flush_asts(struct dlm_ctxt *dlm)#define DLM_THREAD_TIMEOUT_MS (4 * 1000)#define DLM_THREAD_MAX_DIRTY 100 -#define DLM_THREAD_MAX_ASTS 10static int dlm_thread (void *data) {
fs/ocfs2/reservations.c +0 -3
@@ -33,9 +33,6 @@static DEFINE_SPINLOCK (resv_lock); -#define OCFS2_MIN_RESV_WINDOW_BITS 8 -#define OCFS2_MAX_RESV_WINDOW_BITS 1024 -int ocfs2_dir_resv_allowed (struct ocfs2_super *osb) {return (osb->osb_resv_level && osb->osb_dir_resv_level);
Signature · 1 line
1.8.3.1
Joseph Qi
maintainerQuoted 42 lines · Alex Shi
O2HB_DEFAULT_BLOCK_BITS/DLM_THREAD_MAX_ASTS/DLM_MIGRATION_RETRY_MS and OCFS2_MAX_RESV_WINDOW_BITS/OCFS2_MIN_RESV_WINDOW_BITS are never used from they were introduced to kernel. so better to remove them.
Signed-off-by Alex Shi <[email protected]>Cc Mark Fasheh <[email protected]>Cc Joel Becker <[email protected]>Cc Joseph Qi <[email protected]>Cc Andrew Morton <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Kate Stewart <[email protected]>Cc ChenGang <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Richard Fontana <[email protected]>Cc ocfs2-devel at oss.oracle.comCc linux-kernel at vger.kernel.org--- fs/ocfs2/cluster/heartbeat.c | 2 -- fs/ocfs2/dlm/dlmmaster.c | 2 -- fs/ocfs2/dlm/dlmthread.c | 1 - fs/ocfs2/reservations.c | 3 --- 4 files changed, 8 deletions(-)fs/ocfs2/cluster/heartbeat.c +0
-2@@ -101,8 +101,6 @@ struct o2hb_debug_buf {static struct o2hb_callback *hbcall_from_type (enum o2hb_callback_type type); -#define O2HB_DEFAULT_BLOCK_BITS 9 -enum o2hb_heartbeat_modes {O2HB_HEARTBEAT_LOCAL =0 ,O2HB_HEARTBEAT_GLOBAL ,fs/ocfs2/dlm/dlmmaster.c +0
-0
fs/ocfs2/dlm/dlmmaster.c static int dlm_migrate_lockres(struct dlm_ctxt *dlm, · line 2755
Quoted 5 lines
fs/ocfs2/dlm/dlmmaster.c +0
-2@@ -2751,8 +2751,6 @@ static int dlm_migrate_lockres(struct dlm_ctxt *dlm,return ret; } -#define DLM_MIGRATION_RETRY_MS 100 -
It is no longer used since commit 66effd3c6812 ("ocfs2/dlm: Do not migrate resource to a node that is leaving the domain").
Quoted 30 lines
fs/ocfs2/dlm/dlmmaster.c +0
-0/* * Should be called only after beginning the domain leave process. * There should not be any remaining locks on nonlocal lock resources, fs/ocfs2/dlm/dlmthread.c +0
-1@@ -680,7 +680,6 @@ static void dlm_flush_asts(struct dlm_ctxt *dlm)#define DLM_THREAD_TIMEOUT_MS (4 * 1000)#define DLM_THREAD_MAX_DIRTY 100 -#define DLM_THREAD_MAX_ASTS 10static int dlm_thread (void *data) {fs/ocfs2/reservations.c +0
-3@@ -33,9 +33,6 @@static DEFINE_SPINLOCK (resv_lock); -#define OCFS2_MIN_RESV_WINDOW_BITS 8 -#define OCFS2_MAX_RESV_WINDOW_BITS 1024 -int ocfs2_dir_resv_allowed (struct ocfs2_super *osb) {return (osb->osb_resv_level && osb->osb_dir_resv_level);
Quoted 9 lines · Joseph Qi
Quoted 6 lines · Alex Shi
O2HB_DEFAULT_BLOCK_BITS/DLM_THREAD_MAX_ASTS/DLM_MIGRATION_RETRY_MS and OCFS2_MAX_RESV_WINDOW_BITS/OCFS2_MIN_RESV_WINDOW_BITS are never used from they were introduced to kernel. so better to remove them.
Quoted 4 lines
Review
Quoted 2 lines
(quoted diff) +0
-2-#define DLM_MIGRATION_RETRY_MS 100 -It is no longer used since commit
66effd3c6812("ocfs2/dlm: Do not migrate resource to a node that is leaving the domain").
Thanks for point out. how about the following revised patch?
Since a trival patch don't need much reviewer, I removed some Ccs.
Thanks
Alex
---
From 3bf7bf5a82a6a2275db49ba029d48fdd5c09332c Mon Sep 17 00:00:00 2001
From: Alex Shi <[email protected]>
Date: Tue, 21 Jan 2020 11:14:29 +0800
Subject: [PATCH v2] OCFS2: remove unused macros
DLM_MIGRATION_RETRY_MS is no longer used since commit 66effd3c6812 ("ocfs2/dlm: Do not migrate resource to a node that is leaving the domain").
And the others are never used since they were introduced. Let's remove them.
--- fs/ocfs2/cluster/heartbeat.c | 2 -- fs/ocfs2/dlm/dlmmaster.c | 2 -- fs/ocfs2/dlm/dlmthread.c | 1 - fs/ocfs2/reservations.c | 3 --- 4 files changed, 8 deletions(-)
fs/ocfs2/cluster/heartbeat.c +0 -2
@@ -101,8 +101,6 @@ struct o2hb_debug_buf {static struct o2hb_callback *hbcall_from_type (enum o2hb_callback_type type); -#define O2HB_DEFAULT_BLOCK_BITS 9 -enum o2hb_heartbeat_modes {O2HB_HEARTBEAT_LOCAL =0 ,O2HB_HEARTBEAT_GLOBAL ,
fs/ocfs2/dlm/dlmmaster.c +0 -2
@@ -2751,8 +2751,6 @@ static int dlm_migrate_lockres(struct dlm_ctxt *dlm,return ret; } -#define DLM_MIGRATION_RETRY_MS 100 -/* * Should be called only after beginning the domain leave process. * There should not be any remaining locks on nonlocal lock resources,
fs/ocfs2/dlm/dlmthread.c +0 -1
@@ -680,7 +680,6 @@ static void dlm_flush_asts(struct dlm_ctxt *dlm)#define DLM_THREAD_TIMEOUT_MS (4 * 1000)#define DLM_THREAD_MAX_DIRTY 100 -#define DLM_THREAD_MAX_ASTS 10static int dlm_thread (void *data) {
fs/ocfs2/reservations.c +0 -3
@@ -33,9 +33,6 @@static DEFINE_SPINLOCK (resv_lock); -#define OCFS2_MIN_RESV_WINDOW_BITS 8 -#define OCFS2_MAX_RESV_WINDOW_BITS 1024 -int ocfs2_dir_resv_allowed (struct ocfs2_super *osb) {return (osb->osb_resv_level && osb->osb_dir_resv_level);
Signature · 1 line
1.8.3.1
Quoted 34 lines · Alex Shi
? 2020/1/26 ??9:43, Joseph Qi ??:
Quoted 9 lines · Alex Shi
Quoted 6 lines
O2HB_DEFAULT_BLOCK_BITS/DLM_THREAD_MAX_ASTS/DLM_MIGRATION_RETRY_MS and OCFS2_MAX_RESV_WINDOW_BITS/OCFS2_MIN_RESV_WINDOW_BITS are never used from they were introduced to kernel. so better to remove them.
Quoted 4 lines
fs/ocfs2/dlm/dlmmaster.c static int dlm_migrate_lockres(struct dlm_ctxt *dlm, · line 2755
Quoted 2 lines
fs/ocfs2/dlm/dlmmaster.c +0
-2-#define DLM_MIGRATION_RETRY_MS 100 -It is no longer used since commit
66effd3c6812("ocfs2/dlm: Do not migrate resource to a node that is leaving the domain").Thanks for point out. how about the following revised patch?
Since a trival patch don't need much reviewer, I removed some Ccs.
Thanks
Alex---
From
3bf7bf5a82a6a2275db49ba029d48fdd5c09332cMon Sep 17 00:00:00 2001
From: Alex Shi <[email protected]>
Date: Tue, 21 Jan 2020 11:14:29 +0800
Subject: [PATCH v2] OCFS2: remove unused macros
DLM_MIGRATION_RETRY_MSis no longer used since commit66effd3c6812("ocfs2/dlm: Do not migrate resource to a node that is leaving the domain").
Quoted 8 lines
And the others are never used since they were introduced. Let's remove them.
Signed-off-by Alex Shi <[email protected]>Cc Joseph Qi <[email protected]>Cc Andrew Morton <[email protected]>Cc ocfs2-devel at oss.oracle.comCc linux-kernel at vger.kernel.org
Looks good.
Quoted 60 lines
--- fs/ocfs2/cluster/heartbeat.c | 2 -- fs/ocfs2/dlm/dlmmaster.c | 2 -- fs/ocfs2/dlm/dlmthread.c | 1 - fs/ocfs2/reservations.c | 3 --- 4 files changed, 8 deletions(-)fs/ocfs2/cluster/heartbeat.c +0
-2@@ -101,8 +101,6 @@ struct o2hb_debug_buf {static struct o2hb_callback *hbcall_from_type (enum o2hb_callback_type type); -#define O2HB_DEFAULT_BLOCK_BITS 9 -enum o2hb_heartbeat_modes {O2HB_HEARTBEAT_LOCAL =0 ,O2HB_HEARTBEAT_GLOBAL ,fs/ocfs2/dlm/dlmmaster.c +0
-2@@ -2751,8 +2751,6 @@ static int dlm_migrate_lockres(struct dlm_ctxt *dlm,return ret; } -#define DLM_MIGRATION_RETRY_MS 100 -/* * Should be called only after beginning the domain leave process. * There should not be any remaining locks on nonlocal lock resources, fs/ocfs2/dlm/dlmthread.c +0
-1@@ -680,7 +680,6 @@ static void dlm_flush_asts(struct dlm_ctxt *dlm)#define DLM_THREAD_TIMEOUT_MS (4 * 1000)#define DLM_THREAD_MAX_DIRTY 100 -#define DLM_THREAD_MAX_ASTS 10static int dlm_thread (void *data) {fs/ocfs2/reservations.c +0
-3@@ -33,9 +33,6 @@static DEFINE_SPINLOCK (resv_lock); -#define OCFS2_MIN_RESV_WINDOW_BITS 8 -#define OCFS2_MAX_RESV_WINDOW_BITS 1024 -int ocfs2_dir_resv_allowed (struct ocfs2_super *osb) {return (osb->osb_resv_level && osb->osb_dir_resv_level);