rcom.c (c1f3ee120bb61045b1c0a3ead620d1d65af47130) | rcom.c (163a1859ec6c4c33547bf4613efabf52031566aa) |
---|---|
1/****************************************************************************** 2******************************************************************************* 3** 4** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. 5** Copyright (C) 2005-2008 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 --- 285 unchanged lines hidden (view full) --- 294 dlm_recover_master_reply(ls, rc_in); 295} 296 297static void pack_rcom_lock(struct dlm_rsb *r, struct dlm_lkb *lkb, 298 struct rcom_lock *rl) 299{ 300 memset(rl, 0, sizeof(*rl)); 301 | 1/****************************************************************************** 2******************************************************************************* 3** 4** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. 5** Copyright (C) 2005-2008 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 --- 285 unchanged lines hidden (view full) --- 294 dlm_recover_master_reply(ls, rc_in); 295} 296 297static void pack_rcom_lock(struct dlm_rsb *r, struct dlm_lkb *lkb, 298 struct rcom_lock *rl) 299{ 300 memset(rl, 0, sizeof(*rl)); 301 |
302 rl->rl_ownpid = lkb->lkb_ownpid; 303 rl->rl_lkid = lkb->lkb_id; 304 rl->rl_exflags = lkb->lkb_exflags; 305 rl->rl_flags = lkb->lkb_flags; 306 rl->rl_lvbseq = lkb->lkb_lvbseq; | 302 rl->rl_ownpid = cpu_to_le32(lkb->lkb_ownpid); 303 rl->rl_lkid = cpu_to_le32(lkb->lkb_id); 304 rl->rl_exflags = cpu_to_le32(lkb->lkb_exflags); 305 rl->rl_flags = cpu_to_le32(lkb->lkb_flags); 306 rl->rl_lvbseq = cpu_to_le32(lkb->lkb_lvbseq); |
307 rl->rl_rqmode = lkb->lkb_rqmode; 308 rl->rl_grmode = lkb->lkb_grmode; 309 rl->rl_status = lkb->lkb_status; | 307 rl->rl_rqmode = lkb->lkb_rqmode; 308 rl->rl_grmode = lkb->lkb_grmode; 309 rl->rl_status = lkb->lkb_status; |
310 rl->rl_wait_type = lkb->lkb_wait_type; | 310 rl->rl_wait_type = cpu_to_le16(lkb->lkb_wait_type); |
311 312 if (lkb->lkb_bastaddr) 313 rl->rl_asts |= AST_BAST; 314 if (lkb->lkb_astaddr) 315 rl->rl_asts |= AST_COMP; 316 | 311 312 if (lkb->lkb_bastaddr) 313 rl->rl_asts |= AST_BAST; 314 if (lkb->lkb_astaddr) 315 rl->rl_asts |= AST_COMP; 316 |
317 rl->rl_namelen = r->res_length; | 317 rl->rl_namelen = cpu_to_le16(r->res_length); |
318 memcpy(rl->rl_name, r->res_name, r->res_length); 319 320 /* FIXME: might we have an lvb without DLM_LKF_VALBLK set ? 321 If so, receive_rcom_lock_args() won't take this copy. */ 322 323 if (lkb->lkb_lvbptr) 324 memcpy(rl->rl_lvb, lkb->lkb_lvbptr, r->res_ls->ls_lvblen); 325} --- 165 unchanged lines hidden --- | 318 memcpy(rl->rl_name, r->res_name, r->res_length); 319 320 /* FIXME: might we have an lvb without DLM_LKF_VALBLK set ? 321 If so, receive_rcom_lock_args() won't take this copy. */ 322 323 if (lkb->lkb_lvbptr) 324 memcpy(rl->rl_lvb, lkb->lkb_lvbptr, r->res_ls->ls_lvblen); 325} --- 165 unchanged lines hidden --- |