Return-Path: linux-nfs-owner@vger.kernel.org Received: from mail-vw0-f46.google.com ([209.85.212.46]:38955 "EHLO mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753648Ab1K3NUi (ORCPT ); Wed, 30 Nov 2011 08:20:38 -0500 Received: by vbbfc26 with SMTP id fc26so302582vbb.19 for ; Wed, 30 Nov 2011 05:20:37 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <4ED6290F.4020407@tonian.com> References: <1322887965-2938-1-git-send-email-bergwolf@gmail.com> <1322887965-2938-4-git-send-email-bergwolf@gmail.com> <4ED6290F.4020407@tonian.com> From: Peng Tao Date: Wed, 30 Nov 2011 21:20:16 +0800 Message-ID: Subject: Re: [PATCH 3/4] nfsv41: get lseg before issue LD IO if pgio doesn't carry lseg To: Benny Halevy Cc: Trond.Myklebust@netapp.com, linux-nfs@vger.kernel.org, Peng Tao Content-Type: text/plain; charset=UTF-8 Sender: linux-nfs-owner@vger.kernel.org List-ID: T24gV2VkLCBOb3YgMzAsIDIwMTEgYXQgOTowMSBQTSwgQmVubnkgSGFsZXZ5IDxiaGFsZXZ5QHRv bmlhbi5jb20+IHdyb3RlOgo+IE9uIDIwMTEtMTItMDMgMDY6NTIsIFBlbmcgVGFvIHdyb3RlOgo+ PiBUaGlzIGdpdmVzIExEIG9wdGlvbiBub3QgdG8gYXNrIGZvciBsYXlvdXQgaW4gcGdfaW5pdC4K Pj4KPj4gU2lnbmVkLW9mZi1ieTogUGVuZyBUYW8gPHBlbmdfdGFvQGVtYy5jb20+Cj4+IC0tLQo+ PiDCoGZzL25mcy9wbmZzLmMgfCDCoCA0NiArKysrKysrKysrKysrKysrKysrKysrKysrKysrKysr KysrKysrKysrKysrKysrCj4+IMKgMSBmaWxlcyBjaGFuZ2VkLCA0NiBpbnNlcnRpb25zKCspLCAw IGRlbGV0aW9ucygtKQo+Pgo+PiBkaWZmIC0tZ2l0IGEvZnMvbmZzL3BuZnMuYyBiL2ZzL25mc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