Return-Path: linux-nfs-owner@vger.kernel.org Received: from mx2.netapp.com ([216.240.18.37]:47570 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755814Ab2BOCaJ (ORCPT ); Tue, 14 Feb 2012 21:30:09 -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 02:30:02 +0000 Message-ID: <1329273001.28837.19.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> <1329270628.28837.15.camel@lade.trondhjem.org> In-Reply-To: <1329270628.28837.15.camel@lade.trondhjem.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org List-ID: T24gVHVlLCAyMDEyLTAyLTE0IGF0IDIwOjUwIC0wNTAwLCBUcm9uZCBNeWtsZWJ1c3Qgd3JvdGU6 DQo+IEhhbmcgb24uLi4gTG9va2luZyBhdCAzLjIsIEkgdGhpbmsgeW91J3JlIGNvcnJlY3QuIFdl IHVzZWQgdG8gaW5pdGlhbGlzZQ0KPiB0byAxLCBhbmQgbm93IHdlJ3JlIGluaXRpYWxpc2luZyB0 byAwLg0KPiANCj4gQWguLi4gSSBzZWUgd2hhdCBoYXBwZW5lZC4NCj4gDQo+IGNvbW1pdCBhYWNk NTUzNzI3MGE3NTJmZTEyYTk5MTRhMjA3Mjg0ZmMyMzQxYzZkIChORlN2NC4xOiBjbGVhbnVwIGlu aXQNCj4gYW5kIHJlc2V0IG9mIHNlc3Npb24gc2xvdCB0YWJsZXMpIHNlZW1zIHRvIGhhdmUgcmVt b3ZlZCB0aGUgY2Fsb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