On Thu, 2002-10-03 at 07:27, Gabor Forgacs wrote:
> Thanx for the answers to my previous question
> I am still tweaking with direct io under linux.
>
> I just don't know how to get the requirements for directio
> under irix i used the
>
> struct dioattr dio;
> if( -1 == fcntl( fd, F_DIOINFO, &dio))
> {
> perror("fcntl");
> exit(1);
> }
>
> It just doesn't work under linux, dioattr and the F_DIOINFO are undefined.
> I can see the O_DIRECT if i define the _GNU_SOURCE.
>
> What is the way under linux ?
All the fcntl operations in Irix became ioctl calls in linux. You need
to have the xfsprogs-devel package installed. All of the structures
and ioctl values you need are in /usr/include/xfs/xfs_fs.h. So in
this case, XFS_IOC_DIOINFO is what you need.
Steve
|