From patchwork Tue Apr 5 11:56:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 8750621 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 913DDC0553 for ; Tue, 5 Apr 2016 12:06:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5CB3A20109 for ; Tue, 5 Apr 2016 12:06:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8E8F7200ED for ; Tue, 5 Apr 2016 12:06:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932806AbcDEMGQ (ORCPT ); Tue, 5 Apr 2016 08:06:16 -0400 Received: from mail-pa0-f67.google.com ([209.85.220.67]:33937 "EHLO mail-pa0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758255AbcDEMAL (ORCPT ); Tue, 5 Apr 2016 08:00:11 -0400 Received: by mail-pa0-f67.google.com with SMTP id hb4so1124841pac.1; Tue, 05 Apr 2016 05:00:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jOtLPR8a9F7RT3Nw1y3KY/MSmSUsvVcq37YuHgrt7Ow=; b=d70drZqeStPOmySbUezVM5anWp5ku86iv7XB1QK0sWcUmnlbFK+6mOiVr9xmMvGPD3 fA9tZQL++KLDk9PqHXbBzWry2DzRrTywrxDH9awzjUD81Vp75z5Rd3Tg5xStlm5GetGa 09IInVw0viZUTuY+7LHJqqtrFhJM7QFJt47CuZFd4FzpEzo2zdWJ1gKeOYHqdPDnoRao 5oaSBTfBzGT3h55dDSHGQDQg8ZA98M88rQUcMYZ2PX7EViURrP9B8EzrynboIDk3XbNd Vw1sYMCZZq6wo4ipY7CLkKgqevYp7FS5OU/BTE1EL7RYFYrmUAqDw5D79+2JF98mVJpl 2VKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jOtLPR8a9F7RT3Nw1y3KY/MSmSUsvVcq37YuHgrt7Ow=; b=fa04MncL0GP56gwYMEXgkpcy4Ved5dsTwo7zLQToE07eolhBvVwbaQpxmYo7MKInPC 12TOzh8V6ly6RdOH1biiO3Mdsl0BE5fu6WxPqYXEUz7CiBJ2KT6JAl9hBhQseo4wgBgf T3PhHpvHVmfuks1Fk9zQbDht7fEbbNK1MtDgMlUGaL0KaBy+HlK0x5qHnrvWrx8aF1mI Z2i8RQyCQ6hIOmbSY0sCbPQbh5P8ANoLfHyb9TZ5sh74jZ3UW097YdtpfE0N1fZHDjJ0 MPQDuCEiwATrVNHlmZuUnlhFslLMxao8CJTLe+jk0/wtktP4KpOGbZ2ZEbNTD4yatQVO KnYA== X-Gm-Message-State: AD7BkJKm/O+UvoWBlRFNVZP+ERmYAtLN5HUQOpx3X9VegGRsLqM7O3rV67LajjK7mGFtpA== X-Received: by 10.66.235.129 with SMTP id um1mr61116444pac.17.1459857610673; Tue, 05 Apr 2016 05:00:10 -0700 (PDT) Received: from localhost (56.34.213.162.lcy-01.canonistack.canonical.com. [162.213.34.56]) by smtp.gmail.com with ESMTPSA id l14sm46500052pfi.23.2016.04.05.05.00.08 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 05 Apr 2016 05:00:09 -0700 (PDT) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Boaz Harrosh , Ming Lei , "Nicholas A. Bellinger" , linux-scsi@vger.kernel.org (open list:TARGET SUBSYSTEM), target-devel@vger.kernel.org (open list:TARGET SUBSYSTEM) Subject: [PATCH 09/27] target: use bio_is_full() Date: Tue, 5 Apr 2016 19:56:54 +0800 Message-Id: <1459857443-20611-10-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1459857443-20611-1-git-send-email-tom.leiming@gmail.com> References: <1459857443-20611-1-git-send-email-tom.leiming@gmail.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Ming Lei --- drivers/target/target_core_pscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c index de18790..24906c3 100644 --- a/drivers/target/target_core_pscsi.c +++ b/drivers/target/target_core_pscsi.c @@ -951,7 +951,7 @@ pscsi_map_sg(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents, pr_debug("PSCSI: bio->bi_vcnt: %d nr_vecs: %d\n", bio->bi_vcnt, nr_vecs); - if (bio->bi_vcnt > nr_vecs) { + if (bio_is_full(bio)) { pr_debug("PSCSI: Reached bio->bi_vcnt max:" " %d i: %d bio: %p, allocating another" " bio\n", bio->bi_vcnt, i, bio);