From patchwork Mon Apr 10 16:08:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 9673155 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 C4E036020C for ; Mon, 10 Apr 2017 16:09:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ADFEE26AE3 for ; Mon, 10 Apr 2017 16:09:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A318D28179; Mon, 10 Apr 2017 16:09: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.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 9F61726AE3 for ; Mon, 10 Apr 2017 16:09:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751396AbdDJQIb (ORCPT ); Mon, 10 Apr 2017 12:08:31 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:33269 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752726AbdDJQI2 (ORCPT ); Mon, 10 Apr 2017 12:08:28 -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=tIo+sHM+El0oHftH0chmnPeFg aqTH3RxREcYIIu6k5d7m/Tyy0xykQe5pE5L2UXfxpGzgGQ7J9DJFsE91hmUUdVFrYM+b92b+TbB3g GpSHBT3ED0xUxvlrCeDWA8fucCrLSYKwXg1a+BnQzqNHpTd3KIVwADAczd3KhzJFgxr0Cw6IGtF8p NLg63jCjQ86oro8VqpmOHUkJHVpYMUB8wndHVgnt2fgnEyfxQJihw0rSt+iJGmXRwEfaCZ0GVIICM dj/FSD61YdjBGZWag4olidtmqf817vkt4BaAlox3pNIuRbs3SLu1q1FO9EBHTLsZexKOWxn7OqZUa t8CN3/SlA==; 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 1cxbrZ-0008NG-CT; Mon, 10 Apr 2017 16:08:21 +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: Mon, 10 Apr 2017 18:08:03 +0200 Message-Id: <20170410160807.23674-5-hch@lst.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170410160807.23674-1-hch@lst.de> References: <20170410160807.23674-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) {