From: Matthew Dillon Date: Tue, 7 Aug 2012 19:38:33 +0000 (-0700) Subject: hammer2 - Adjust LNK_SPAN/LNK_CONN X-Git-Tag: v3.4.0rc~1047 X-Git-Url: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/32d5150131df4d1083950ddb53b0e0c0dee9dda1 hammer2 - Adjust LNK_SPAN/LNK_CONN * Adjust the SPAN and CONN structures, rename 'weight' to 'dist' (for distance). --- diff --git a/sys/vfs/hammer2/hammer2_network.h b/sys/vfs/hammer2/hammer2_network.h index 95305b8..fb7b370 100644 --- a/sys/vfs/hammer2/hammer2_network.h +++ b/sys/vfs/hammer2/hammer2_network.h @@ -46,7 +46,7 @@ * levels of interconnectedness, forming a graph. The spanning tree protocol * running on each node transmits a LNK_SPAN transactional message to the * other end. The protocol collects LNK_SPAN messages from all sources, - * aggregates them using a shortest-weighted-path algorithm, and transmits + * aggregates them using a shortest-distance-path algorithm, and transmits * them over each link as well, creating a multplication within the topology. * * Any node in the graph may transmit a message to any other node by using @@ -367,7 +367,7 @@ struct hammer2_lnk_conn { uint16_t proto_version; /* high level protocol support */ uint32_t status; /* status flags */ uint8_t reserved02[8]; - int32_t weight; /* span weight */ + int32_t dist; /* span distance */ uint32_t reserved03[15]; char label[256]; /* PFS label (can be wildcard) */ }; @@ -425,7 +425,7 @@ struct hammer2_lnk_span { uint16_t proto_version; /* high level protocol support */ uint32_t status; /* status flags */ uint8_t reserved02[8]; - int32_t weight; /* span weight */ + int32_t dist; /* span distance */ uint32_t reserved03[15]; char label[256]; /* PFS label (can be wildcard) */ }; diff --git a/sys/vfs/hammer2/hammer2_vfsops.c b/sys/vfs/hammer2/hammer2_vfsops.c index 7c6b3d4..e5a4e46 100644 --- a/sys/vfs/hammer2/hammer2_vfsops.c +++ b/sys/vfs/hammer2/hammer2_vfsops.c @@ -1206,8 +1206,10 @@ hammer2_cluster_thread_wr(void *arg) lockmgr(&pmp->msglk, LK_EXCLUSIVE); continue; } - if (error) + if (error) { + lockmgr(&pmp->msglk, LK_EXCLUSIVE); break; + } /* * Dump the message to the pipe or socket.