Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8775093rwp; Wed, 19 Jul 2023 15:24:14 -0700 (PDT) X-Google-Smtp-Source: APBJJlEx9qmeB9ZzHCmzSbVgUstWHBbP8mqVFDyNQqQXSMkfqVlfjJC/80Uw1AsrmSw8qB2x1Ujo X-Received: by 2002:a05:6870:8a0c:b0:1b7:6169:9d52 with SMTP id p12-20020a0568708a0c00b001b761699d52mr4731625oaq.24.1689805453997; Wed, 19 Jul 2023 15:24:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689805453; cv=none; d=google.com; s=arc-20160816; b=z451Js2tGrZYr9x6nWLBj7IhhZvZydztbMrKitjEI1CWMMxTwHNGz9hffn8G+19cNx FtGge3D5+7Dy2FPJM8xxA6/c8hZQ9X71vlQhQyCbQkQECnsyVE4Sib9+DBe+OiqnsPzF 30M+fOqkz416y+OEBvij1WL+KdFAeK4ILvgGr8M3FrPo8AiciBbcQ6bvsglSa+hikd3P mBZDIeI4yRy5rwzo2qUfYi9XA8sh6iznzVKKSuxwRhHdGEkha3m8pxQvY+9ewMeAj7Qd huF7OK7ZxyzGZ2BKhJDi1/ljyl1gLYqk0kHtqW0XYtqKZCwZvTIsdv3ke1RhlRrpwWDk tLzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date; bh=aI+oONGaegupJ0seogiMq5KOugYmjBNwpl7+MkGhXeY=; fh=O/hjEvlM0nIN8LC6WbIQ4s0L6nmnRMOzajXXMF81As0=; b=rySUH0T8WAcV+Jgdb2O+AgQJIHYktjKMUkBKP8XLB0pl5J7lJz9U/U2kw/UgfxP/Lp H6Vdnx0rlg2Zs6fYjHWS81E0ZFK0xGy1EiInC6aw1d6a9WLG0AMt1/7DPpLxzmQ5kWED jhI6FhIn5YLYvyzhmHcJOXTqxK91QIS7bZeFOb8PzUmzs4OlvwFHkhJ/utL3TvuqfIVl bOPFzcZdjv8UwJ4wqz6PjAeV64e85LAflO2dz93U+xrwCK5mclt0iC5FzophF4tJIj6N F813yZ1fqSBAmAHbGaKK8hOg5Rql+D0P79X3TtXN3mgu0JX/1vAu/ClpCP2H/0vkCuAm t7JA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j193-20020a638bca000000b00557a05b4209si4356791pge.463.2023.07.19.15.24.02; Wed, 19 Jul 2023 15:24:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230173AbjGSWDr (ORCPT + 99 others); Wed, 19 Jul 2023 18:03:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229574AbjGSWDp (ORCPT ); Wed, 19 Jul 2023 18:03:45 -0400 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDBB2213D; Wed, 19 Jul 2023 15:03:29 -0700 (PDT) Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1qMFGL-0008Kc-1x; Wed, 19 Jul 2023 22:03:13 +0000 Date: Wed, 19 Jul 2023 23:03:05 +0100 From: Daniel Golle To: Jens Axboe , Ulf Hansson , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Dave Chinner , Matthew Wilcox , Thomas =?iso-8859-1?Q?Wei=DFschuh?= , Jan Kara , Daniel Golle , Damien Le Moal , Ming Lei , Min Li , Christian Loehle , Adrian Hunter , Hannes Reinecke , Jack Wang , Florian Fainelli , Yeqi Fu , Avri Altman , Hans de Goede , Ye Bin , Greg Kroah-Hartman , =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org Subject: [RFC PATCH 3/6] block: add new genhd flag GENHD_FL_NO_NVMEM Message-ID: <96510d925cb0ca1a3a132f8f8affd4bbdafd8fc9.1689802933.git.daniel@makrotopia.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add new flag to destinguish block devices which should not act as an NVMEM provider, such as for example an emulated block device on top of an MTD partition which already acts as an NVMEM provider itself. Signed-off-by: Daniel Golle --- include/linux/blkdev.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 2f5371b8482c0..e853d1815be15 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -80,11 +80,14 @@ struct partition_meta_info { * ``GENHD_FL_NO_PART``: partition support is disabled. The kernel will not * scan for partitions from add_disk, and users can't add partitions manually. * + * ``GENHD_FL_NO_NVMEM``: NVMEM emulation is disabled. The kernel will not + * emulate an NVMEM device on top of this disk. */ enum { GENHD_FL_REMOVABLE = 1 << 0, GENHD_FL_HIDDEN = 1 << 1, GENHD_FL_NO_PART = 1 << 2, + GENHD_FL_NO_NVMEM = 1 << 3, }; enum { -- 2.41.0