Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1231134pxj; Fri, 4 Jun 2021 09:08:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwypp0U0M7zPwHYzlhnTcJvcYPzK3a6TQ/0SnZrf6wjsqnAXh4k4qFSOzCfLNo+WDRpwNpv X-Received: by 2002:a17:906:35ca:: with SMTP id p10mr4664504ejb.535.1622822927123; Fri, 04 Jun 2021 09:08:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622822927; cv=none; d=google.com; s=arc-20160816; b=Bk+uqsXhYgjTo7ZJtvjdJmVp7pjJlsAP8F4lok2QO5Mup5+iNUZXE8JuESYH4KjzvE RWfgKGeGbUTHPFdjU79jDJkLpDA7jYvgJU/qrmjGH7cXUtKUZYPA/iihC3+454adRtej mKU7sE/VsFJAGZC31Oh9nregZSEyrmegzw1fq/qSmFlSazHro7W0F0ZIed9waqIEXAWd 9RTUDhpX+A5ae3BYB88yHB2BuWnOSWo2YU9707shF+hayY+R5W6V1cYFbx7+UHFuzczB 58Kuz/UOjTNbE1JnV19EnwLfTo0bJGiuvyOzw1vXM8KQess/mKwG8JnKQ60dF6L7pTPq DiHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=y3AurYcCmtiXAfcV3whdJJVoSDCLW2DIe7YMaAQh8xA=; b=pEvG1eeze+WkyorK0BlWDHhPVftxEQq0vFhsBA48WPBHNCkbBK0fdVMXyxIBPSVEKq E4cDiY0AIGLtIvO/HYWCZSgHpwJa64wCm4CGshzZs8i2GwgHOpCCjZ1jRDXbrYUMwbJs kAe+0llxV031qmpaubUBeIgOYnGJmcIeRc5KqaWORwdPViV/TpeBvCpTeKm/6V207c07 UfzNNxmulIXZOPcJDVelWRyUFxzrRsoy2UCY3W+ZzTrefZ0AKVNxxkesbxZl1f2ogRd4 Smag/Vel6gAP8miEVtGqCirGlJK6HrV0murFGoQokXt9UGaGZELcGXJma0gFFDnNb4iA GqGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w1si5078284edt.513.2021.06.04.09.08.22; Fri, 04 Jun 2021 09:08:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229958AbhFDQIu (ORCPT + 99 others); Fri, 4 Jun 2021 12:08:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229809AbhFDQIu (ORCPT ); Fri, 4 Jun 2021 12:08:50 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 985C0C061766 for ; Fri, 4 Jun 2021 09:07:03 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: aratiu) with ESMTPSA id 35E591F43C2D From: Adrian Ratiu To: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" , Andrew Morton , kernel@collabora.com, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 0/1] Initialize debugfs/ksysfs earlier? In-Reply-To: References: <20210603125534.638672-1-adrian.ratiu@collabora.com> <87y2bqwwfz.fsf@collabora.com> Date: Fri, 04 Jun 2021 19:06:58 +0300 Message-ID: <87tumdwr4t.fsf@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 04 Jun 2021, Greg Kroah-Hartman wrote: > On Thu, Jun 03, 2021 at 11:00:00PM +0300, Adrian Ratiu wrote: >> Hi and thank you for the quick response! On Thu, 03 Jun 2021, >> Greg Kroah-Hartman wrote: >> > On Thu, Jun 03, 2021 at 03:55:33PM +0300, Adrian Ratiu wrote: >> > > Hi Greg & all, I would like to add a new debugfs file like >> > > in the next patch but I'm having a problem with commit >> > > 56348560d495 ("debugfs: do not attempt to create a new file >> > > before the filesystem is initalized"). >> > You should have had a problem before that commit happened as >> > well, right? >> Actually no, it works without problems before commit >> 56348560d495 and also works if I revert that commit or move the >> debugfs_init() and its dependency ksysfs_init() before the >> driver core init. > > And the file shows up properly? How can that be? Is it ok to > create a file before the superblock is created in the system? > For some reason I thought these were just silently failing and > no one noticed. Maybe we should revisit that commit... Yes the file shows up and works properly, but I do not know why. My tests run after the system boots to an interactive shell and by that time everything is initialized and working. I thought maybe there were some specific corner-cases you wanted to guard against by adding that initialization -ENOENT check, but honestly since we're not adding a file earlier in the driver core anymore, I'd just leave it as is because the check makes sense in general. Thanks again, Adrian > > thanks, > > greg k-h