Tested on GCC 3.1.1, GCC 3.2 Pentium, Pentium MMX, K6 The kernel will compile correctly with GCC 2.95.4 The test program was compiled with: gcc -g -O2 -pipe odirect.c -o odirect And requires a partition with 512M+ of free space. This apparently does not affect all kernels, but does affect the Vanilla kernel, and the XFS CVS Kernel. The gentoo-2.4.19-r7 kernel did not seems to be affected on my machine, which may be due to some patching of O_DIRECT in the -aa or other kernel trees.
Created attachment 3544 [details] odirect.c
This affects XFS, ext3 and all other kernel systems using O_DIRECT. XFS is hit particularly bad because of the it's xfs_fsr defragmentation utility.
hrm... can you check this out with xfs-sources-2.4.19-r1 and gentoo-sources-2.4.19-r9 please?
O_DIRECT definiately doesn't work with the 3.2 GCC compiled xfs-sources-2.4.19-r1 kernel. The gentoo-sources-2.4.19-r9 doesn't contain XFS support which is required for my i586 Box.
IIRC the fixes for O_DIRECT have been merged into mainstream from -ac now... next kernel should fixor this.
Works fine here on root@azeroth andrew # cat /proc/version Linux version 2.4.20-pre10-mjc2 (root@cdimage) (gcc version 3.2.1) #1 Sat Jan 18 15:24:34 CST 2003 P5/166Mhz MMX machine running ReiserFS.
this appears to be fixed in the 2.4.20 based xfs-sources/gentoo-sources. closing. Jay