1RFIOSETOPT(3)                    Rfio      Library      Functions
2RFIOSETOPT(3)
3
4
5
6[1mNAME[0m
7       rfiosetopt ‐ set RFIO options
8
9[1mSYNOPSIS[0m
10       [1m#include <sys/types.h>[0m
11       [1m#include "rfio_api.h"[0m
12
13       [1mint rfiosetopt (int [4m[22mopt[24m[1m,  int  *[4m[22mp‐
14val[24m[1m, int [4m[22mlen[24m[1m)[0m
15
16       [1mint    rfio_setbufsize    (int   [4m[22ms[24m[1m,   int
17[4m[22mbufsize[24m[1m)[0m
18
19[1mDESCRIPTION[0m
20       [1mrfiosetopt  [22msets  the RFIO option [4mopt[24m to the
21content of the memory cell
22       pointed by [4mpval[24m.
23
24       [1mrfio_setbufsize [22msets the size of the readahead buf‐
25fer to be used  on  a
26       particular socket connection.
27
28       [4mopt[24m can have on of the following values:
29
30              [1mRFIO_READOPT[0m
31                     The  value  pointed  by  pval  can   be   0,
32RFIO_READBUF,
33                     RFIO_READAHEAD or RFIO_STREAM (V3).
34
35                     If  set  to zero, a normal read will be used
36(one  request
37                     to the server per read).
38
39                     If  set  to RFIO_READBUF, an internal buffer
40is allocated
41                     in the client API, each call to  the  server
42fills  this
43                     buffer  and  the  user buffer is filled from
44the internal
45                     buffer.  There is one server call per buffer
46fill.
47
48                     If set to RFIO_READAHEAD, an initial call is
49sent to  the
50                     server   which   pushes  data  to the client
51buffer until end
52                     of file is reached or an error occurs or   a
53new  request
54                     comes  from  the client.  There is no inter‐
55mediate buffer
56                     unless RFIO_READBUF|RFIO_READAHEAD is speci‐
57fied.
58
59                     If  RFIO_STREAM  is  set, the V3 protocol is
60enabled.   This
61                     uses  2  socket  connections   between   the
62client and the
63                     server  and  the  server  itself  is  multi‐
64threaded  allowing
65                     overlap  of  disk  and  network  operations.
66The data is
67                     pushed  on the data socket until end of file
68is reached or
69                     an error occurs. The transfer can be  inter‐
70rupted by send‐
71                     ing a packet on the control socket.
72                     Default is RFIO_READBUF.
73
74                     The  default  internal buffer size is 128kB,
75but the buffer
76                     size   can  be  set  with  an   entry   RFIO
77IOBUFSIZE  in
78                     [1mshift.conf  [22mor  thru  the environment
79variable  RFIO_IOBUF‐
80                     SIZE.
81
82              [1mRFIO_NETOPT[0m
83                     The  value pointed by pval can be RFIO_NONET
84or RFIO_NET.
85                     If  set  to  RFIO_NONET,  the NET entries in
86[1mshift.conf  [22mare
87                     ignored.  Default is RFIO_NET.
88
89              [1mRFIO_NETRETRYOPT[0m
90                     The   value   pointed   by   pval   can   be
91RFIO_RETRYIT  or
92                     RFIO_NOTIME2RETRY.
93
94                     If  set  to  RFIO_RETRYIT, there will be re‐
95tries on  failing
96                     connect.   The number of retries is given by
97the environ‐
98                     ment variable RFIO_CONRETRY or the RFIO CON‐
99RETRY entry in
100                     [1mshift.conf[22m.   The retry interval  (in
101seconds) is given by
102                     the  environment  variable  RFIO_CONRETRYINT
103or  the  RFIO
104                     CONRETRYINT entry.
105
106                     If  set  to  RFIO_NOTIME2RETRY,  there  will
107be no retry on
108                     failing connect.
109                     Default is RFIO_RETRYIT.
110
111              [1mRFIO_CONNECTOPT[0m
112                     The   value   pointed   by   pval   can   be
113RFIO_NOLOCAL   or
114                     RFIO_FORCELOCAL.   If  set to  RFIO_FORCELO‐
115CAL, no parsing
116                     is  done  on  pathname. The file is  assumed
117to  be  local.
118                     Default is RFIO_NOLOCAL.
119
120       The [4mlen[24m argument is ignored.
121
122       [4ms[24m is the file descriptor of the receiving socket.
123
124       [4mbufsize[24m is the size of the readahead buffer  to  be
125used.
126
127[1mRETURN VALUE[0m
128       [1mrfiosetopt  [22mreturns 0 if the operation was success‐
129ful or ‐1 if the oper‐
130       ation failed.  In the latter case,  [1mserrno  [22mis  set
131appropriately.
132
133[1mERRORS[0m
134       [1mENOMEM       [22mbuffer could not be allocated.
135
136       [1mEINVAL        [4m[22mopt[24m  is  not  a  valid option,
137[4mbufsize[24m is negative or the user
138                    tries  to  change the buffer size  after  the
139actual I/O has
140                    started.
141
142[1mSEE ALSO[0m
143       [1mrfio_open(3)[22m, [1mrfioreadopt(3)[0m
144
145[1mAUTHOR[0m
146       [1mLCG Grid Deployment [22mTeam
147
148
149
150LCG                                                        $Date$
151RFIOSETOPT(3)
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
Impressum