[Ocfs2-commits] zab commits r2518 - in trunk/fs/ocfs2: . dlm
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Mon Aug 15 16:13:44 CDT 2005
Author: zab
Signed-off-by: manish
Date: 2005-08-15 16:13:42 -0500 (Mon, 15 Aug 2005)
New Revision: 2518
Modified:
trunk/fs/ocfs2/dlm/userdlm.c
trunk/fs/ocfs2/dlmglue.c
trunk/fs/ocfs2/super.c
Log:
o endian-neutral network key calculation should match what little-endian
machines got with the old code that wasn't endian-neutral. This lets
post-endian-safe versions work with little endian pre-endian-safe versions
again.
Signed-off-by: manish
Modified: trunk/fs/ocfs2/dlm/userdlm.c
===================================================================
--- trunk/fs/ocfs2/dlm/userdlm.c 2005-08-13 01:44:38 UTC (rev 2517)
+++ trunk/fs/ocfs2/dlm/userdlm.c 2005-08-15 21:13:42 UTC (rev 2518)
@@ -640,7 +640,7 @@
return ERR_PTR(-ENOMEM);
}
- dlm_key = crc32_be(0, name->name, name->len);
+ dlm_key = crc32_le(0, name->name, name->len);
snprintf(domain, name->len + 1, "%.*s", name->len, name->name);
Modified: trunk/fs/ocfs2/dlmglue.c
===================================================================
--- trunk/fs/ocfs2/dlmglue.c 2005-08-13 01:44:38 UTC (rev 2517)
+++ trunk/fs/ocfs2/dlmglue.c 2005-08-15 21:13:42 UTC (rev 2518)
@@ -1798,7 +1798,7 @@
/* used by the dlm code to make message headers unique, each
* node in this domain must agree on this. */
- dlm_key = crc32_be(0, osb->uuid_str, strlen(osb->uuid_str));
+ dlm_key = crc32_le(0, osb->uuid_str, strlen(osb->uuid_str));
/* for now, uuid == domain */
dlm = dlm_register_domain(osb->uuid_str, dlm_key);
Modified: trunk/fs/ocfs2/super.c
===================================================================
--- trunk/fs/ocfs2/super.c 2005-08-13 01:44:38 UTC (rev 2517)
+++ trunk/fs/ocfs2/super.c 2005-08-15 21:13:42 UTC (rev 2518)
@@ -1103,6 +1103,7 @@
struct inode *inode = NULL;
struct buffer_head *bitmap_bh = NULL;
ocfs2_journal *journal;
+ __le32 uuid_net_key;
mlog_entry_void();
@@ -1260,8 +1261,8 @@
goto bail;
}
- /* only checksuming the first 32 bits to differentiate from dlm */
- osb->net_key = crc32_be(0, osb->uuid_str, sizeof(osb->net_key));
+ memcpy(&uuid_net_key, &osb->uuid[i], sizeof(osb->net_key));
+ osb->net_key = le32_to_cpu(uuid_net_key);
strncpy(osb->vol_label, di->id2.i_super.s_label, 63);
osb->vol_label[63] = '\0';
More information about the Ocfs2-commits
mailing list