From patchwork Wed Sep 28 05:21:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan McGee X-Patchwork-Id: 116695 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 85E21B6F7F for ; Wed, 28 Sep 2011 15:22:19 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1R8mam-0000Wq-T7; Wed, 28 Sep 2011 05:22:01 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1R8mam-0000Vn-Fg; Wed, 28 Sep 2011 05:22:00 +0000 Received: from mail-gy0-f177.google.com ([209.85.160.177]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1R8mak-0000VU-Fw for linux-mtd@lists.infradead.org; Wed, 28 Sep 2011 05:21:59 +0000 Received: by gyg13 with SMTP id 13so7119794gyg.36 for ; Tue, 27 Sep 2011 22:21:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=a7zlKyssCeXXCPdX89l9bNovZNsXpfMty5yD1CI+D6Y=; b=AP0YvBpgylgJJmo5wathQBQMwMsw62LiScXpBS5FEftpP/wBi0lMmNr+BzMWsf5EpA T36zPb54TDx3yLITQZv9o8zYBdkFtcMYTQDjUBmPrG4bquJJcAQEm+Zim3US9ntIPOFQ 8qd6TafsURmz3J9m7segFn+vX6kROk4EFgEik= Received: by 10.236.157.229 with SMTP id o65mr11959266yhk.73.1317187316134; Tue, 27 Sep 2011 22:21:56 -0700 (PDT) Received: from localhost (c-71-194-41-240.hsd1.il.comcast.net. [71.194.41.240]) by mx.google.com with ESMTPS id u45sm36937121yhh.8.2011.09.27.22.21.54 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 27 Sep 2011 22:21:55 -0700 (PDT) From: Dan McGee To: linux-mtd@lists.infradead.org Subject: [PATCH] mtd: mark block device queue as non-rotational Date: Wed, 28 Sep 2011 00:21:42 -0500 Message-Id: <1317187302-13380-1-git-send-email-dpmcgee@gmail.com> X-Mailer: git-send-email 1.7.6.4 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110928_012158_679727_EF7209C0 X-CRM114-Status: GOOD ( 11.31 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.177 listed in list.dnswl.org] 0.6 HK_RANDOM_ENVFROM Envelope sender username looks random 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dpmcgee[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service Cc: David Woodhouse , linux-kernel@vger.kernel.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This is similar to what the nbd driver does, among others. Signed-off-by: Dan McGee --- drivers/mtd/mtd_blkdevs.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c index ca38569..ed8b5e7 100644 --- a/drivers/mtd/mtd_blkdevs.c +++ b/drivers/mtd/mtd_blkdevs.c @@ -426,6 +426,8 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new) new->rq->queuedata = new; blk_queue_logical_block_size(new->rq, tr->blksize); + queue_flag_set_unlocked(QUEUE_FLAG_NONROT, new->rq); + if (tr->discard) { queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, new->rq); new->rq->limits.max_discard_sectors = UINT_MAX;