Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp933951imm; Wed, 11 Jul 2018 13:45:29 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeat3jVMFR3tZXX+ULINNsWfN9gH2jmSn8uSaHidYFeKYhFR2H7e+SRT1VEd6rurfGfHCNt X-Received: by 2002:a63:440a:: with SMTP id r10-v6mr150839pga.27.1531341928999; Wed, 11 Jul 2018 13:45:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531341928; cv=none; d=google.com; s=arc-20160816; b=He84Br23a2gxujhArg57y2Dvu+2AYZ23OpgmmSiDMuk5tS98jZZL3eLkeLQG9Cm43r Col9yLOHL+wiRgFgWX9AYXkTcKzLTY3MSI7IiQZLTNDCMOEAsgw9DLMXAtk8yXjQTsoG mn6OFAOBf4bGAb0+cRHnbGH1ipojTEBJTshlBAW+lF0xCmCOQtuEdDY49JrWSOY/UY/f uJpPJLzHqv+0ZwIO4ufqT2hmvrimghIhIHgZp7ALwi2WHDbIK+FveXwcoo+jESQdRs8w JjN9x4vlLWF4AtcsHQ8bQKaPkXnZ57E1/prJjI69ebneuqPgfQSxVN5JpDjgdULzcfOt xtJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=JmaAon480m2rkXe9XK2N4wls/0zr6jmhwzT5A8p0p2c=; b=cFc0bLl7D/fO2ZanZ8kC2hrTEet3joc8c+JgUFNzIdzY1gfihVvdEadbI+wg1ersh3 WGKH6rsIUu4tPlgNYQvGAN8EUnuVkDAkiraGUD8xIbWMQGTdLwQ5+ANNXiIImlCi4Q1r buiECeJzEIMDxCg92WgBn4waikiTsGojts6Q6ifP655qig//SGQwtltXD6WnzGXyKD26 B8Ps7XmzwzquTLRCngQG3uMIn/iFFMqY0w0rF6Md9au8HgVY2vqvxalWk5n/gSEpDdxE R7NRGTCvijXmF+P+e85pGiBIqtakf4BVeM4ihg10CbAwAjwnUT6M1xFCCC4x3CXINLTm juUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 75-v6si19861930pgh.110.2018.07.11.13.45.13; Wed, 11 Jul 2018 13:45:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388477AbeGKO3u (ORCPT + 99 others); Wed, 11 Jul 2018 10:29:50 -0400 Received: from nautica.notk.org ([91.121.71.147]:39831 "EHLO nautica.notk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387949AbeGKO3u (ORCPT ); Wed, 11 Jul 2018 10:29:50 -0400 Received: by nautica.notk.org (Postfix, from userid 1001) id DA655C009; Wed, 11 Jul 2018 16:25:12 +0200 (CEST) Date: Wed, 11 Jul 2018 16:24:57 +0200 From: Dominique Martinet To: Matthew Wilcox Cc: v9fs-developer@lists.sourceforge.net, Latchesar Ionkov , Eric Van Hensbergen , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Ron Minnich Subject: Re: [V9fs-developer] [PATCH 5/6] 9p: Use a slab for allocating requests Message-ID: <20180711142457.GB9691@nautica> References: <20180628132629.3148-1-willy@infradead.org> <20180628132629.3148-6-willy@infradead.org> <20180711133313.GC835@nautica> <20180711141256.GC23640@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180711141256.GC23640@bombadil.infradead.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Matthew Wilcox wrote on Wed, Jul 11, 2018: > On Wed, Jul 11, 2018 at 03:33:13PM +0200, Dominique Martinet wrote: > > Well this appears to work but P9_NOTAG being '(u16)(~0)' I'm not too > > confident with P9_NOTAG + 1. . . it doesn't look like it's overflowing > > before the cast on my laptop but is that guaranteed? > > By my understanding of n1256.pdf ... this falls under 6.3.1.8 ("Usual > arithmetic conversions"). We have a u16 and an int. Therefore this > rule applies: > > Otherwise, if the type of the operand with signed integer type can > represent all of the values of the type of the operand with unsigned > integer type, then the operand with unsigned integer type is converted > to the type of the operand with signed integer type. Thanks for checking, that'll work then. > > I do not see any call to idr_destroy, is that OK? > > Yes, that's fine. It used to be (back in 2013) that one had to call > idr_destroy() in order to free the preallocated idr data structures. > Now it's a no-op if called on an empty IDR, and I would expect that both > IDRs are empty at the time that it comes to unloading the module (and if > they aren't, we probably have bigger problems than a small memory leak). > Some users like to assert that the IDR is empty; most do not go to that > extent of defensive programming. Ok, I agree we're not there yet. Just comments nitpicks, then :) -- Dominique Martinet