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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0E84C83F25 for ; Wed, 30 Aug 2023 18:45:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238352AbjH3Shi (ORCPT ); Wed, 30 Aug 2023 14:37:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242790AbjH3Ji7 (ORCPT ); Wed, 30 Aug 2023 05:38:59 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED4C5137 for ; Wed, 30 Aug 2023 02:38:54 -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-out2.suse.de (Postfix) with ESMTPS id 715AD1F45F; Wed, 30 Aug 2023 09:38:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1693388332; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=PIxQhlRFdNZswSMGee257L+GnW4woe/Nn9nub9+MKzw=; b=u3purBzD1lDBwNHBxD0L10YRsGqgTiDXKMf+uNIDtSbfzg2f1dExaGu0302JVjHEc6yn72 gujaXasqwXCPLVMHXB6S9XbH8A6kHK6N+TEtJluiWcJqVQFdRNGhCGa99Px8/l4pE8i9+t lRtWvsBXvx4Kxa+rxjMkxVMbaBCfGAk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1693388332; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=PIxQhlRFdNZswSMGee257L+GnW4woe/Nn9nub9+MKzw=; b=YRZdTIazvSq/KWONWEgag0o18Mp7C9iPMcHhhBOBJSSd34qqxaRCaRje2aLGNBArcZ1Ifb LGpGuD/TRBxzCqBg== 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 606FB1353E; Wed, 30 Aug 2023 09:38:52 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +y+AFywO72QNJAAAMHmgww (envelope-from ); Wed, 30 Aug 2023 09:38:52 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id E8292A0774; Wed, 30 Aug 2023 11:38:51 +0200 (CEST) Date: Wed, 30 Aug 2023 11:38:51 +0200 From: Jan Kara To: Christian Brauner Cc: Christoph Hellwig , Jan Kara , Richard Weinberger , Miquel Raynal , Vignesh Raghavendra , linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 1/2] fs: export sget_dev() Message-ID: <20230830093851.uwdgpt645niysuji@quack3> References: <20230829-vfs-super-mtd-v1-0-fecb572e5df3@kernel.org> <20230829-vfs-super-mtd-v1-1-fecb572e5df3@kernel.org> <20230830061409.GB17785@lst.de> <20230830-befanden-geahndet-2f084125d861@brauner> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230830-befanden-geahndet-2f084125d861@brauner> Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Wed 30-08-23 10:05:57, Christian Brauner wrote: > On Wed, Aug 30, 2023 at 08:14:09AM +0200, Christoph Hellwig wrote: > > > +struct super_block *sget_dev(struct fs_context *fc, dev_t dev) > > > > A kerneldoc comment would probably be useful here. > > Added the following in-treep: > > diff --git a/fs/super.c b/fs/super.c > index 158e093f23c9..19fa906b118a 100644 > --- a/fs/super.c > +++ b/fs/super.c > @@ -1388,6 +1388,26 @@ static int super_s_dev_test(struct super_block *s, struct fs_context *fc) > s->s_dev == *(dev_t *)fc->sget_key; > } > > +/** > + * sget_dev - Find or create a superblock by device number > + * @fc: Filesystem context. > + * @dev: device number ^^^^^^ inconsistent indenting. > + * > + * Find or create a superblock using the provided device number that > + * will be stored in fc->sget_key. > + * > + * If an extant superblock is matched, then that will be returned with > + * an elevated reference count that the caller must transfer or discard. > + * > + * If no match is made, a new superblock will be allocated and basic > + * initialisation will be performed (s_type, s_fs_info and s_id will be > + * set and the set() callback will be invoked), the superblock will be ^^ I guess no point in talking about set() callback when sget_dev() has no callback specified. Rather you could mention s_dev as one of initialized fields. Honza -- Jan Kara SUSE Labs, CR