xfs
[Top] [All Lists]

Re: O_DIRECT and linux

To: Gabor Forgacs <gabor@xxxxxxxxxxxxxx>
Subject: Re: O_DIRECT and linux
From: Stephen Lord <lord@xxxxxxx>
Date: 03 Oct 2002 08:06:38 -0500
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <200210031427.31322.gabor@xxxxxxxxxxxxxx>
References: <200210031427.31322.gabor@xxxxxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
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



<Prev in Thread] Current Thread [Next in Thread>