BurstFS_Server/burstfs_metadata.c
int meta_process_attr_set(char *buf, int sock_id) {
	int rc = ULFS_SUCCESS;

	*fattr_keys[0] = *((int *)(buf + 2 * sizeof(int)));

	burstfs_file_attr_t *ptr_fattr =\
			(burstfs_file_attr_t *)(buf + 3 * sizeof(int));

	fattr_vals[0]->file_attr = ptr_fattr->file_attr;
	strcpy(fattr_vals[0]->fname, ptr_fattr->filename);

/*	LOG(LOG_DBG, "rank:%d, setting fattr key:%d, value:%s\n",\
			glb_rank, *fattr_keys[0], fattr_vals[0]->fname); */
	md->primary_index = burstfs_indexes[1];
	brm = mdhimPut(md, fattr_keys[0], sizeof(fattr_key_t), \
		       fattr_vals[0], sizeof(fattr_val_t), \
		       NULL, NULL);
	if (!brm || brm->error) {
		rc = ULFS_ERROR_MDHIM;
	} else {
		rc = ULFS_SUCCESS;
	}

	mdhim_full_release_msg(brm);

	return rc;
}
/**
* store the file attribute to the key-value store
* @param buf: file attribute received from the client
* @param sock_id: the connection id in poll_set of
* the delegator
* @return success/error code
*/
store the file attribute to the key-value store
store the file attribute to the key - value store
int meta_process_attr_set(char *buf, int sock_id) {
	int rc = ULFS_SUCCESS;
	*fattr_keys[0] = *((int *)(buf + 2 * sizeof(int)));
	burstfs_file_attr_t *ptr_fattr =\
			(burstfs_file_attr_t *)(buf + 3 * sizeof(int));
	fattr_vals[0]->file_attr = ptr_fattr->file_attr;
	strcpy(fattr_vals[0]->fname, ptr_fattr->filename);
	md->primary_index = burstfs_indexes[1];
	brm = mdhimPut(md, fattr_keys[0], sizeof(fattr_key_t), \
		       fattr_vals[0], sizeof(fattr_val_t), \
		       NULL, NULL);
	if (!brm || brm->error) {
		rc = ULFS_ERROR_MDHIM;
	} else {
		rc = ULFS_SUCCESS;
	}
	mdhim_full_release_msg(brm);
	return rc;
}
int meta_process_attr_set ( char * buf , int sock_id ) { int rc = ULFS_SUCCESS ; * fattr_keys [ 0 ] = * ( ( int * ) ( buf + 2 * sizeof ( int ) ) ) ; burstfs_file_attr_t * ptr_fattr = ( burstfs_file_attr_t * ) ( buf + 3 * sizeof ( int ) ) ; fattr_vals [ 0 ] -> file_attr = ptr_fattr -> file_attr ; strcpy ( fattr_vals [ 0 ] -> fname , ptr_fattr -> filename ) ; md -> primary_index = burstfs_indexes [ 1 ] ; brm = mdhimPut ( md , fattr_keys [ 0 ] , sizeof ( fattr_key_t ) , fattr_vals [ 0 ] , sizeof ( fattr_val_t ) , NULL , NULL ) ; if ( ! brm || brm -> error ) { rc = ULFS_ERROR_MDHIM ; } else { rc = ULFS_SUCCESS ; } mdhim_full_release_msg ( brm ) ; return rc ; }
store the file attribute to the key-value store
store the file attribute to the key - value store
/*	LOG(LOG_DBG, "rank:%d, setting fattr key:%d, value:%s\n",\
			glb_rank, *fattr_keys[0], fattr_vals[0]->fname); */