midcomms.c (5a84d159061d914c8dd4aa372ac6e9529c2be453) | midcomms.c (c36258b5925e6cf6bf72904635100593573bfcff) |
---|---|
1/****************************************************************************** 2******************************************************************************* 3** 4** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. | 1/****************************************************************************** 2******************************************************************************* 3** 4** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. |
5** Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. | 5** Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. |
6** 7** This copyrighted material is made available to anyone wishing to use, 8** modify, copy, or redistribute it subject to the terms and conditions 9** of the GNU General Public License v.2. 10** 11******************************************************************************* 12******************************************************************************/ 13 --- 8 unchanged lines hidden (view full) --- 22 * 23 * It also takes messages from the locking layer, formats them 24 * into packets and sends them to the comms layer. 25 */ 26 27#include "dlm_internal.h" 28#include "lowcomms.h" 29#include "config.h" | 6** 7** This copyrighted material is made available to anyone wishing to use, 8** modify, copy, or redistribute it subject to the terms and conditions 9** of the GNU General Public License v.2. 10** 11******************************************************************************* 12******************************************************************************/ 13 --- 8 unchanged lines hidden (view full) --- 22 * 23 * It also takes messages from the locking layer, formats them 24 * into packets and sends them to the comms layer. 25 */ 26 27#include "dlm_internal.h" 28#include "lowcomms.h" 29#include "config.h" |
30#include "rcom.h" | |
31#include "lock.h" 32#include "midcomms.h" 33 34 35static void copy_from_cb(void *dst, const void *base, unsigned offset, 36 unsigned len, unsigned limit) 37{ 38 unsigned copy = len; --- 73 unchanged lines hidden (view full) --- 112 113 BUG_ON(lockspace != msg->h_lockspace); 114 115 ret += msglen; 116 offset += msglen; 117 offset &= (limit - 1); 118 len -= msglen; 119 | 30#include "lock.h" 31#include "midcomms.h" 32 33 34static void copy_from_cb(void *dst, const void *base, unsigned offset, 35 unsigned len, unsigned limit) 36{ 37 unsigned copy = len; --- 73 unchanged lines hidden (view full) --- 111 112 BUG_ON(lockspace != msg->h_lockspace); 113 114 ret += msglen; 115 offset += msglen; 116 offset &= (limit - 1); 117 len -= msglen; 118 |
120 switch (msg->h_cmd) { 121 case DLM_MSG: 122 dlm_receive_message(msg, nodeid, 0); 123 break; 124 125 case DLM_RCOM: 126 dlm_receive_rcom(msg, nodeid); 127 break; 128 129 default: 130 log_print("unknown msg type %x from %u: %u %u %u %u", 131 msg->h_cmd, nodeid, msglen, len, offset, ret); 132 } | 119 dlm_receive_buffer(msg, nodeid); |
133 } 134 135 if (msg != (struct dlm_header *) __tmp) 136 kfree(msg); 137 138 return err ? err : ret; 139} 140 | 120 } 121 122 if (msg != (struct dlm_header *) __tmp) 123 kfree(msg); 124 125 return err ? err : ret; 126} 127 |