From patchwork Wed Apr 12 08:48:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 9676843 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 E112A60384 for ; Wed, 12 Apr 2017 08:48:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D542C28598 for ; Wed, 12 Apr 2017 08:48:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D41F52859F; Wed, 12 Apr 2017 08:48:40 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable 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 81E24285B3 for ; Wed, 12 Apr 2017 08:48:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753646AbdDLIsa (ORCPT ); Wed, 12 Apr 2017 04:48:30 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:42276 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753627AbdDLIsZ (ORCPT ); Wed, 12 Apr 2017 04:48:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=G+99Wam8z4646WiaWGob2cEKpfPVcLq7578Q8JfTq1Q=; b=K5YOP4LoL94dI049WWc9Fw4Ll SB4EEZ9gomJbG/VpAmP5LivbeisBx59HB+gDkuDSxdH5UKByaDvAaSrfDhsMU4ZW94sFsg6R8y/vy EGtqkFHqG4ePrTlfRqTGbvW5r3j/iVKIw/UBoDsvWfaE6S6TE1YLmFw27qR9KpjTCFoVp8L9RwQRd Cdum+DHUyZzRKnQL0XgiVm2doYn/XK3AogofRoGFYe9//HqZX9vZ7VAEbpr6w8hAbSAtW6cfRmVHl +Bd58RauP7Jj9UG3MMAMoyhtbfC87mbjdWbV+GH573+jDAemtCQ4W8MkvczDF14xTQdaZBXWyZp0F P1en1wZjw==; Received: from clnet-p099-196.ikbnet.co.at ([83.175.99.196] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.87 #1 (Red Hat Linux)) id 1cyDwu-0007We-55; Wed, 12 Apr 2017 08:48:24 +0000 From: Christoph Hellwig To: axboe@kernel.dk, martin.petersen@oracle.com, philipp.reisner@linbit.com, lars.ellenberg@linbit.com, target-devel@vger.kernel.org Cc: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, drbd-dev@lists.linbit.com, dm-devel@redhat.com Subject: [PATCH 4/8] md: drop WRITE_SAME support Date: Wed, 12 Apr 2017 10:48:05 +0200 Message-Id: <20170412084809.8245-5-hch@lst.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170412084809.8245-1-hch@lst.de> References: <20170412084809.8245-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Christoph Hellwig --- drivers/md/linear.c | 1 - drivers/md/md.h | 7 ------- drivers/md/multipath.c | 1 - drivers/md/raid0.c | 2 -- drivers/md/raid1.c | 4 +--- drivers/md/raid10.c | 1 - drivers/md/raid5.c | 1 - 7 files changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/md/linear.c b/drivers/md/linear.c index 377a8a3672e3..da363f5d54b0 100644 --- a/drivers/md/linear.c +++ b/drivers/md/linear.c @@ -292,7 +292,6 @@ static void linear_make_request(struct mddev *mddev, struct bio *bio) trace_block_bio_remap(bdev_get_queue(split->bi_bdev), split, disk_devt(mddev->gendisk), bio_sector); - mddev_check_writesame(mddev, split); mddev_check_write_zeroes(mddev, split); generic_make_request(split); } diff --git a/drivers/md/md.h b/drivers/md/md.h index 1e76d64ce180..d82b11b5ae5a 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h @@ -703,13 +703,6 @@ static inline void mddev_clear_unsupported_flags(struct mddev *mddev, mddev->flags &= ~unsupported_flags; } -static inline void mddev_check_writesame(struct mddev *mddev, struct bio *bio) -{ - if (bio_op(bio) == REQ_OP_WRITE_SAME && - !bdev_get_queue(bio->bi_bdev)->limits.max_write_same_sectors) - mddev->queue->limits.max_write_same_sectors = 0; -} - static inline void mddev_check_write_zeroes(struct mddev *mddev, struct bio *bio) { if (bio_op(bio) == REQ_OP_WRITE_ZEROES && diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c index e95d521d93e9..68d67a404aab 100644 --- a/drivers/md/multipath.c +++ b/drivers/md/multipath.c @@ -138,7 +138,6 @@ static void multipath_make_request(struct mddev *mddev, struct bio * bio) mp_bh->bio.bi_opf |= REQ_FAILFAST_TRANSPORT; mp_bh->bio.bi_end_io = multipath_end_request; mp_bh->bio.bi_private = mp_bh; - mddev_check_writesame(mddev, &mp_bh->bio); mddev_check_write_zeroes(mddev, &mp_bh->bio); generic_make_request(&mp_bh->bio); return; diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index ce7a6a56cf73..c094749c11e5 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c @@ -382,7 +382,6 @@ static int raid0_run(struct mddev *mddev) bool discard_supported = false; blk_queue_max_hw_sectors(mddev->queue, mddev->chunk_sectors); - blk_queue_max_write_same_sectors(mddev->queue, mddev->chunk_sectors); blk_queue_max_write_zeroes_sectors(mddev->queue, mddev->chunk_sectors); blk_queue_max_discard_sectors(mddev->queue, mddev->chunk_sectors); @@ -504,7 +503,6 @@ static void raid0_make_request(struct mddev *mddev, struct bio *bio) trace_block_bio_remap(bdev_get_queue(split->bi_bdev), split, disk_devt(mddev->gendisk), bio_sector); - mddev_check_writesame(mddev, split); mddev_check_write_zeroes(mddev, split); generic_make_request(split); } diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index b59cc100320a..ac9ef686e625 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -3177,10 +3177,8 @@ static int raid1_run(struct mddev *mddev) if (IS_ERR(conf)) return PTR_ERR(conf); - if (mddev->queue) { - blk_queue_max_write_same_sectors(mddev->queue, 0); + if (mddev->queue) blk_queue_max_write_zeroes_sectors(mddev->queue, 0); - } rdev_for_each(rdev, mddev) { if (!mddev->gendisk) diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 28ec3a93acee..79988908f862 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -3748,7 +3748,6 @@ static int raid10_run(struct mddev *mddev) if (mddev->queue) { blk_queue_max_discard_sectors(mddev->queue, mddev->chunk_sectors); - blk_queue_max_write_same_sectors(mddev->queue, 0); blk_queue_max_write_zeroes_sectors(mddev->queue, 0); blk_queue_io_min(mddev->queue, chunk_size); if (conf->geo.raid_disks % conf->geo.near_copies) diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 2efdb0d67460..04fd6a946825 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -7262,7 +7262,6 @@ static int raid5_run(struct mddev *mddev) blk_queue_max_discard_sectors(mddev->queue, 0xfffe * STRIPE_SECTORS); - blk_queue_max_write_same_sectors(mddev->queue, 0); blk_queue_max_write_zeroes_sectors(mddev->queue, 0); rdev_for_each(rdev, mddev) {