SIONlib  1.7.7
Scalable I/O library for parallel access to task-local files
Macros | Functions
sion_dup.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <time.h>
#include <sys/time.h>
#include "sion.h"
#include "sion_debug.h"
#include "sion_error_handler.h"
#include "sion_internal.h"
#include "sion_metadata.h"
#include "sion_filedesc.h"
#include "sion_fd.h"
#include "sion_file.h"
#include "sion_printts.h"
#include "sion_keyvalue.h"
#include "sion_dup.h"
#include "sion_buffer.h"
Include dependency graph for sion_dup.c:

Go to the source code of this file.

Macros

#define _XOPEN_SOURCE   700
 
#define DFUNCTION   "_sion_dup"
 
#define DFUNCTION   "_sion_dedup"
 
#define DFUNCTION   "_sion_dup_paropen"
 
#define DFUNCTION   "_sion_dup_paropenmappedmaster"
 
#define DFUNCTION   "_sion_dup_blocksizes"
 
#define DFUNCTION   "_sion_dup_all_ds"
 
#define DFUNCTION   "_sion_dup_keyvalptr"
 
#define DFUNCTION   "_sion_dup_all_keyvalptr"
 

Functions

int _sion_dup (int sid, int mode, int rank, uint64_t key)
 Create a duplicated sion file descriptor. More...
 
int _sion_dedup (int sid)
 Destroy a duplicated sion file descriptor. More...
 
int _sion_dup_paropen (_sion_filedesc *sion_filedesc, _sion_filedesc *new_filedesc)
 Duplicate sion_filedesc if the file is opened in paropen_mapped_master. More...
 
int _sion_dup_paropenmappedmaster (_sion_filedesc *sion_filedesc, _sion_filedesc *new_filedesc)
 Duplicate sion_filedesc if the file is opened in paropen_mapped_master. More...
 
int _sion_dup_blocksizes (_sion_filedesc *sion_filedesc, _sion_filedesc *new_filedesc)
 Duplicate the blocksizes array of sion_filedesc. More...
 
int _sion_dup_all_ds (_sion_filedesc *sion_filedesc, _sion_filedesc *new_filedesc)
 Duplicate the all* array of sion_filedesc. More...
 
int _sion_dup_keyvalptr (_sion_filedesc *sion_filedesc, _sion_filedesc *new_filedesc)
 Duplicate the keyvalue data structure of sion_filedesc. More...
 
int _sion_dup_all_keyvalptr (_sion_filedesc *sion_filedesc, _sion_filedesc *new_filedesc)
 Duplicate the keyvalue data structures of sion_filedesc. More...
 

Detailed Description

Functions related to the duplication of sion file descriptor.

Definition in file sion_dup.c.

Function Documentation

◆ _sion_dedup()

int _sion_dedup ( int  sid)

Destroy a duplicated sion file descriptor.

Returns
SION_SUCCESS if okay

Definition at line 157 of file sion_dup.c.

◆ _sion_dup()

int _sion_dup ( int  sid,
int  mode,
int  rank,
uint64_t  key 
)

Create a duplicated sion file descriptor.

Parameters
[in]sidoriginal sid to be duplicated
[in]modemode for duplication (SION_DUP_RANK or SION_DUP_RANK_KEY)
[in]rankrank for new file descriptor
[in]keykey for new file descriptor
Returns
SION_SUCCESS if okay

Definition at line 52 of file sion_dup.c.

◆ _sion_dup_all_ds()

int _sion_dup_all_ds ( _sion_filedesc sion_filedesc,
_sion_filedesc new_filedesc 
)

Duplicate the all* array of sion_filedesc.

Returns
SION_SUCCESS if okay

Definition at line 422 of file sion_dup.c.

◆ _sion_dup_all_keyvalptr()

int _sion_dup_all_keyvalptr ( _sion_filedesc sion_filedesc,
_sion_filedesc new_filedesc 
)

Duplicate the keyvalue data structures of sion_filedesc.

Returns
SION_SUCCESS if okay

Definition at line 484 of file sion_dup.c.

◆ _sion_dup_blocksizes()

int _sion_dup_blocksizes ( _sion_filedesc sion_filedesc,
_sion_filedesc new_filedesc 
)

Duplicate the blocksizes array of sion_filedesc.

Returns
SION_SUCCESS if okay

Definition at line 393 of file sion_dup.c.

◆ _sion_dup_keyvalptr()

int _sion_dup_keyvalptr ( _sion_filedesc sion_filedesc,
_sion_filedesc new_filedesc 
)

Duplicate the keyvalue data structure of sion_filedesc.

Returns
SION_SUCCESS if okay

Definition at line 464 of file sion_dup.c.

◆ _sion_dup_paropen()

int _sion_dup_paropen ( _sion_filedesc sion_filedesc,
_sion_filedesc new_filedesc 
)

Duplicate sion_filedesc if the file is opened in paropen_mapped_master.

Returns
SION_SUCCESS if okay

Definition at line 259 of file sion_dup.c.

◆ _sion_dup_paropenmappedmaster()

int _sion_dup_paropenmappedmaster ( _sion_filedesc sion_filedesc,
_sion_filedesc new_filedesc 
)

Duplicate sion_filedesc if the file is opened in paropen_mapped_master.

Returns
SION_SUCCESS if okay

Definition at line 295 of file sion_dup.c.