Re: O_DIRECT fails in some kernel and FS

From: Joel Becker (jlbec@evilplan.org)
Date: Mon Feb 04 2002 - 13:55:55 EST


On Mon, Feb 04, 2002 at 01:49:10PM -0500, Jeff Garzik wrote:
> I have similar inclination, that is inspired from the implementation of
> "NTFS TNG": hard sector size should always equal sb->blocksize. This
> allows for fine-grained operations at the O_DIRECT level, logical block
> sizes > PAGE_CACHE_SIZE, easy implementation of fragments (>= hard sect
> size), O_DIRECT for fragments, and other stuff.

        I'm not sure I get you here. When I say hardsectsize, I mean
get_hardsectsize(dev), not super->s_blocksize. On ext2, s_blocksize is
1k, 2k, or 4k. Databases want to use O_DIRECT aligned at 512b. This
can be done (again, see my patch), and I would think it necesary.
        If you meant that s_blocksize should match get_hardsectsize, I
agree. If you meant the other way around, then consumers that want to
do O_DIRECT operations at 512b alingments won't be able to.

Joel

-- 

"All alone at the end of the evening When the bright lights have faded to blue. I was thinking about a woman who had loved me And I never knew"

http://www.jlbec.org/ jlbec@evilplan.org - 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/



This archive was generated by hypermail 2b29 : Thu Feb 07 2002 - 21:00:36 EST