Thread (1 message) 1 message, 1 author, 2011-06-13

Re: [patch] fix O_DIRECT alignment notes in open(2)

From: Jeff Moyer <hidden>
Date: 2011-06-13 19:34:41

Mark Robson [off-list ref] writes:
On 13 June 2011 15:21, Jeff Moyer [off-list ref] wrote:
quoted
Hi,

O_DIRECT requires alignment to the underlying device's logical block
size.  It used to be pretty safe to assume this was 512 bytes, but
that's no longer the case with the introduction of 4k logical sector
size devices.

Feel free to change the wording in the man page as you see fit, but
here's an example of how it might be fixed...
It seems to me, that we should cite in the man page the system call required
to get the underlying device's block size. Is this statfs(2) ?
Hi, Mark,

I've added back the CC list, not sure why it was dropped.

I think you would need to issue a BLKSSZGET ioctl to the block device.

Cheers,
Jeff
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help