[patch] open.2: Fix up incorrect O_DIRECT aligment information

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

 



Hi,

The alignment text for O_DIRECT is slightly misleading:

       Under  Linux  2.4, transfer sizes, and the alignment of the user buffer
       and the file offset must all be multiples of the logical block size  of
       the  file  system.   Under  Linux 2.6, alignment to 512-byte boundaries
       suffices.

The last sentence is incorrect.  You cannot perform O_DIRECT I/O in
sizes smaller than the underlying logical block size (for block devices
and block-based file systems; nfs is a different beast).  I've attached
my proposed change.  Comments and word-smithing are most welcome.

Cheers,
Jeff

Signed-off-by: Jeff Moyer <jmoyer@xxxxxxxxxx>

diff --git a/man2/open.2 b/man2/open.2
index e518c1f..df92d6a 100644
--- a/man2/open.2
+++ b/man2/open.2
@@ -787,7 +787,8 @@ operation in
 Under Linux 2.4, transfer sizes, and the alignment of the user buffer
 and the file offset must all be multiples of the logical block size
 of the file system.
-Under Linux 2.6, alignment to 512-byte boundaries suffices.
+Under Linux 2.6, alignment to the underlying block device's logical
+block size suffices.
 .LP
 .B O_DIRECT
 I/Os should never be run concurrently with the
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux