From patchwork Mon Apr 17 13:44:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 9683851 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 1024860375 for ; Mon, 17 Apr 2017 13:44:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0380926B39 for ; Mon, 17 Apr 2017 13:44:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EC71426E16; Mon, 17 Apr 2017 13:44:42 +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 6DEDE26BE9 for ; Mon, 17 Apr 2017 13:44:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751945AbdDQNol (ORCPT ); Mon, 17 Apr 2017 09:44:41 -0400 Received: from mail-qk0-f193.google.com ([209.85.220.193]:35946 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751874AbdDQNok (ORCPT ); Mon, 17 Apr 2017 09:44:40 -0400 Received: by mail-qk0-f193.google.com with SMTP id v75so19389996qkb.3 for ; Mon, 17 Apr 2017 06:44:39 -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=XuCKsg5Ra+peru2Q8u3qag64v65ztAxhAbiCDHtay64=; b=K7vsyQKXmQ4cTg0FAkxdHRCYcR01X76Rb30LOIPdz1CpmAJumbxMYQma25DRcgFjSP XrQTeHGwMOsOAwa2wPrTn1jl4yRS9TggbOjzq5Qh6TusShbmDp2CXpBLsvYrtF8ax9aW qM670O1fur6BgEjfdJF/0n6USBDzgUnY5CdkbSvFSfX/Ef07Jq8vu2x/AxawAGVmUm0a /E+1CLHzOrd2YEi95kkoafhfxnO0emHWBVUCV4XqLFnHP3OXyfvv1jNJbIUE5TLzTQeg 9aWAerebpW8DtmlRh47oSXyCqTILnMePfUfV2T3jDAg4XdsqABBDhqVDblJ46ZF+Ubt7 tBsg== 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=XuCKsg5Ra+peru2Q8u3qag64v65ztAxhAbiCDHtay64=; b=apHfYs+x8tXvWCoqLtaWy7O11SuIbN8uO7Mp2aFMni0YePNsS9f3U0noyzu2OX7QZ5 axvOFQY8pU994JhHKBBZM/xjUYwlmkgIuK9BGbw4cZe9G4aqbzWEE9VlVQqOyMwhB0jJ eeqK8GRVGDD5xxvc58ud4ynQguSWVZQQzMrl/sPxyhHGO0AHHP1Fuw5hpLDl/XTNixmU 0VOtLeppPmG5OKsvw31asiFiSKILARu7u3gQt6Q902PB/RA0/vSYarfYRrX0yq4Ht8aJ eFIjgkaWEDmkRl6udg4+Kdht5ACZ8WGWj0aAiCn9isPfKp6WlVCWePlRf9RpNxzMH8jK fx9A== X-Gm-Message-State: AN3rC/6Yb+j3MekcXuy8WrVaLBvCInYaHuhketixGFeX1wjtzyBdXEIy sbIePO+JmMI0cQ== X-Received: by 10.55.131.2 with SMTP id f2mr9706921qkd.227.1492436679203; Mon, 17 Apr 2017 06:44:39 -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 f80sm7238616qkh.30.2017.04.17.06.44.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Apr 2017 06:44:38 -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: Mon, 17 Apr 2017 09:44:37 -0400 Message-Id: <1492436677-11209-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 --- drivers/block/nbd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index d220045..0f62d86 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -1469,6 +1469,8 @@ 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); + disk->queue->limits.discard_zeroes_data = 0; blk_queue_max_hw_sectors(disk->queue, 65536); disk->queue->limits.max_sectors = 256;