lkml.org 
[lkml]   [2000]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: fcntl(2) and other file systems like XFS
Date

I don't think ioctl(2) should be used for regular files.

From man ioctl(2) on Linux.


SYNOPSIS
#include <sys/ioctl.h>

int ioctl(int d, int request, ...)

.
.
.

ERRORS
EBADF d is not a valid descriptor.

EFAULT argp references an inaccessible memory area.

ENOTTY d is not associated with a character special device.


Jim

>
>Jim Mostek writes:
> >
> > I don't see a callout from sys_fcntl into a file system specific routine
> > (other than for file locking). There is a lock callout in
> > the file operations that can be invoked in fcntl_getlk/fcntl_setlk/...
> > (I'm looking in 2.3.42). But, this is different than file system specific
> > fcntls. There is a call to sock_fcntl if the inode is a socket. But, I
> > don't see a call for a file system specific fcntl in sys_fcntl..
> >
> > XFS has several fcntls for things like preallocating space. This is used
> > by some applications who want very large files. This let's a file system
> > allocate the space all at once.
> >
> > Has the issue of a file_operation callout for fcntl gone around before?
> > Anyone opposed to adding this? I don't think this belongs in the
> > inode_operations.
>
> As I understand it, Linux does do this sort of thing via ioctl(),
>not fcntl(). The logic is that fcntl() is for attributes of "file" objects.
>


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

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