From patchwork Thu Apr 20 19:47:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 9691193 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 157886037F for ; Thu, 20 Apr 2017 19:47:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 07F861FF12 for ; Thu, 20 Apr 2017 19:47:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F06B223B24; Thu, 20 Apr 2017 19:47:09 +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 4106F1FF12 for ; Thu, 20 Apr 2017 19:47:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S947121AbdDTTrI (ORCPT ); Thu, 20 Apr 2017 15:47:08 -0400 Received: from mail-qt0-f196.google.com ([209.85.216.196]:33304 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S947094AbdDTTrE (ORCPT ); Thu, 20 Apr 2017 15:47:04 -0400 Received: by mail-qt0-f196.google.com with SMTP id c45so9060672qtb.0 for ; Thu, 20 Apr 2017 12:47:03 -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=e89E/LQUZ4awRdvLEtpJaQQKCWHJ4vk8ZWNA7n8BIYI=; b=knFmLD5ju2xAqTGRlZcwmJRs4EIPsNglmxf3W03JaULUt5iTC4i2TZfakSL+kJNGcz KQYXR4JvEH9KYCGiKdx4mpnqbUKprw96SOaHd9b/HLPXbFpFGLTApG3wABPKJJVpP7xR /hSoimNqk/kV2l9dCWnJdkZad9T1GGYSQAo33o7tigu8cSCGJsxBZ5lm/+sGyoLbktUd 80jDs+YhR7/f9x3dDZBmiEtUUD5wVOhCB3kjwghxmKtQ9YSYVl9ZgGUbHlDLQYHX6g2K BSSKoRrAPkW7dZF3J2akyrneZMP/v680Uv15efKKCNs4mtOaNcO1IPfZ/D0JVvqjFbmY RfXA== 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=e89E/LQUZ4awRdvLEtpJaQQKCWHJ4vk8ZWNA7n8BIYI=; b=YkuXEXAt2xZrEzOk2r0DZ5h7fMYPxZyDxDMPodVCZnnmX/zJ1fbp5Wa8CbwLM67kRn OGaGMIzKYbzi1ZcvU0ngLhMu0QvY8QfQYGuqcLbW8+eG4l/KLW3ErJSepukRBIDmNHEO EKjm0uNEg09OrViNjUe4fB+1gnIk3Kqyhl3UVT2PRpLtNsZfMVKz2n5a9k8VeTB8QgMo Hw09O8GTjJQCd5sAIK8AHfpzmhW0gs/MDU3tTaHxxJTPf6tu+wUcOfb0JdPg0w+mFXp7 mQvCiJeIGsWQ7y6SeKXCK9dIBBVmzFI5BkyvuDv0vriMFtLQTkaJnKpoVUc0xMzIsku6 2t/Q== X-Gm-Message-State: AN3rC/4TGjpZXtswsuR/aFqqrhJB5hJ+/8NWda5+OwnS2twU6pbqu8m/ fm6f3LEwtYuIYw== X-Received: by 10.200.55.86 with SMTP id p22mr9363644qtb.167.1492717623159; Thu, 20 Apr 2017 12:47:03 -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 n42sm4839603qta.17.2017.04.20.12.47.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Apr 2017 12:47:02 -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 segments to USHRT_MAX Date: Thu, 20 Apr 2017 15:47:01 -0400 Message-Id: <1492717621-9042-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 I lack the basic understanding of what segments mean, so we were being limited to 512kib requests even with higher max_sectors sizes set. Setting the maximum number of segments to unlimited allows us to actually have arbitrarily large IO's go through NBD. Signed-off-by: Josef Bacik --- drivers/block/nbd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 6e592c2..76e5f8f 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -1470,6 +1470,7 @@ static int nbd_dev_add(int index) 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_segments(disk->queue, USHRT_MAX); blk_queue_max_hw_sectors(disk->queue, 65536); disk->queue->limits.max_sectors = 256;