Return-Path: linux-nfs-owner@vger.kernel.org Received: from mx2.netapp.com ([216.240.18.37]:9242 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757536Ab2BOBuj (ORCPT ); Tue, 14 Feb 2012 20:50:39 -0500 From: "Myklebust, Trond" To: "J. Bruce Fields" CC: Vitaliy Gusev , "Adamson, Andy" , "linux-nfs@vger.kernel.org" Subject: Re: [PATCH] nfs41: Initialize slot->seq_nr at nfs4_init_slot_table() Date: Wed, 15 Feb 2012 01:50:28 +0000 Message-ID: <1329270628.28837.15.camel@lade.trondhjem.org> References: <1329256108-1535-1-git-send-email-gusev.vitaliy@nexenta.com> <1329259606.11759.15.camel@lade.trondhjem.org> <4F3AFD84.3020709@nexenta.com> <1329266587.28837.4.camel@lade.trondhjem.org> <20120215005315.GA9018@fieldses.org> In-Reply-To: <20120215005315.GA9018@fieldses.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org List-ID: T24gVHVlLCAyMDEyLTAyLTE0IGF0IDE5OjUzIC0wNTAwLCBKLiBCcnVjZSBGaWVsZHMgd3JvdGU6 DQo+IE9uIFdlZCwgRmViIDE1LCAyMDEyIGF0IDEyOjQzOjA4QU0gKzAwMDAsIE15a2xlYnVzdCwg VHJvbmQgd3JvdGU6DQo+ID4gVGhlbiB3ZSBoYXZlIGEgcHJvYmxlbS4gVGhlIHplcm8gaW5pdGlh bGlzYXRpb24gaXMgYWxyZWFkeSBpbiB1c2Ugb3V0DQo+ID4gdGhlcmUgaW4gYm90aCBjb21tZXJj aWFsIGFuZCBub24tY29tbWVyY2lhbCB2ZXJzaW9ucyBvZiBMaW51eC4gSXQgaXMgdG9vDQo+ID4g bGF0ZSB0byBjaGFuZ2UgdGhhdCBub3cuDQo+ID4gDQo+ID4gRnVydGhlcm1vcmUsIHNpbmNlIG5v bmUgb2YgdGhlIHNlcnZlcnMgd2UndmUgdGVzdGVkIGFnYWluc3Qga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