From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Daeho Jeong <daehojeong@google.com>,
kernel-team@android.com, linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH 1/2] f2fs: add sysfs symbolic link to kobject with volume name
Date: Wed, 22 Jul 2020 10:24:37 -0700 [thread overview]
Message-ID: <20200722172437.GH3912099@google.com> (raw)
In-Reply-To: <20200722170602.GA440171@kroah.com>
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 <daehojeong@google.com>
> > > >
> > > > 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
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
WARNING: multiple messages have this Message-ID (diff)
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Daeho Jeong <daeho43@gmail.com>,
linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com,
Daeho Jeong <daehojeong@google.com>
Subject: Re: [PATCH 1/2] f2fs: add sysfs symbolic link to kobject with volume name
Date: Wed, 22 Jul 2020 10:24:37 -0700 [thread overview]
Message-ID: <20200722172437.GH3912099@google.com> (raw)
In-Reply-To: <20200722170602.GA440171@kroah.com>
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 <daehojeong@google.com>
> > > >
> > > > 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
next prev parent reply other threads:[~2020-07-22 17:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-19 5:44 [f2fs-dev] [PATCH 1/2] f2fs: add sysfs symbolic link to kobject with volume name Daeho Jeong
2020-07-19 5:44 ` Daeho Jeong
2020-07-19 5:44 ` [f2fs-dev] [PATCH 2/2] f2fs: add volume_name mount option Daeho Jeong
2020-07-19 5:44 ` Daeho Jeong
2020-07-19 9:06 ` [PATCH 1/2] f2fs: add sysfs symbolic link to kobject with volume name kernel test robot
2020-07-19 9:06 ` kernel test robot
2020-07-19 15:16 ` [f2fs-dev] " Greg KH
2020-07-19 15:16 ` Greg KH
2020-07-22 16:43 ` [f2fs-dev] " Jaegeuk Kim
2020-07-22 16:43 ` Jaegeuk Kim
2020-07-22 17:06 ` [f2fs-dev] " Greg KH
2020-07-22 17:06 ` Greg KH
2020-07-22 17:24 ` Jaegeuk Kim [this message]
2020-07-22 17:24 ` Jaegeuk Kim
2020-07-22 19:10 ` [f2fs-dev] " Greg KH
2020-07-22 19:10 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200722172437.GH3912099@google.com \
--to=jaegeuk@kernel.org \
--cc=daehojeong@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-team@android.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.