Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp683305ybh; Wed, 22 Jul 2020 10:27:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdtKqy1LOtSdrmC+flALkLaArZkTNcxXq68A2yrwmeCSUUqiqC5IGuyogCzdwX7uHjGWhf X-Received: by 2002:a17:906:8417:: with SMTP id n23mr628887ejx.192.1595438842619; Wed, 22 Jul 2020 10:27:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595438842; cv=none; d=google.com; s=arc-20160816; b=acv/rRUmt4n3k4ti3djWcT+mwXRmTikNiOOjjG2357ih/V8xZekYhukvmGzDl+oXcH Kw2u0DI6fvoYKmjkZepTLAFgLIf760CinSxe0xxfOSxsSgbUUF4y1rVafseTh13n+Dq+ gjJK3JbV5HsRtKjI4ImTg99NCXSD7R2UTBIUu01zOUBC1Frs8b/ZGGC2+Sqgvjw6arY/ Uzn5B8IRLjvVYkMbeBCrQlJPPPR1+uo7XwZLi7p/4Vue+exciiLlVHtUfHTVxsORJt13 qyepQrEiCZ6Js3hkc4Am4JqCw3ue+d82pzJ5UIgRkGGEAdP8mw5TkwUwZwTmlvTaossC uWeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/HHpGzrJoy14hqExaKjrZEGbrJSC7QQx9G2vTQlfxnM=; b=nIx6b/09OjqL15dDnpRL2IgKtHRMVKo2hwf0E7ql9+qc6WtDsFVY6MjxVztXtlIB6x GRtC0IhDO3e8mFlnCa7Z+7g0zTgwJsZXwsqLFjynhBFaCUucbkKA8T42+K8EfZtmVOJF U2/HWT1mszauSEIgV00+zQe3beG+l0C7EXoajDmNHA57wzfS1Hkh/MIykl/x1mv4Ju0A k2q/5xpWKNOwrNOkRKBXgx3+F6GFLkuBTD1yi2PbN4zrZmrfuQtU7MwGLJWVSN5c+VrU Dch00u9jtRa/C6R2WWhtgo8ynJiY6XfGxSu5YKDCRg1gX3FZDjrLzgEs2ZOrd+wg8wmN gYkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=S5ChkHzt; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g22si387306edm.294.2020.07.22.10.26.59; Wed, 22 Jul 2020 10:27:22 -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; dkim=pass header.i=@kernel.org header.s=default header.b=S5ChkHzt; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729217AbgGVRYi (ORCPT + 99 others); Wed, 22 Jul 2020 13:24:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:37778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726980AbgGVRYi (ORCPT ); Wed, 22 Jul 2020 13:24:38 -0400 Received: from localhost (unknown [104.132.1.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 80ABB20781; Wed, 22 Jul 2020 17:24:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595438677; bh=tq+JUZsj5AqgXnL2XBkXkqSDwpXEWCNQo14xO0Bbgj4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=S5ChkHzt67oS2+SLJyglBpw/aN+89aBu7menAe4zmmAVi7hKqKWd6Q6BpqDcuecrA xAkc3/rd7plKxLa20B65NfjxuDhMhu3/K/8iRv9sTNGtiYtaIP7s3ikBc7maCZb6Vo zgZE6HPk6INDytsvNyyIcPTU8PiNHsHgW8nVjgM4= Date: Wed, 22 Jul 2020 10:24:37 -0700 From: Jaegeuk Kim To: Greg KH Cc: Daeho Jeong , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com, Daeho Jeong Subject: Re: [PATCH 1/2] f2fs: add sysfs symbolic link to kobject with volume name Message-ID: <20200722172437.GH3912099@google.com> References: <20200719054409.3050516-1-daeho43@gmail.com> <20200719151640.GA301791@kroah.com> <20200722164356.GA3912099@google.com> <20200722170602.GA440171@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200722170602.GA440171@kroah.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/22, Greg KH wrote: > On Wed, Jul 22, 2020 at 09:43:56AM -0700, Jaegeuk Kim wrote: > > On 07/19, Greg KH wrote: > > > On Sun, Jul 19, 2020 at 02:44:08PM +0900, Daeho Jeong wrote: > > > > From: Daeho Jeong > > > > > > > > Added a symbolic link directory pointing to its device name > > > > directory using the volume name of the partition in sysfs. > > > > (i.e., /sys/fs/f2fs/vol_#x -> /sys/fs/f2fs/sda1) > > > > > > No, please no. > > > > > > That is already created today for you in /dev/disk/ The kernel does not > > > need to do this again. > > > > > > If your distro/system/whatever does not provide you with /dev/disk/ and > > > all of the symlinks in there, then work with your distro/system/whatever > > > to do so. > > > > I don't get the point, since /dev/disk points device node, not any sysfs entry. > > Do you mean we need to create symlink to /sys/fs/f2fs/dm-X in /dev/disk? > > Huh, no! It's all done for you today automagically by userspace: > > $ tree /dev/disk/by-label/ > /dev/disk/by-label/ > ├── boot -> ../../sda1 > ├── fast_disk -> ../../md0 > ├── root -> ../../sda2 > └── stuff -> ../../dm-0 > > Look on your laptop/desktop/server today for those, there's lots of > symlinks in /dev/disk/ What I mean is "creating symlink from *userspace*", but the concern is "/dev/" looks like being used for device nodes only, not sysfs. > > > > Again, no need to do this on a per-filesystem-basis when we already have > > > this around for all filesystems, and have had it for 15+ years now. > > > > Could you point out where we can get this? And, the label support depends > > on per-filesystem design. I'm not sure how this can be generic enough. > > Userspace knows how to read labels on a per-filesystem-basis and does so > just fine. That's how it creates those symlinks, no kernel support is > needed. > > This has been implemented for 15+ years now, it's not a new thing... > > Now if your embedded system doesn't support it, that's the userspace of > that system's fault, it's not the kernel's fault at all. Go fix your > userspace if you want those things. I'm not talking about whose fault tho. :) By any chance, could you please suggest a good location to create a symlink for this sysfs entry? > > thanks, > > greg k-h