[OpenAFS-devel] Error of VGetVolume() call in venus/fs.c
xianwei zhang
cinwell.chang@gmail.com
Mon, 9 Apr 2012 13:47:34 -0400
--14dae9340ddbebdf4c04bd4299a7
Content-Type: text/plain; charset=ISO-8859-1
Hi,
Currently I am doing a small project on OpenAFS. Now, I am planning to read
the Vnode associated with a file. My idea is let user enter the command 'fs
getvnode FILE_NAME'
to view the vnode (status) information:
(1) user enters 'fs getvnode /afs'
(2) first get the fid for that file and then use the fid to get the vnode
while for (1) response is in the file /venus/fs.c, the function to get
vnode is implemented in file /vol/vnode.c. I want to call the VGetVnode()
in fs.c. But
I always failed to make the modified codes. Error is:
/openafs-1.4.14/lib/vlib.a(volume.o): In function 'VReleaseVolumeHandles_r':
/openafs-1.4.14/src/vol/volume.c: 1235: undefined reference to
'DFlushVolume'
/openafs-1.4.14/lib/vlib.a(volume.o): In function 'VCloseVolumeHandles_r':
/openafs-1.4.14/src/vol/volume.c: 1323: undefined reference to
'DFlushVolume'
My modifications are:
(1) include more headers:
#include <afs/ihandle.h>
#include <afs/nfs.h>
#include <afs/vnode.h>
#include <afs/volume.h>
#include <afs/dir.h>
(2) within the method GetFidCmd() I added two lines with the if(0 ==
pioctl(ti->data, VIOCGETFID, &blob, 1))
int errorCode;
Volume * vol = VGetVolume(&errorCode, (afs_int32)vfid.Fid.Volume);
I didn't change the Makefile since seems no need to change that.
I am a newbie to OpenAFS and C, plz help me to solve this silly question.
Or, better idea to achieve this?
Regards,
--14dae9340ddbebdf4c04bd4299a7
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div class=3D"gmail_quote">Hi,<div><br></div><div>Currently I am doing a sm=
all project on OpenAFS. Now, I am planning to read the Vnode associated wit=
h a file. My idea is let user enter the command 'fs getvnode FILE_NAME&=
#39;=A0</div>
<div>to view the vnode (status) information:=A0</div>
<div>(1) user enters 'fs getvnode /afs'</div><div>(2) first get the=
fid for that file and then use the fid to get the vnode</div>
<div><br></div><div>while for (1) response is in the file /venus/fs.c, the =
function to get vnode is implemented in file /vol/vnode.c. I want to call t=
he VGetVnode() in fs.c. But</div><div>I always failed to make the modified =
codes. Error is:</div>
<div>/openafs-1.4.14/lib/vlib.a(volume.o): In function 'VReleaseVolumeH=
andles_r':</div><div>/openafs-1.4.14/src/vol/volume.c: 1235: undefined =
reference to 'DFlushVolume'</div><div><div>/openafs-1.4.14/lib/vlib=
.a(volume.o): In function 'VCloseVolumeHandles_r':</div>
<div>/openafs-1.4.14/src/vol/volume.c: 1323: undefined reference to 'DF=
lushVolume'</div></div><div><br></div><div>My modifications are:</div><=
div>(1) include more headers:</div><div>#include <afs/ihandle.h></div=
>
<div>#include <afs/nfs.h></div><div>#include <afs/vnode.h></div=
><div>#include <afs/volume.h></div><div>#include <afs/dir.h></d=
iv><div><br></div><div>(2) within the method GetFidCmd() I added two lines =
with the if(0 =3D=3D pioctl(ti->data, VIOCGETFID, &blob, 1))</div>
<div>int errorCode;</div><div>Volume * vol =3D VGetVolume(&errorCode, (=
afs_int32)vfid.Fid.Volume);</div><div><br></div><div>I didn't change th=
e Makefile since seems no need to change that.</div><div><br></div><div>
I am a newbie to OpenAFS and C, plz help me to solve this silly question. O=
r, better idea to achieve this?</div>
<div><br></div><div>Regards,</div><div><br></div><div><br></div>
</div><br>
--14dae9340ddbebdf4c04bd4299a7--