BurstFS_Server/burstfs_metadata.c
int meta_process_attr_get(char *buf, int sock_id,\
		burstfs_file_attr_t *ptr_attr_val) {
	*fattr_keys[0] = *((int *)(buf + 2 * sizeof(int)));
	fattr_val_t *tmp_ptr_attr;

	int rc;

	md->primary_index = burstfs_indexes[1];
	bgrm = mdhimGet(md, md->primary_index, fattr_keys[0],\
			sizeof(fattr_key_t), MDHIM_GET_EQ);

	if (!bgrm || bgrm->error) {
		rc = ULFS_ERROR_MDHIM;
	} else {
		tmp_ptr_attr = (fattr_val_t *)bgrm->values[0];
		ptr_attr_val->gfid = *fattr_keys[0];

	/*	LOG(LOG_DBG, "rank:%d, getting fattr key:%d\n",\
				glb_rank, *fattr_keys[0]); */
		ptr_attr_val->file_attr = tmp_ptr_attr->file_attr;
		strcpy(ptr_attr_val->filename, tmp_ptr_attr->fname);

		rc = ULFS_SUCCESS;
	}

	mdhim_full_release_msg(bgrm);
	return rc;
}
/* get the file attribute from the key-value store
* @param buf: a buffer that stores the gid
* @param sock_id: the connection id in poll_set of the delegator
* @return success/error code
*/
get the file attribute from the key-value store
get the file attribute from the key - value store
int meta_process_attr_get(char *buf, int sock_id,\
		burstfs_file_attr_t *ptr_attr_val) {
	*fattr_keys[0] = *((int *)(buf + 2 * sizeof(int)));
	fattr_val_t *tmp_ptr_attr;
	int rc;
	md->primary_index = burstfs_indexes[1];
	bgrm = mdhimGet(md, md->primary_index, fattr_keys[0],\
			sizeof(fattr_key_t), MDHIM_GET_EQ);
	if (!bgrm || bgrm->error) {
		rc = ULFS_ERROR_MDHIM;
	} else {
		tmp_ptr_attr = (fattr_val_t *)bgrm->values[0];
		ptr_attr_val->gfid = *fattr_keys[0];
		ptr_attr_val->file_attr = tmp_ptr_attr->file_attr;
		strcpy(ptr_attr_val->filename, tmp_ptr_attr->fname);
		rc = ULFS_SUCCESS;
	}
	mdhim_full_release_msg(bgrm);
	return rc;
}
int meta_process_attr_get ( char * buf , int sock_id , burstfs_file_attr_t * ptr_attr_val ) { * fattr_keys [ 0 ] = * ( ( int * ) ( buf + 2 * sizeof ( int ) ) ) ; fattr_val_t * tmp_ptr_attr ; int rc ; md -> primary_index = burstfs_indexes [ 1 ] ; bgrm = mdhimGet ( md , md -> primary_index , fattr_keys [ 0 ] , sizeof ( fattr_key_t ) , MDHIM_GET_EQ ) ; if ( ! bgrm || bgrm -> error ) { rc = ULFS_ERROR_MDHIM ; } else { tmp_ptr_attr = ( fattr_val_t * ) bgrm -> values [ 0 ] ; ptr_attr_val -> gfid = * fattr_keys [ 0 ] ; ptr_attr_val -> file_attr = tmp_ptr_attr -> file_attr ; strcpy ( ptr_attr_val -> filename , tmp_ptr_attr -> fname ) ; rc = ULFS_SUCCESS ; } mdhim_full_release_msg ( bgrm ) ; return rc ; }
get the file attribute from the key-value store
get the file attribute from the key - value store
/*	LOG(LOG_DBG, "rank:%d, getting fattr key:%d\n",\
				glb_rank, *fattr_keys[0]); */