Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp483474lqs; Thu, 13 Jun 2024 16:56:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX+f8B2esxHhaGXIkK3LTpSfaEGiYTULp7hmGGYeE5J9DsuvgGeF0+8JQUxTwQIS5cgXA5NtukyftbuZsLmNN2gCOTqJLaZ6CmSiwXivQ== X-Google-Smtp-Source: AGHT+IFgZYNJSJ03UdiOq654bhA2zjV2HBQA+5dGXMjFRJf6q3U6V0WQuDUt3pMLUEvmbiTvHXJX X-Received: by 2002:a05:6a20:a11b:b0:1b6:3fc5:d080 with SMTP id adf61e73a8af0-1bae800c085mr1520776637.43.1718322990953; Thu, 13 Jun 2024 16:56:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718322990; cv=pass; d=google.com; s=arc-20160816; b=aTZGQ46fiJOTOQ5khySraECmVz4W0oRwIaff88K+lVNEgur6P3VsY0RXGRBl/URQRO Aoxux+1fvjbMGxyl39YOsJ2YoCSTxhSm7qetEFGYgJ/4DZJUVauLizTHqmru5NgClWar tcghaMxhJ/wpekz5Umj6GK2LYIJgjooaIQDPKTEVUopM8/FStndCwfc7WTSSwEYVdC4+ sUI9B1wl0NZapEIbgsuOIx9QwczjAtonQqkXJA5nzy4XDdkebx3f+fnVCAc6ENWFBjzl Ydik9ZSqJc39B1kY8Jr/ugltR48W8UKlB0pbKT3k1MJUC355DuRy/v2ZdrjqZtiR01Qd aYAw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=i9+P6aM0WafHFZtcZkzYWhgrGfChAuQEe8ulPLYU4hs=; fh=EC3d9KFEtFtwHC75gn9vDiQJ6R5uIX5tpxVC9HbvAic=; b=dkN/TOLdn1npS/DM9IqLABo6+7H2q1mPlhsZ+P3sNuTbQuuiBtcUeQMwDlv1Z29BE1 AzW3OzvIK9lG8mps+ZXz4DcEktOwW3C5+xwRrGQoB10IRHDqRhRmmcVG3Qw8mMAnZfD6 DqOirx2kRtHp+7965e1PdLjmedBNFO+dLMHJZpXl2oudCBqvNAVM1ajUxllOPfFeQ7W9 YzjVInvempiVk6U9EoMsQmlz6saAjYIbaBy2vgoHJsUjtg6oVB6tLMDo23+AbeDWHoUK rEiIbl6WqUZbtMtInfPYKXUzFuqT9b6/QDd6wnQZPAtyyl8wrG+JsdOYGFchU4vczIah kU1A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XwPAzlx9; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-3797-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3797-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f855ecac59si20821105ad.207.2024.06.13.16.56.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 16:56:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3797-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XwPAzlx9; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-3797-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3797-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 874132849FA for ; Thu, 13 Jun 2024 23:56:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 32CAF14B95B; Thu, 13 Jun 2024 23:56:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XwPAzlx9" X-Original-To: linux-nfs@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 02D4C139D04; Thu, 13 Jun 2024 23:56:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718322986; cv=none; b=DzKeibNutbuc2o8PQCuniVBNrInxL639dTtFGhtYPVrgUMNcmWMlEowgBreQU0w9y1XUTqzTBqxB8ga7SQU/5RZsMRruruL6bjdBRWHSkdq8qBYylMhORTvdqZ4PCjqO1K+iu34z+oH5sfoY236GRIuovltkALR4Uhsp8w5FO5g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718322986; c=relaxed/simple; bh=wQDFflUnmobvjhJcXXTOXEm6xj6JxzdgpjMPzhngbpQ=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=SyQztAEze3amahDSpdpO974wGwp0mubnPCHQb7xrsMlC2Bsnp7P5eYSw9abIXlmC69EzlAmpMHpOEhdQLyrDLvAaIzhltRELfsus0MzOEwAM8wpeOu7flU2si6jErNitFwftbQ0S76sRWhJ8T2LTAI0yCenbv55jeqy7npiq5K8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XwPAzlx9; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8FDFC4AF1C; Thu, 13 Jun 2024 23:56:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718322985; bh=wQDFflUnmobvjhJcXXTOXEm6xj6JxzdgpjMPzhngbpQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=XwPAzlx9WTPjngjTcEgyxNeaI/IFID8fkdNiyTjLQfyQ5bGvMPJ/RC2R0FIEGVqob MwE9pXb/vaipH3c7T6ECtM7fn7Lpi6qyILAwNq2bIvlydhi+SUyWZSEnspiNbIbkRZ /00Xc4WYFPwNpgs5tqeVuvMXt2I3nv0UHIzAy479cEjUV0zJLpQllLIQ8Jbr+bZ7nG QA+k1qMoHVLMFSe4CFA6yeku0dkPbG7Tm6cClfTPcfj0ZDJnV5V7I/VbLF9ZaCHx50 zlc156wBM+oX3wO3LH0BGj/JqX/zgSxbSJW5qyPcY3bV83nAA84C4o/H+NyXaFB52h u24vE3OGn8qbg== Date: Thu, 13 Jun 2024 16:56:23 -0700 From: Jakub Kicinski To: Jeff Layton Cc: Chuck Lever , Neil Brown , Olga Kornievskaia , Dai Ngo , Tom Talpey , "David S. Miller" , Eric Dumazet , Paolo Abeni , Lorenzo Bianconi , Trond Myklebust , Anna Schumaker , linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH v3 5/5] nfsd: new netlink ops to get/set server pool_mode Message-ID: <20240613165623.2a5150e8@kernel.org> In-Reply-To: <20240613-nfsd-next-v3-5-3b51c3c2fc59@kernel.org> References: <20240613-nfsd-next-v3-0-3b51c3c2fc59@kernel.org> <20240613-nfsd-next-v3-5-3b51c3c2fc59@kernel.org> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 13 Jun 2024 14:34:34 -0400 Jeff Layton wrote: > + err = nla_put_string(skb, NFSD_A_POOL_MODE_MODE, buf) || > + nla_put_u32(skb, NFSD_A_POOL_MODE_NPOOLS, nfsd_nrpools(net)); bitwise or? Other option would be to move sunrpc_get_pool_mode() before allocation that way all error codes past allocations are EMSGSIZE and life is simpler.