lkml.org 
[lkml]   [2003]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectHaving problem with io_getevents with o_direct flag
Date
Hi,

I am having problems with using io_getevents ? Is the o_direct aio support
stable in 2.5.67? Following is the scenario:

Machine: Dell 500SC 1.13Gz
Original Kernel : 2.4.18-3 ( redhat 7.3)
Downloaded kernel 2.5.67 and compiled it.
Installed libaio-0.3.92 aio library.

I am writing an io intensive application and want to leverage the o_direct
aio support. I am using in following way (borrowed from testcase in libaio)

struct iocb **pAiocb;
struct io_event event;
if(io_submit(io_ctx,numAiocb, pAiocb) <0)
{
perror("Error in io_submit");
return(-1);
}
for(i=0;i<numAiocb;i++)
{
if((res=io_getevents(io_ctx,0,1,event,NULL)) && (res != 1))
{
perror("Error in getevents");
return(-1);
}
printf("%d\n",event.res);
}


PROBLEM is : THe code doesn't print an ERROR but in "event.res" the amount
of data read is not same as requested. Sometimes the return size is ZERO
and event is returned.

THE CODE WORKS fine if the file is opened WITHOUT O_DIRECT.

Thanks,
Bobby

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.282 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site