From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CFD9C433ED for ; Wed, 12 May 2021 13:22:15 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E5340613D6 for ; Wed, 12 May 2021 13:22:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E5340613D6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kZ0zbhR2Ke6qQiPAhahJwUVmMTyKtUKp71lxq0mDV34=; b=Ejzcc6xBIMtQ7g6fuPSeMLU+H mpR68OHIL4xqP8v7jQ35Kg8erK7dzAG+iKMfRue+s3Ueq2DMSoSqJ/PbjExpk/amBW40anqva2vh1 kOlFvg0LV4QxdcJTdjDMNCmVOzDF9QaJZ/cf6xds2blaFq2EY3RSsO+UNNm3pSF5XaVaI3fsANMWV xcjl2mQvKr7mh2AfUHCuor8xyCEhDt/bP+mh4djbWc7s7BCFyazDw9BvMs453Gi4iYzqB6awFILQK mrQXqwJ+9vJbwTYKfY1EATqvsbPpdoVp6wKTOEuLMG74qRVUBMPd0D9zQ2Hc/fJL8Lq8g6Ea2nD3Z 1J8slKjyA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lgooQ-002shG-5P; Wed, 12 May 2021 13:22:06 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgoiv-002rej-Gi for linux-nvme@desiato.infradead.org; Wed, 12 May 2021 13:16:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=j5xtD4dLrWl+f8ewCxfPu2i9g8nlqr3jf+vNj4lOeX0=; b=FDhN3W1x7xreHa65JIpv0t50LY ONao9zLhnfupPdLaJq/H3p5AUIQc6sDrtMe2T3Gs0nJve58zevGXAYUFbdiH5SgV/l3PPvPd2D2rh KRK0O8CF6EtCd+YVac3PhUbcmKJW3hKruThCyoGj4SK32W/DklPMKS8wO72YJaDVZW0YKqfyRCx+B vSREj81ukE1xpJWs8wCoM3j4G7JSqHV78WWk2qNIteJ91HwEWBYb53pa7VYbsFQMxTmS88Epn8j6P cuMnkvV2WLYs1t6nfITvFj4t9dkeA7tFfSMdhiv1QDogpMNVou09lEgYqmgj7VL7oMLXc+pJoG+iH 3eqlM8BA==; Received: from [2001:4bb8:198:fbc8:1036:7ab9:f97a:adbc] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lgoit-00AO5G-Ke; Wed, 12 May 2021 13:16:24 +0000 From: Christoph Hellwig To: Jens Axboe Cc: Jeffle Xu , Ming Lei , Damien Le Moal , Keith Busch , Sagi Grimberg , "Wunderlich, Mark" , "Vasudevan, Anil" , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-nvme@lists.infradead.org Subject: [PATCH 13/15] block: don't allow writing to the poll queue attribute Date: Wed, 12 May 2021 15:15:43 +0200 Message-Id: <20210512131545.495160-14-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210512131545.495160-1-hch@lst.de> References: <20210512131545.495160-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org The poll attribute is a historic artefact from before when we had explicit poll queues that require driver specific configuration. Just print a warning when writing to the attribute. Signed-off-by: Christoph Hellwig --- block/blk-sysfs.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index f89e2fc3963b..f78e73ca6091 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -428,26 +428,11 @@ static ssize_t queue_poll_show(struct request_queue *q, char *page) static ssize_t queue_poll_store(struct request_queue *q, const char *page, size_t count) { - unsigned long poll_on; - ssize_t ret; - - if (!q->tag_set || q->tag_set->nr_maps <= HCTX_TYPE_POLL || - !q->tag_set->map[HCTX_TYPE_POLL].nr_queues) + if (!test_bit(QUEUE_FLAG_POLL, &q->queue_flags)) return -EINVAL; - - ret = queue_var_store(&poll_on, page, count); - if (ret < 0) - return ret; - - if (poll_on) { - blk_queue_flag_set(QUEUE_FLAG_POLL, q); - } else { - blk_mq_freeze_queue(q); - blk_queue_flag_clear(QUEUE_FLAG_POLL, q); - blk_mq_unfreeze_queue(q); - } - - return ret; + pr_info_ratelimited("writes to the poll attribute are ignored.\n"); + pr_info_ratelimited("please use driver specific parameters instead.\n"); + return count; } static ssize_t queue_io_timeout_show(struct request_queue *q, char *page) -- 2.30.2 _______________________________________________ Linux-nvme mailing list Linux-nvme@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-nvme