Changeset 8950
- Timestamp:
- 07/14/11 12:18:12 (23 months ago)
- Location:
- branches/orange-next/src/server
- Files:
-
- 2 modified
-
create-immutable-copies.sm (modified) (12 diffs)
-
get-attr.sm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/orange-next/src/server/create-immutable-copies.sm
r8946 r8950 23 23 /*Global Variables*/ 24 24 25 static char PVFS_handle_string[PVFS_HANDLE_STRING_LEN]={0}; 26 25 27 /*attribute keys used for the mirroring process*/ 26 28 static char handle_key[] = USER_PVFS2_MIRROR_HANDLES; … … 225 227 } 226 228 227 memset(PVFS_handle_string,0,PVFS_HANDLE_STRING_LENGTH);228 229 PVFS_handle_unparse(imm_p->metadata_handle,PVFS_handle_string); 229 230 gossip_debug(GOSSIP_MIRROR_DEBUG,"\tdfile_count: %d\tmetadata_handle: %s" … … 582 583 goto error_exit; 583 584 } 584 memset(PVFS_handle_string,0,PVFS_HANDLE_STRING_LENGTH);585 585 PVFS_handle_unparse(imm_p->handle_array_base[i],PVFS_handle_string); 586 586 gossip_debug(GOSSIP_MIRROR_DEBUG,"\tValue of server_name is %s " … … 634 634 635 635 imm_p->handle_array_base_local_count++; 636 PVFS_handle_unparse(imm_p->handle_array_base_local[imm_p->handle_array_base_local_count 636 PVFS_handle_unparse(imm_p->handle_array_base_local[imm_p->handle_array_base_local_count] 637 637 ,PVFS_handle_string); 638 638 gossip_debug(GOSSIP_MIRROR_DEBUG,"\tlocal source handle(%d):%s\n" … … 1441 1441 //imm_p->writes_completed[index] = UINT64_HIGH; 1442 1442 imm_p->writes_completed[index].status = STATUS_INIT; 1443 PVFS_handle_clear(imm_p->writes_comp eted[index].handle);1443 PVFS_handle_clear(imm_p->writes_completed[index].handle); 1444 1444 } 1445 1445 } … … 1527 1527 for (i=0; i<(imm_p->dfile_count * imm_p->copies); i++) 1528 1528 { 1529 char PVFS_handle_string[PVFS_handle_string_len] = {0};1530 1529 PVFS_handle_unparse(imm_p->writes_completed[i].handle,PVFS_handle_string); 1531 1530 gossip_debug(GOSSIP_MIRROR_DEBUG,"\twrites_complete[%d]:%s\n" 1532 1531 ,i,PVFS_handle_string); 1533 1532 //if (imm_p->writes_completed[i] != 0) 1534 if ( !PVFS_handle_is_null(imm_p->writes_completed[i] ) )1533 if ( !PVFS_handle_is_null(imm_p->writes_completed[i].handle) ) 1535 1534 { 1536 1535 js_p->error_code = RETRY; … … 1625 1624 //memcpy(sm_p->val_a[i].buffer,imm_p->writes_completed 1626 1625 // ,sm_p->val_a[i].buffer_sz); 1627 sm_p->val_a[i].buffer[j] = imm_p->writes_completed[j].status; 1626 memcpy(&((PVFS_error *)(sm_p->val_a[i].buffer))[j] 1627 ,&(imm_p->writes_completed[j].status) 1628 ,sizeof(PVFS_error)); 1628 1629 } 1629 1630 /*verify inputs*/ … … 1633 1634 gossip_debug(GOSSIP_MIRROR_DEBUG,"\tsize of buffer : %d\n" 1634 1635 ,sm_p->key_a[i].buffer_sz); 1635 PVFS_ error *myStatus = (PVFS_error*)sm_p->val_a[i].buffer;1636 PVFS_handle *myHandle = (PVFS_handle *)sm_p->val_a[i].buffer; 1636 1637 for (j=0; j<(imm_p->dfile_count*imm_p->copies); j++) 1637 1638 { 1638 gossip_debug(GOSSIP_MIRROR_DEBUG,"\t\tstatus(%d):%d\n" 1639 PVFS_handle_unparse(myHandle[j],PVFS_handle_string); 1640 gossip_debug(GOSSIP_MIRROR_DEBUG,"\t\thandle(%d):%s\n" 1639 1641 ,j 1640 , myStatus[j]);1642 ,PVFS_handle_string); 1641 1643 } 1642 1644 … … 1652 1654 1653 1655 i++; assert(i<key_count); 1654 PVFS_ handle *myStatus = (PVFS_handle *)sm_p->val_a[i].buffer;1656 PVFS_error *myStatus = (PVFS_error *)(sm_p->val_a[i].buffer); 1655 1657 for (j=0; j<(imm_p->dfile_count * imm_p->copies); j++) 1656 1658 { 1657 memset(PVFS_handle_string,0,PVFS_HANDLE_STRING_LEN); 1658 PVFS_handle_unparse(myStatus[j],PVFS_handle_string); 1659 gossip_debug(GOSSIP_MIRROR_DEBUG,"\thandle(%d):status(%s)\n" 1659 gossip_debug(GOSSIP_MIRROR_DEBUG,"\thandle(%d):status(%d)\n" 1660 1660 ,j 1661 , PVFS_handle_string);1661 ,myStatus[j]); 1662 1662 } 1663 1663 … … 1740 1740 if (js_p->error_code) 1741 1741 { 1742 memset(PVFS_handle_string,0,PVFS_HANDLE_STRING_LENGTH); 1743 PVFS_handle_unparse(imm_p->metadata_handle); 1742 PVFS_handle_unparse(imm_p->metadata_handle,PVFS_handle_string); 1744 1743 gossip_err("Unable to store datahandles and number of copies for this " 1745 1744 "mirror operation.\n"); … … 2049 2048 for (i=0; i<(in_cols*rows); i++) 2050 2049 { 2051 memset(PVFS_handle_string,0,PVFS_HANDLE_STRING_LEN); 2052 PVFS_unparse(copies_in[i],PVFS_handle_string); 2050 PVFS_handle_unparse(copies_in[i],PVFS_handle_string); 2053 2051 gossip_debug(GOSSIP_MIRROR_DEBUG,"\thandle_array_copies(%d):%s\n" 2054 2052 ,(int)i … … 2073 2071 for (j=0; j<out_cols; j++) 2074 2072 { 2075 memset(PVFS_handle_string,0,PVFS_HANDLE_STRING_LENGTH);2076 2073 PVFS_handle_unparse(copies_out[(i*out_cols)+j],PVFS_handle_string); 2077 2074 gossip_debug(GOSSIP_MIRROR_DEBUG,"\t\t(%d,%d):%s\n" -
branches/orange-next/src/server/get-attr.sm
r8945 r8950 1053 1053 index = (row*meta->dfile_count) + col; 1054 1054 if ( s_op->u.getattr.mirror_dfile_status_array[index] == STATUS_INIT ) 1055 meta->mirror_dfile_array[index] = 0;1055 PVFS_handle_clear(meta->mirror_dfile_array[index]); 1056 1056 gossip_debug(GOSSIP_MIRROR_DEBUG, 1057 1057 "\tmirror handle[%d]:%llu \t"
