1RFIOSETOPT(3)               Rfio Library Functions               RFIOSETOPT(3)
2
3
4

NAME

6       rfiosetopt - set RFIO options
7

SYNOPSIS

9       #include <sys/types.h>
10       #include "rfio_api.h"
11
12       int rfiosetopt (int opt, int *pval, int len)
13
14       int rfio_setbufsize (int s, int bufsize)
15

DESCRIPTION

17       rfiosetopt  sets  the RFIO option opt to the content of the memory cell
18       pointed by pval.
19
20       rfio_setbufsize sets the size of the readahead buffer to be used  on  a
21       particular socket connection.
22
23       opt can have on of the following values:
24
25              RFIO_READOPT
26                     The  value  pointed  by  pval  can  be  0,  RFIO_READBUF,
27                     RFIO_READAHEAD or RFIO_STREAM (V3).
28
29                     If set to zero, a normal read will be used  (one  request
30                     to the server per read).
31
32                     If  set  to RFIO_READBUF, an internal buffer is allocated
33                     in the client API, each call to  the  server  fills  this
34                     buffer  and  the  user buffer is filled from the internal
35                     buffer. There is one server call per buffer fill.
36
37                     If set to RFIO_READAHEAD, an initial call is sent to  the
38                     server  which  pushes data to the client buffer until end
39                     of file is reached or an error occurs or  a  new  request
40                     comes  from  the client.  There is no intermediate buffer
41                     unless RFIO_READBUF|RFIO_READAHEAD is specified.
42
43                     If RFIO_STREAM is set, the V3 protocol is enabled.   This
44                     uses  2  socket  connections  between  the client and the
45                     server and the server itself is  multi-threaded  allowing
46                     overlap  of  disk  and  network  operations.  The data is
47                     pushed on the data socket until end of file is reached or
48                     an error occurs. The transfer can be interrupted by send‐
49                     ing a packet on the control socket.
50                     Default is RFIO_READBUF.
51
52                     The default internal buffer size is 128kB, but the buffer
53                     size   can  be  set  with  an  entry  RFIO  IOBUFSIZE  in
54                     shift.conf or thru the environment  variable  RFIO_IOBUF‐
55                     SIZE.
56
57              RFIO_NETOPT
58                     The  value pointed by pval can be RFIO_NONET or RFIO_NET.
59                     If set to RFIO_NONET, the NET entries in  shift.conf  are
60                     ignored.  Default is RFIO_NET.
61
62              RFIO_NETRETRYOPT
63                     The   value  pointed  by  pval  can  be  RFIO_RETRYIT  or
64                     RFIO_NOTIME2RETRY.
65
66                     If set to RFIO_RETRYIT, there will be retries on  failing
67                     connect.   The number of retries is given by the environ‐
68                     ment variable RFIO_CONRETRY or the RFIO CONRETRY entry in
69                     shift.conf.   The retry interval (in seconds) is given by
70                     the environment variable  RFIO_CONRETRYINT  or  the  RFIO
71                     CONRETRYINT entry.
72
73                     If  set  to  RFIO_NOTIME2RETRY, there will be no retry on
74                     failing connect.
75                     Default is RFIO_RETRYIT.
76
77              RFIO_CONNECTOPT
78                     The  value  pointed  by  pval  can  be  RFIO_NOLOCAL   or
79                     RFIO_FORCELOCAL.   If  set to RFIO_FORCELOCAL, no parsing
80                     is done on pathname. The file is  assumed  to  be  local.
81                     Default is RFIO_NOLOCAL.
82
83       The len argument is ignored.
84
85       s is the file descriptor of the receiving socket.
86
87       bufsize is the size of the readahead buffer to be used.
88

RETURN VALUE

90       rfiosetopt returns 0 if the operation was successful or -1 if the oper‐
91       ation failed.  In the latter case, serrno is set appropriately.
92

ERRORS

94       ENOMEM       buffer could not be allocated.
95
96       EINVAL       opt is not a valid option, bufsize is negative or the user
97                    tries  to  change the buffer size after the actual I/O has
98                    started.
99

SEE ALSO

101       rfio_open(3), rfioreadopt(3)
102

AUTHOR

104       LCG Grid Deployment Team
105
106
107
108LCG          $Date: 2010-02-15 10:01:40 +0100 (Mon, 15 Feb 2010) $RFIOSETOPT(3)
Impressum