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=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 B805AC48BE5 for ; Mon, 21 Jun 2021 14:53:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 95E5060FDA for ; Mon, 21 Jun 2021 14:53:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230032AbhFUOz0 (ORCPT ); Mon, 21 Jun 2021 10:55:26 -0400 Received: from verein.lst.de ([213.95.11.211]:42281 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229789AbhFUOzZ (ORCPT ); Mon, 21 Jun 2021 10:55:25 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id E2D4F68B05; Mon, 21 Jun 2021 16:53:09 +0200 (CEST) Date: Mon, 21 Jun 2021 16:53:09 +0200 From: Christoph Hellwig To: Al Viro Cc: Christoph Hellwig , Vivek Goyal , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, virtio-fs@redhat.com Subject: Re: [PATCH 1/2] init: split get_fs_names Message-ID: <20210621145309.GA4995@lst.de> References: <20210621062657.3641879-1-hch@lst.de> <20210621062657.3641879-2-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 21, 2021 at 02:46:37PM +0000, Al Viro wrote: > TBH, I would rather take that one into fs/filesystems.c. Rationale: > get_filesystem_list(), for all its resemblance to /proc/filesystems > contents, is used only by init/*.c and it's not a big deal to make > it Yeah, unwinding this mess actually is a good idea. I didn't really look outside of do_mounts.c, but once doing that it becomes completely obvious. > int __init get_filesystem_list(char *buf, bool is_dev) As-is we don't even really need the is_dev argument, as the only callers wants block device file systems anyway. In fact it would much rather have a cursor based iteration so that we can skip the allocation, but that is probaby overengineering the problem. From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 21 Jun 2021 16:53:09 +0200 From: Christoph Hellwig Message-ID: <20210621145309.GA4995@lst.de> References: <20210621062657.3641879-1-hch@lst.de> <20210621062657.3641879-2-hch@lst.de> MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: Re: [Virtio-fs] [PATCH 1/2] init: split get_fs_names List-Id: Development discussions about virtio-fs List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Al Viro Cc: linux-fsdevel@vger.kernel.org, virtio-fs@redhat.com, Christoph Hellwig , Vivek Goyal , linux-kernel@vger.kernel.org On Mon, Jun 21, 2021 at 02:46:37PM +0000, Al Viro wrote: > TBH, I would rather take that one into fs/filesystems.c. Rationale: > get_filesystem_list(), for all its resemblance to /proc/filesystems > contents, is used only by init/*.c and it's not a big deal to make > it Yeah, unwinding this mess actually is a good idea. I didn't really look outside of do_mounts.c, but once doing that it becomes completely obvious. > int __init get_filesystem_list(char *buf, bool is_dev) As-is we don't even really need the is_dev argument, as the only callers wants block device file systems anyway. In fact it would much rather have a cursor based iteration so that we can skip the allocation, but that is probaby overengineering the problem.