lfc_registerfiles man page


lfc_registerfiles - register list of files with their corresponding
replica entry

[1m#include <sys/types.h>[0m
[1m#include "lfc_api.h"[0m

[1mint lfc_registerfiles (int [4m[22mnbfiles[24m[1m, struct lfc_filereg *[4m[22mfiles[24m[1m, int[0m
[1m*[4m[22mnbstatuses[24m[1m, int **[4m[22mstatuses[24m[1m)[0m

[1mlfc_registerfiles [22mregisters a list of files with their corresponding
replica entry. If the lfn is already registered, the guid is optional
and only the replica is added (after checking that filesize and possi-
bly checksum match). If the lfn is not registered yet, the guid is
mandatory for the LFC. The lfn and the replica get registered.

specifies the number of files in the array [4mfiles[24m.

[4mfiles[24m is a pointer to an array of lfc_filereg structures provided by
the application.

struct lfc_filereg {
char *lfn;
char *guid;
mode_t mode;
u_signed64 size;
char *csumtype;
char *csumvalue;
char *server;
char *sfn;

will be set to the number of replies in the array of statuses.

will be set to the address of an array of integer statuses allo-
cated by the API. The client application is responsible for
freeing the array when not needed anymore. Individual statuses
are 0 if the operation was successful or set to the serrno value
in case of error.

This routine returns 0 if the operation was successful or -1 if the
operation failed. In the latter case, [1mserrno [22mis set appropriately.

[1mENOENT [22mA component of [4mlfn[24m prefix does not exist or [4mlfn[24m is a null

[1mE2BIG [22mRequest too large (max 1 MB).

[1mENOMEM [22mMemory could not be allocated for marshalling the request
or unmarshalling the reply.

[1mEACCES [22mSearch permission is denied on a component of the [4mlfn[24m pre-
fix or the file does not exist and write permission on the
parent directory is denied or write permission on the file
itself is denied.

[1mEFAULT [4m[22mfiles[24m, [4mnbstatuses[24m or [4mstatuses[24m is a NULL pointer.

[1mEEXIST [22mThe [4msfn[24m exists already.

[1mENOTDIR [22mA component of [4mlfn[24m prefix is not a directory.

[1mEISDIR [22mThe [4mlfn[24m exists already and is not a regular file.

[1mEINVAL [4m[22mnbfiles[24m is not strictly positive, the length of one of the
[4mguids[24m exceeds [1mCA_MAXGUIDLEN [22mor the length of [4mserver[0m
exceeds [1mCA_MAXHOSTNAMELEN [22mor lfn and guid are both given
and they point at a different file.

[1mENOSPC [22mThe name server database is full.

[1mENAMETOOLONG [22mThe length of [4mlfn[24m exceeds [1mCA_MAXPATHLEN [22mor the length of
an [4mlfn[24m component exceeds [1mCA_MAXNAMELEN [22mor the length of
[4msfn[24m exceeds [1mCA_MAXSFNLEN[22m.

[1mSENOSSERV [22mService unknown.

[1mSEINTERNAL [22mDatabase error.

[1mSECOMERR [22mCommunication error.

[1mENSNACT [22mName server is not running or is being shutdown.

[1mSEE ALSO[0m
[1mCastor_limits(4)[22m, [1mlfc_addreplica(3)[22m, [1mlfc_creatg(3)[22m, [1mlfc_setfsize(3)[0m

[1mLCG Grid Deployment [22mTeam

LFC $Date: 2010-09-14 13:37:49 +0200 (Tue, 14 SepL2F0C1_0R)EG$ISTERFILES(3)