Re: aio_read() in character driver is not getting calls when making aio_read system call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Parav Pandit,

     I don`t think file_operations structure contain aio_read variable. If any thing wrong please let me know.
 

struct file_operations {
loff_t (*llseek) (struct file *, loff_t, int);
ssize_t (*read) (struct file *, char *, size_t, loff_t *);
ssize_t (*write) (struct file *, const char *, size_t, loff_t *);
int (*readdir) (struct file *, void *, filldir_t);
unsigned int (*poll) (struct file *, struct poll_table_struct *);
int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long);
int (*mmap) (struct file *, struct vm_area_struct *);
int (*open) (struct inode *, struct file *);
int (*flush) (struct file *);
int (*release) (struct inode *, struct file *);
int (*fsync) (struct file *, struct dentry *);
int (*fasync) (int, struct file *, int);
int (*check_media_change) (kdev_t dev);
int (*revalidate) (kdev_t dev);
int (*lock) (struct file *, int, struct file_lock *);
};

Regards,
Rajath.N.R

On 12/8/06, Parav Pandit <paravpandit@xxxxxxxxx> wrote:
Hi,
 
I am adding aio_read and aio_write hooks to my character driver.
 
When I make aio_read() system call, for some reason instead of dbg_aio_read(), kernel is calling the syncronous dbg_read() function.
 
Here is the application level code for opening the file:
 
fd = open("/dev/debug_driver", O_RDONLY );
 
Below is the file_operations structure:
static struct file_operations debug_fops = {
.owner = THIS_MODULE,
.aio_read = dbg_aio_read,
.read = dbg_read,
.ioctl = dbg_ioctl,
.open = dbg_open,
.release = dbg_release,
};
 
What additional thing I need to do so that my char driver aio_read is called when application calls aio_read() system call?
Interestingly same code is working if i open a normal text file.
 
Regards,
Parav Pandit
 


Access over 1 million songs - Yahoo! Music Unlimited.



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux