[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A71F190.3050209@redhat.com>
Date: Thu, 30 Jul 2009 14:16:32 -0500
From: Eric Sandeen <sandeen@...hat.com>
To: Jan Kara <jack@...e.cz>
CC: Theodore Tso <tytso@....edu>, Curt Wohlgemuth <curtw@...gle.com>,
ext4 development <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH RFC] Insure direct IO writes do not use the page cache
Jan Kara wrote:
> On Thu 30-07-09 13:39:12, Eric Sandeen wrote:
...
Honza
>> This is all about right, but it's tricky, because right now, get_block
>> is called in the direct IO path from get_more_blocks(), and it's called
>> with create == 0 unless OWN_LOCKING is specified. If we do get_block w/
>> create == 0 and find prealloc'd blocks, then we're given back unmapped
>> buffer heads. This looks like a hole, and so DIO falls back to buffered.
>>
>> Right now the only way to get create == 1 sent to get_blocks via
>> directio is to do OWN_LOCKING, which implies... we have to do our own
>> locking, and it'll take some time to get it right I think.
> But the get_block function called by get_more_blocks() is specified in
> ext4_direct_IO. So we can provide it with a special direct_IO version of
> get_block function which happily maps also uninitialized extents... It's a
> slight hack, but maintainable IMHO.
Hm, perhaps. xfs does have a xfs_get_blocks_direct() that it uses for DIO.
Although returning mapped unwritten blocks ... well, we'll have to be
sure it doesn't cause any problems elsewhere. :)
-Eric
> Honza
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists