[OpenAFS] Re: openafs and linux 2.6.19-rc1 [patch]

chas williams - CONTRACTOR chas@cmf.nrl.navy.mil
Fri, 06 Oct 2006 12:54:13 -0400


In message <87zmc9whcb.fsf@sycorax.lbl.gov>,Alex Romosan writes:
>i think this chunk (in src/afs/LINUX/osi_vnodeops.c) ended in the
>wrong place. the .aio_read/write were added to afs_dir_fops but they
>should have been added to afs_file_fops instead (the next structure
>below). at least that's what i had in my working version.

yep.  i guess i need my head examined.  derrick, please apply
this (the patch seemed to make it into afs already).

--- src/afs/LINUX/osi_vnodeops.c.000	2006-10-06 12:51:19.000000000 -0400
+++ src/afs/LINUX/osi_vnodeops.c	2006-10-06 12:48:43.000000000 -0400
@@ -558,10 +558,6 @@
   .read =	generic_read_dir,
 #endif
   .readdir =	afs_linux_readdir,
-#ifdef GENERIC_FILE_AIO_READ
-  .aio_read =	generic_file_aio_read,
-  .aio_write =	generic_file_aio_write,
-#endif
 #ifdef HAVE_UNLOCKED_IOCTL
   .unlocked_ioctl = afs_unlocked_xioctl,
 #else
@@ -577,6 +573,10 @@
 struct file_operations afs_file_fops = {
   .read =	afs_linux_read,
   .write =	afs_linux_write,
+#ifdef GENERIC_FILE_AIO_READ
+  .aio_read =	generic_file_aio_read,
+  .aio_write =	generic_file_aio_write,
+#endif
 #ifdef HAVE_UNLOCKED_IOCTL
   .unlocked_ioctl = afs_unlocked_xioctl,
 #else