Messages in this thread | | | Date | Wed, 9 Apr 2003 14:08:32 -0400 | From | Benjamin LaHaise <> | Subject | Re: 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/
| |