Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1299504pxu; Thu, 17 Dec 2020 06:59:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJzEkLOf2aXdQYCezmnUsW6J6tJo1sdEKEdHhijqPKIRn50H9iDn12K8ejERtvYt6PcUAQqn X-Received: by 2002:a17:906:a8e:: with SMTP id y14mr34806402ejf.47.1608217166793; Thu, 17 Dec 2020 06:59:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608217166; cv=none; d=google.com; s=arc-20160816; b=0FvyhwMHM2f+bYaLx2xak0omRX5kuZinEcbak04SFYh5k/kTy0KZM5ayd4mb2RrKyj M9I6kYNG2GKJ205A4xU5H1reoh7FEcbFvqlzwVUgcDEqeXJME3fIcukPruKCly0QSGOv bJwqziX7+C7GPq6BLAGsYpKdq5YE/JfFPLoWhOWpNF1epnO6nQwICggCIKnuUopK5d05 SPOwI8wiiG013DZYMQ0GsSIrtM5lbDHOfR/RSlqQl06QE7jwtZ4jJMUZgIqIQtApi64m w2OY3OQZiVYQ+cWESGtCWACLsDj+8A8IB1riJppoKS67R/pdl18HEtb859KNN6HrAAWX 8GgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=AppbOyrBaJen3npr6us/u+3s8pRHAJIQTjC/7eMkWrY=; b=iNFgiHhWt0PeGehStRKE1lq2PSGOySig3DIVoYGJWhmdrzRYSV+mZsSzWO8KP6DKiR UWDhPCP7G1/KUzFu76N1KKAC7uspjJDZ7UGjTlHDNz0QJo4W1r6lDE+Q2vb2fhojPJ8X VMwe6xamt7HFzjgIJvpm72iZE15bGgpHEsRUpog7BvhJp0IYioUoS2FsgXEFdBr/fYLC ooD9JA9HvypxknXkRI4FoCWkMz2b821hTcisidLd1gvSDc+rb7Cv6dx0U66X/9SOOcyW cxQrOkiYVQEkVKYyANUOw3lf+779Q3rwkt7br9xr0vFjjkeDPKvBjSBkq7Y/WFHhW+kF Tpyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=qIsNU8MN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mb3si2681677ejb.126.2020.12.17.06.59.03; Thu, 17 Dec 2020 06:59:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=qIsNU8MN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725930AbgLQOzt (ORCPT + 99 others); Thu, 17 Dec 2020 09:55:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726291AbgLQOzt (ORCPT ); Thu, 17 Dec 2020 09:55:49 -0500 Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19267C0617B0 for ; Thu, 17 Dec 2020 06:55:09 -0800 (PST) Received: by mail-io1-xd2e.google.com with SMTP id w18so13903570iot.0 for ; Thu, 17 Dec 2020 06:55:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=AppbOyrBaJen3npr6us/u+3s8pRHAJIQTjC/7eMkWrY=; b=qIsNU8MNaXfORjHakfIhVA6M0I+jhauT8ujQjdTh9pltOmusTdjtS6vAZtGFqUKa+h 1djBuHsK4XxRHHLJzWI3bGidYfLa3CWko/3FVyNpI3oJJYnYAVLWJBKKhi3VfLGOs7dX W1X16QmHGd/vEu/IxDQxMe5iJvYn1J/20qdKaMkr/uFQe1EDwdejrAd911mA6PbqjulD PwkyKPXO0j4zqejFvZzCV51KA5NnIcxg87o90ufkWZY8neAizIwC0A8kiIdXUb/QGyGo MEmaiaZzG/uVrv4jVgLnAQ8QYEJYDHAUzeoVUvCp4fNKcqWiBLD1fxGUdXNsbjG0Keqx ZY5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=AppbOyrBaJen3npr6us/u+3s8pRHAJIQTjC/7eMkWrY=; b=CtVrNjj4nm5PlJCXMMkERExil4WTLqKqY6WsaL1K/TXOKNs11tpDNRC7S7CwmZnuyZ dHpD7Q691kEWvVprcorsQbYgGM1a5Eu9NegukqDLSiymALB9sNSeQHob6+gAxCRcxvgJ kT01PLqEaWSlvtrGO/p3jlwP1febFH2pZ3gcXzfHs8qhLoJU9urt7g3RWWQDtnzAwHO/ BZ7j98Jb64glD+GwUinpt3OkipV2Nqql8p1BXdL9eqzFlu3RAaJmH+DICXx7RM+RoIe2 pi6MOm19lSbs+BBHGV1k+E3Ug4D/HOX7Oua0DtZvSf+VMR9AOoE92IO40PjRqLKqJPcQ 496Q== X-Gm-Message-State: AOAM530bxUr7wxfcOUfnxtukcU9V5eJUviCgiONNywVgTcJKeolbaEA+ nkHOwHOtRa4J36wDItf3oN4wguQDa2wgaw== X-Received: by 2002:a05:6602:2e81:: with SMTP id m1mr45693684iow.131.1608216908061; Thu, 17 Dec 2020 06:55:08 -0800 (PST) Received: from [192.168.1.30] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id p11sm1762461ilb.13.2020.12.17.06.55.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Dec 2020 06:55:07 -0800 (PST) Subject: Re: [PATCH] nbd: Respect max_part for all partition scans To: Josh Triplett , Josef Bacik Cc: linux-block@vger.kernel.org, nbd@other.debian.org, linux-kernel@vger.kernel.org References: <86d03378210ddac44eb07ebb78c9b0f32c56fe96.1608195087.git.josh@joshtriplett.org> From: Jens Axboe Message-ID: <2a3c0b4b-52d0-b4e0-182e-c15f2a80d348@kernel.dk> Date: Thu, 17 Dec 2020 07:55:08 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <86d03378210ddac44eb07ebb78c9b0f32c56fe96.1608195087.git.josh@joshtriplett.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/17/20 1:58 AM, Josh Triplett wrote: > The creation path of the NBD device respects max_part and only scans for > partitions if max_part is not 0. However, some other code paths ignore > max_part, and unconditionally scan for partitions. Add a check for > max_part on each partition scan. Applied, thanks. -- Jens Axboe