Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp9258454rwp; Thu, 20 Jul 2023 01:59:02 -0700 (PDT) X-Google-Smtp-Source: APBJJlGvMEza20udt8mgxzu1HXKX5PzXQyxD66NSjsS+sTEti57erO/cjMhMD2PaOiKo94In15Cp X-Received: by 2002:a17:906:749a:b0:993:d589:8b75 with SMTP id e26-20020a170906749a00b00993d5898b75mr5278882ejl.2.1689843541857; Thu, 20 Jul 2023 01:59:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689843541; cv=none; d=google.com; s=arc-20160816; b=kzHjyPU9d9P25i/ddht/wGj30dwbhNKQwcvcAXF704naQMMKsRvMzmcfnrkcjJ/wkM Yde4TfwsF/uzeIGm4CcOOc9ji60ivkt41Q0RVPsAoXW87kWYgONDfR2yBkR4WYUwMZe4 jkn1UwfELj3bqedxqC/rLVe8OVgJpItKlj6U/ir2+c0SGS/egDW/x4dn0GENE59yuzfF HLgpe4A+03bLlZeLvkncmyKX47X3ZroQFLKLFL3dbVkpZEgkuD39+i83+L83T3gI+4ki MrmCBtoLpMo3XGX+m0YK/fSqyIslR71crAcwiM6i+F5vCKFuZpm3HsfENVjSPu2eCe1J SzlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:dkim-signature:dkim-signature; bh=l/lqrPJHJ301EskkP7uYoZhLyn+KpT4pekkb8H3GJ54=; fh=VYCFcg0bhX50zvXnX9fOO2uoHOVyssMzSUs50cZvz3U=; b=TA7jTVLsD4VqSfjf9d0NTzbNkeYbUnja5uBA+WUHSvjyaSzz5EtL89TviTfAxwvofv AWsvbyEXwZT+O/9ea+yY0g6mh//YKewPPZNPv5TLbdaS9LSS70+PfbgHrDkDhCSuZeY1 kHiaMPnsn70CHTB9gImuWtY8/6IpKtvIwUMJbSoVOgAFk05egaQh2l4YPoPPLTwi6Fmb V4c+8m/PL5h8NmE28P5WoyicHGPaF73E+t2No6drG+8kBkqpDnSfEqS9kV9AtoQRkR1X O5Tbe5oq1gWgrHuQF1OzRUVq+YCfqrA22dGWy7Xw+/c/gx48VHY+L5ckAXOwskUJeiBN f/sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=HyrYogHB; dkim=neutral (no key) header.i=@suse.de header.b=u7X9c28V; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dc5-20020a170906c7c500b00991b774b3aesi382290ejb.652.2023.07.20.01.58.34; Thu, 20 Jul 2023 01:59:01 -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; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=HyrYogHB; dkim=neutral (no key) header.i=@suse.de header.b=u7X9c28V; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231489AbjGTIY2 (ORCPT + 99 others); Thu, 20 Jul 2023 04:24:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229525AbjGTIY0 (ORCPT ); Thu, 20 Jul 2023 04:24:26 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F01D826AD; Thu, 20 Jul 2023 01:24:20 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 8E7A422A1E; Thu, 20 Jul 2023 08:24:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1689841459; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=l/lqrPJHJ301EskkP7uYoZhLyn+KpT4pekkb8H3GJ54=; b=HyrYogHBg4I7GNRpb0GpoEK+9TsC0eSYQo+9/zjkEx+NQuOdLP8OKgeSWK3z7fbYjbQ+lS XlPoSj4+TNI4A3k+8Wd+M5icKNLZBWOeG13615fZpMSUR1PyOGn9D3D0PnWSjXjCRmIZA0 2vCJpO9l+iEyJRpGg8+rY5hcmzdbVkM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1689841459; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=l/lqrPJHJ301EskkP7uYoZhLyn+KpT4pekkb8H3GJ54=; b=u7X9c28VCrMvNoTHJcbjY2dK/qJNm+Wmy73OTkIynCG2bZ5i1lKdJh1by+2369iENgNJqx LmbwrRzLf6Hiv1AQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 36E83133DD; Thu, 20 Jul 2023 08:24:19 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id LtfiDDPvuGSIIwAAMHmgww (envelope-from ); Thu, 20 Jul 2023 08:24:19 +0000 Message-ID: <0592e021-237d-6d41-7faf-e5b93aefbeea@suse.de> Date: Thu, 20 Jul 2023 10:24:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [RFC PATCH 3/6] block: add new genhd flag GENHD_FL_NO_NVMEM To: Daniel Golle , Jens Axboe , Ulf Hansson , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Dave Chinner , Matthew Wilcox , =?UTF-8?Q?Thomas_Wei=c3=9fschuh?= , Jan Kara , Damien Le Moal , Ming Lei , Min Li , Christian Loehle , Adrian Hunter , 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 References: <96510d925cb0ca1a3a132f8f8affd4bbdafd8fc9.1689802933.git.daniel@makrotopia.org> Content-Language: en-US From: Hannes Reinecke In-Reply-To: <96510d925cb0ca1a3a132f8f8affd4bbdafd8fc9.1689802933.git.daniel@makrotopia.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, 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 On 7/20/23 00:03, Daniel Golle wrote: > 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 { Please reverse this flag. Most of the devices will not have an NVMEM partition, and we shouldn't require each and every driver to tag their devices. So please use GENHD_FL_NVMEM and only set this flag on devices which really have an NVMEM partition. Cheers, Hannes