From patchwork Tue Apr 18 20:22:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 9686229 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3F9FA602C2 for ; Tue, 18 Apr 2017 20:22:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2EC9E283A6 for ; Tue, 18 Apr 2017 20:22:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 20B71283F1; Tue, 18 Apr 2017 20:22:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A7BEA283A6 for ; Tue, 18 Apr 2017 20:22:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756449AbdDRUWy (ORCPT ); Tue, 18 Apr 2017 16:22:54 -0400 Received: from mail-yb0-f194.google.com ([209.85.213.194]:33340 "EHLO mail-yb0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754663AbdDRUWx (ORCPT ); Tue, 18 Apr 2017 16:22:53 -0400 Received: by mail-yb0-f194.google.com with SMTP id 206so162774ybe.0 for ; Tue, 18 Apr 2017 13:22:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=9qdqFn7cCEAeGpOt5Zozkh24Lc9EshnUNcytasJL4MQ=; b=Twb4x9LUZFilmRY/gdm8Rj69eZIrgJom1wi4xrnlDh18zSj1yHHOLW3uLmMO6achaE J2XERalY8MhyrSpxbuGphnGLLX1resDKuSnpNco/iOZT9fcv60xlMImnHjg4ia5zfU/h FR37+lzIaPkMEhlHdHMd+a4TfJSr8Avuazt+2bFs9X5X/W1KmP1ga1qMMKHdebXg5Ozg kYyBknnmJu4oboLe3YlXk8OJpCW3HKT7hlXIdHYXeieRconiPyTssQWaayIdrgqjX2F9 hB4PDzLjCerzaE+kjrupagmoeUDF6m39hTWrC4kD7lbqmoMsa1qmJ/RRXEtJGPNz6AJY kmjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=9qdqFn7cCEAeGpOt5Zozkh24Lc9EshnUNcytasJL4MQ=; b=mbEqdBDagIkW8333eFOstVMq0AUiaeLYVoXb4jWadIOrQuRk5h3ZhWYJKeIeiiwnny iFASz9CVEHLdhQeGNs+ezdRPN1pBc1Coy8ikR4GKBObyj/b1nnKBSXo+OAMzY0npeHQW YLwAwwp7ZevDtFe9z+hYcdwr8XNMsjf4xr7DKm/apo7kZ00Op0qSGB+pKPwioRz74lFq Kl96WjsBDvxVZfQo9o73aCy67l4T2lIFWrANTMrxXvVeL3FfcQGTW2HBQKB+cs2siYiL ySuIt58AkT8VxMHB9GxTnkTcctRiSh1BeHgej31WpqGv8Dodi4ZMRAZz4iRN9cXBaj/m 8uaw== X-Gm-Message-State: AN3rC/5XxXt2nTsrnshGUxHnPwC/DF4jdHfNZBVSHlYr/h3PG6M1tDRs I6Yt2HaoIEs6bA== X-Received: by 10.37.57.87 with SMTP id g84mr20515594yba.53.1492546972663; Tue, 18 Apr 2017 13:22:52 -0700 (PDT) Received: from localhost (cpe-2606-A000-4381-1201-225-22FF-FEB3-E51A.dyn6.twc.com. [2606:a000:4381:1201:225:22ff:feb3:e51a]) by smtp.gmail.com with ESMTPSA id o10sm90806ywb.39.2017.04.18.13.22.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Apr 2017 13:22:52 -0700 (PDT) From: Josef Bacik X-Google-Original-From: Josef Bacik To: axboe@kernel.dk, nbd-general@lists.sourceforge.net, linux-block@vger.kernel.org, kernel-team@fb.com Subject: [PATCH] nbd: set the max segment size to UINT_MAX Date: Tue, 18 Apr 2017 16:22:51 -0400 Message-Id: <1492546971-2682-1-git-send-email-jbacik@fb.com> X-Mailer: git-send-email 2.7.4 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP NBD doesn't care about limiting the segment size, let the user push the largest bio's they want. This allows us to control the request size solely through max_sectors_kb. Signed-off-by: Josef Bacik Reviewed-by: Ming Lei --- drivers/block/nbd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index b78f23c..6e592c2 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -1469,6 +1469,7 @@ static int nbd_dev_add(int index) queue_flag_clear_unlocked(QUEUE_FLAG_ADD_RANDOM, disk->queue); disk->queue->limits.discard_granularity = 512; blk_queue_max_discard_sectors(disk->queue, UINT_MAX); + blk_queue_max_segment_size(disk->queue, UINT_MAX); blk_queue_max_hw_sectors(disk->queue, 65536); disk->queue->limits.max_sectors = 256;