Re: [PATCH 1/3] direct-io: make O_DIRECT IO path be page based

From: Trond Myklebust
Date: Thu Aug 20 2009 - 09:08:51 EST


On Mon, 2009-08-17 at 14:11 +0200, Jens Axboe wrote:
> On Mon, Aug 17 2009, Jens Axboe wrote:
> > Switch the aops->direct_IO() and below code to use page arrays
> > instead, so that it doesn't make any assumptions about who the pages
> > belong to. This works directly for all users but NFS, which just
> > uses the same helper that the generic mapping read/write functions
> > also call.
>
> A quick NFS test reveals a simple problem - it wants to free the
> pagevec on IO completion, but for O_DIRECT it should not do that anymore
> since it'll simply inherit the given page map.
>
> There's a flag structure in the nfs_{read,write}_data structure, but I
> was not able to find out which flags (if any?!) it actually uses. So I
> just stuck an int in there. Trond?

Why not just have O_DIRECT reset the pagevec before freeing the
structure?

Cheers
Trond
--
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@xxxxxxxxxx
www.netapp.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/