Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2627412rwb; Wed, 30 Nov 2022 08:51:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf6QLTYDLKEh6gqoL0DxBRKROJ5Dv08mTXXToky2MwyhphutbF3sGEt0zkVHchU9EYW6Mw7t X-Received: by 2002:a17:90a:d3ce:b0:218:7a66:64b9 with SMTP id d14-20020a17090ad3ce00b002187a6664b9mr62502481pjw.85.1669827109388; Wed, 30 Nov 2022 08:51:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669827109; cv=none; d=google.com; s=arc-20160816; b=t7D3jYVqaVmu7/ZNv+E3KaAHC8yPHgkxsZdSIZhaRy5knKFbzBMxqrGgRiwuUSNh+a BsQWnVfeg8sKkht/Vhvo7azmQmkqn/ufZxOwkgFs9Ubm9izAN7nXD4Gfei1MZ1MAOmFo Gvvs9719TMxf/0fWCoMPGaLAfFMho/jGMmkP9JmBvvTrji+ic4p9rVyzCOZVlPqGU4C9 xjMK2q1lQHzNGOhK5lHO9fZEfYyXCfFSeeE4Ryf2N99A2teomudr8BiELRp+vjQ8uzgn fsbC++iijtcfxezSGoSgxSik38IeKVn5j4gCS/eUhc/ifMwwfwH8vbPd/PkUC05JszsF URBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=33yVl81nf/HYwbFyHP95flgen3w7k+7heZeCstu2Zt8=; b=tO1gLJ4kbRjzQXQhAdy9tU3uJ6d7oSuOIg60glrcdkVsFl+CJTIfoD7l+OtKOGvhJ3 0VYcKJ/eMSNDtbwmXYzBQB82v7WvcMiZtphOhpALCRjhUZKuaF6+Ms+IPjbt98AYwTg8 iD/MzlZPLLkZSQhKRzmsbSZxfPJlzr/wIVYVeEy0Oryh7w6Nqc+17qafJsIx+B7zqTcl qhOmpZBfjdAKApMRV+FjYeH/xe3hba4R9zppBlmzi+D5NiM+MCI0Fsq72TFrrJeceJci 6h7dnx4IjOs5Qlfz36fWKEDiMusxF36FgaKIOJ6YfFD6bali2K3V0r1vHNm4EyUNERgL P64g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=1JXfUuCk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bp17-20020a17090b0c1100b0021949ab4eefsi4499159pjb.65.2022.11.30.08.51.37; Wed, 30 Nov 2022 08:51:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=1JXfUuCk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230083AbiK3Pz0 (ORCPT + 83 others); Wed, 30 Nov 2022 10:55:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229981AbiK3PzT (ORCPT ); Wed, 30 Nov 2022 10:55:19 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2412984DDD; Wed, 30 Nov 2022 07:55:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=33yVl81nf/HYwbFyHP95flgen3w7k+7heZeCstu2Zt8=; b=1JXfUuCkqNVgQ9pH2hx3JGBJa1 xGiCfys6fwNZUG6n/MUJVc83nSq085NlVLhdf5uUF8wSWS83HRjoBdnjR0f8pvmWEUMzJUlUUralz /Mq8A3ixnlv5DbHvj5ESqNZ5E+8/IzFurjAWffK8dQvzlxR1D5Equrh3itxNAd7ePbNiJNcS/qeu7 HrSLXwHiOPcz+jb94A+bycyePIavkHCJqRnL7hJ1cSCtaMa5Q3P+aGyIiCh+MDagen1YVKdR6rJOq LMbCRWF2ZTNYYERjWEv3O6lP7ZDehAGMls52ZBXAbtV2CB3eJHC1zpFG1duRiOh+RRuOE4bhcxg/O Fva1+w3w==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1p0PQJ-0009qC-N1; Wed, 30 Nov 2022 15:54:59 +0000 Date: Wed, 30 Nov 2022 07:54:59 -0800 From: Christoph Hellwig To: Li Nan Cc: tj@kernel.org, josef@toxicpanda.com, axboe@kernel.dk, cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, yukuai3@huawei.com, yi.zhang@huawei.com Subject: Re: [PATCH -next v2 1/9] blk-iocost: cleanup ioc_qos_write() and ioc_cost_model_write() Message-ID: References: <20221130132156.2836184-1-linan122@huawei.com> <20221130132156.2836184-2-linan122@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221130132156.2836184-2-linan122@huawei.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham 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 > + ret = nbytes; ret is an int which bytes is a size_t. So we at least need a ssize_t instead for ret, and even that assumes nbytes never overflows a ssize_t.