NET_MAX_PAYLOAD_BYTES typo?
PATCH 1/1 NET_MAX_PAYLOAD_BYTES typo?
I've read fs/ocfs2/dlm/dlmcommon.h to study the structure of dlm_migratable_lockres. However, I may find a typo for the DLM_MIG_LOCKRES_MAX_LEN,
the NET_MAX_PAYLOAD_BYTES should be O2NET_MAX_PAYLOAD_BYTES, I think.
In comments, the sizeof(net_msg) should be sizeof(o2net_msg) by referring to fs/ocfs2/cluster/tcp.h.
--- fs/ocfs2/dlm/dlmcommon.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
fs/ocfs2/dlm/dlmcommon.h +2 -2
@@ -540,7 +540,7 @@ struct dlm_master_requery* }; * * from ../cluster/tcp.h -* NET_MAX_PAYLOAD_BYTES (4096 - sizeof(net_msg)) +* O2NET_MAX_PAYLOAD_BYTES (4096 - sizeof(o2net_msg)) * (roughly 4080 bytes) * and sizeof(dlm_migratable_lockres) = 112 bytes * and sizeof(dlm_migratable_lock) = 16 bytes
@@ -581,7 +581,7 @@ struct dlm_migratable_lockres/* from above, 128 bytes * for some undetermined future use */ -#define DLM_MIG_LOCKRES_RESERVED (NET_MAX_PAYLOAD_BYTES - \ +#define DLM_MIG_LOCKRES_RESERVED (O2NET_MAX_PAYLOAD_BYTES - \ DLM_MIG_LOCKRES_MAX_LEN)struct dlm_create_lock
Signature · 1 line
1.5.4.3
PATCH 1/1 NET_MAX_PAYLOAD_BYTES typo?
Hi Jeff,
Quoted 5 lines · Jeff Liu
I've read
fs/ocfs2/dlm/dlmcommon.hto study the structure ofdlm_migratable_lockres. However, I may find a typo for theDLM_MIG_LOCKRES_MAX_LEN,
theNET_MAX_PAYLOAD_BYTESshould beO2NET_MAX_PAYLOAD_BYTES, I think.
In comments, thesizeof(net_msg)should besizeof(o2net_msg)by referring tofs/ocfs2/cluster/tcp.h.
yeah, NET_MAX_PAYLOAD_BYTES here should be O2NET_MAX_PAYLOAD_BYTES and I guess the reason why we never find this error is because we never use DLM_MIG_LOCKRES_RESERVED by now.
btw, there is another NET_MAX_PAYLOAD_BYTES you forget to change in fs/ocfs2/dlm/dlmcommon.h
Regards,
Tao
Quoted 28 lines
Signed-off-by Jeff Liu <[email protected]>--- fs/ocfs2/dlm/dlmcommon.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)fs/ocfs2/dlm/dlmcommon.h +2
-2@@ -540,7 +540,7 @@ struct dlm_master_requery* }; * * from ../cluster/tcp.h -* NET_MAX_PAYLOAD_BYTES (4096 - sizeof(net_msg)) +* O2NET_MAX_PAYLOAD_BYTES (4096 - sizeof(o2net_msg)) * (roughly 4080 bytes) * and sizeof(dlm_migratable_lockres) = 112 bytes * and sizeof(dlm_migratable_lock) = 16 bytes @@ -581,7 +581,7 @@ struct dlm_migratable_lockres/* from above, 128 bytes * for some undetermined future use */ -#define DLM_MIG_LOCKRES_RESERVED (NET_MAX_PAYLOAD_BYTES - \ +#define DLM_MIG_LOCKRES_RESERVED (O2NET_MAX_PAYLOAD_BYTES - \ DLM_MIG_LOCKRES_MAX_LEN)struct dlm_create_lock
PATCH 1/1 NET_MAX_PAYLOAD_BYTES typo?
Quoted 8 lines · TaoMa
Quoted 5 lines
I've read
fs/ocfs2/dlm/dlmcommon.hto study the structure ofdlm_migratable_lockres. However, I may find a typo for theDLM_MIG_LOCKRES_MAX_LEN,
theNET_MAX_PAYLOAD_BYTESshould beO2NET_MAX_PAYLOAD_BYTES, I think.
In comments, thesizeof(net_msg)should besizeof(o2net_msg)by referring tofs/ocfs2/cluster/tcp.h.yeah,
NET_MAX_PAYLOAD_BYTEShere should beO2NET_MAX_PAYLOAD_BYTESand I guess the reason why we never find this error is because we never useDLM_MIG_LOCKRES_RESERVEDby now.
And if we have not used it by now, chances are we never will. Maybe just remove it. But let it be for the time being. I'll ask Kurt if he remembers what
the reasoning was.
Quoted 3 lines
btw, there is another
NET_MAX_PAYLOAD_BYTESyou forget to change infs/ocfs2/dlm/dlmcommon.h
PATCH 1/1 NET_MAX_PAYLOAD_BYTES typo?
In reply to TaoMaHi Tao,
Yes, thanks for your remind.
Regards,
Jeff
TaoMa ??:
Quoted 45 lines
Hi Jeff,
Quoted 6 lines · Jeff Liu
I've read
fs/ocfs2/dlm/dlmcommon.hto study the structure ofdlm_migratable_lockres.
However, I may find a typo for theDLM_MIG_LOCKRES_MAX_LEN, theNET_MAX_PAYLOAD_BYTESshould beO2NET_MAX_PAYLOAD_BYTES, I think. In comments, thesizeof(net_msg)should besizeof(o2net_msg)by referring tofs/ocfs2/cluster/tcp.h.yeah,
NET_MAX_PAYLOAD_BYTEShere should beO2NET_MAX_PAYLOAD_BYTESand I guess the reason why we never find this error is because we never useDLM_MIG_LOCKRES_RESERVEDby now.btw, there is another
NET_MAX_PAYLOAD_BYTESyou forget to change infs/ocfs2/dlm/dlmcommon.hRegards,
TaoQuoted 27 lines
Signed-off-by Jeff Liu <[email protected]>---
fs/ocfs2/dlm/dlmcommon.h| 4 ++--1 files changed, 2 insertions(+), 2 deletions(-)fs/ocfs2/dlm/dlmcommon.h +2
-2@@ -540,7 +540,7 @@ struct dlm_master_requery* }; * * from ../cluster/tcp.h -* NET_MAX_PAYLOAD_BYTES (4096 - sizeof(net_msg)) +* O2NET_MAX_PAYLOAD_BYTES (4096 - sizeof(o2net_msg)) * (roughly 4080 bytes) * and sizeof(dlm_migratable_lockres) = 112 bytes * and sizeof(dlm_migratable_lock) = 16 bytes @@ -581,7 +581,7 @@ struct dlm_migratable_lockres/* from above, 128 bytes * for some undetermined future use */ -#define DLM_MIG_LOCKRES_RESERVED (NET_MAX_PAYLOAD_BYTES - \ +#define DLM_MIG_LOCKRES_RESERVED (O2NET_MAX_PAYLOAD_BYTES - \ DLM_MIG_LOCKRES_MAX_LEN)struct
dlm_create_lock