lkml.org 
[lkml]   [2003]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: O_DIRECT alignment requirements ?
On Wed, Apr 09, 2003 at 08:48:36AM -0700, Joel Becker wrote:
> In 2.5, the alignment restrictions have been relaxed. Your
> offset, buffer, and transfer size must all be aligned on the hardware
> sector size. That is the output of BLKSSZGET against the block device,
> and is also what get_hardsect_size() returns in the kernel. For almost
> all disks this number is 512b, so you can do O_DIRECT on 512b alignment
> for a raw disk or for an ext3 filesystem. About the only thing that
> may not have a 512b hardware sector size is a CD-ROM.

Well, and SCSI devices configured to use 528 byte sectors and such...

-ben
--
Junk email? <a href="mailto:aart@kvack.org">aart@kvack.org</a>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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