Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp901652pxp; Wed, 16 Mar 2022 20:41:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbZn6v4KQIxNZwR+mkPU0n7nDfZphXu+kXqU5Z9749XVhbADsWk+t8FL1GAACrrFmxKRvv X-Received: by 2002:a17:90a:7f92:b0:1bc:f09:59 with SMTP id m18-20020a17090a7f9200b001bc0f090059mr13790940pjl.98.1647488477364; Wed, 16 Mar 2022 20:41:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647488477; cv=none; d=google.com; s=arc-20160816; b=aE3IRzHOhtJpCQyCrtkjzITr7sCdYv4JgEIcIr9pIBCXuhvSWo3elPid4IW7K16oAD UGXI4hxMlZqD0R/mf/qK34/kl7JZDHmUyY7pPvV4PTltD85A9UWAw73utKmKncJY6gHb ZbtwMOeWljEPQYznKue1knaOAvL67hEVtIj/jgRRlZuZpjJZpcgs+D/sy6G6UB0Eplwn hFf1gMzlANjSbbc981UnNnEI+QP8zLT96FKvaNmPXwxlGZjPh5MIdgb0JKIm39Zal1JO fhoGTsuHXDU1Uwz6JTnr6sMnlPZ3K6ngZLIjdl3Slyl9iOiTcY9Z5urZn5ID8dgON2ux XqzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=jR+mNzXzu8eZdMh4liARjUPmv7YRmMuKRYUGBTgeCrg=; b=BDyKAzbvifHRK+SNMKc+8K34x51bnZepElmJ7H38G1NeMghLlhU/nioVd4E0LnEVgo B4bd1ZC1DJ8ehpYLJlAdxjN+jxynBOfTfx250n9Zh4ZipF6si7ralBCa6cAAf17gbF/g js1szAgU+EmIH51dg48pS1IqaCnm4bIZlfJotAwkFZB3ZWm/8CjnloSizAdAqRoPYw+m en9gC5Pqauc+k3hhNZnw9BlP642ecir+ma2PlHWrm+u8Xzz+6yQaZbyKgzAhN0oBa/hR fC2X8eaVgKbcrC5+Bg+tUfkS/2vsSOgRXqiqzP+3Z/kBmYwto4D69dMHNC6+2yrnWfCh /DOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q26-20020a63505a000000b003816043f09bsi881417pgl.656.2022.03.16.20.41.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 20:41:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9440D5F276; Wed, 16 Mar 2022 20:34:15 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356768AbiCPOam (ORCPT + 99 others); Wed, 16 Mar 2022 10:30:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356540AbiCPOak (ORCPT ); Wed, 16 Mar 2022 10:30:40 -0400 Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6155B43ED0; Wed, 16 Mar 2022 07:29:26 -0700 (PDT) Received: by mail-pf1-f179.google.com with SMTP id z16so4114082pfh.3; Wed, 16 Mar 2022 07:29:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=jR+mNzXzu8eZdMh4liARjUPmv7YRmMuKRYUGBTgeCrg=; b=SA05BNLCEaji8Hp7RO1NC5ePnLRftnibf90c7GOUuSg8fVabL24z3aB+u/wtRKtXiw lqEZ3UhOJaeuhxQ/Mkb6ifzqn11RT5AhYIMu0Sk/usUwjqSF54DrFWDN+S0iyNyeGkzO 3VbR8XhDItXTSUg6LvFYDx5wFkF1n1rzeZ1CrAvhriB0w51MPwyYFZuOSQ7e43VkzspO SoOoj8Z65KiqOh5hnygb+Orh8Qhvlsr870JS4Qyv3paWuDGaiegPVU432tJkqnrd99Ra oceE0ohwAdH3pZyKATkIOyLwe57jKwT/foN/w17A54v56W2UqoT134nGNzxwj7k5CXGI 1cAA== X-Gm-Message-State: AOAM532dzz9zn3Nt0JfqqAM544FWgDsuwOYyyA9z5T9iJ4y8ty6WxwEV Djihn3KVBZc+gZrntYJ0QxY= X-Received: by 2002:a63:4e14:0:b0:374:4a37:4966 with SMTP id c20-20020a634e14000000b003744a374966mr28096671pgb.118.1647440965707; Wed, 16 Mar 2022 07:29:25 -0700 (PDT) Received: from ?IPV6:2601:647:4000:d7:feaa:14ff:fe9d:6dbd? ([2601:647:4000:d7:feaa:14ff:fe9d:6dbd]) by smtp.gmail.com with ESMTPSA id f30-20020a63755e000000b00381f6b7ef30sm1619222pgn.54.2022.03.16.07.29.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Mar 2022 07:29:25 -0700 (PDT) Message-ID: Date: Wed, 16 Mar 2022 07:29:23 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v2] scsi: core: Fix sbitmap depth in scsi_realloc_sdev_budget_map() Content-Language: en-US To: John Garry , jejb@linux.ibm.com, martin.petersen@oracle.com Cc: damien.lemoal@opensource.wdc.com, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, martin.wilck@suse.com, ming.lei@redhat.com, hch@lst.de, hare@suse.de References: <1647423870-143867-1-git-send-email-john.garry@huawei.com> From: Bart Van Assche In-Reply-To: <1647423870-143867-1-git-send-email-john.garry@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/16/22 02:44, John Garry wrote: > In commit edb854a3680b ("scsi: core: Reallocate device's budget map on > queue depth change"), the sbitmap for the device budget map may be > reallocated after the slave device depth is configured. > > When the sbitmap is reallocated we use the result from > scsi_device_max_queue_depth() for the sbitmap size, but don't resize to > match the actual device queue depth. > > Fix by resizing the sbitmap after reallocating the budget sbitmap. We do > this instead of init'ing the sbitmap to the device queue depth as the user > may want to change the queue depth later via sysfs or other. Reviewed-by: Bart Van Assche