linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Daeho Jeong <daeho43@gmail.com>
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 v3] f2fs: add symbolic link to kobject in sysfs
Date: Thu, 9 Jul 2020 10:07:59 +0900	[thread overview]
Message-ID: <CACOAw_zKK7oD+w2R-0OQGFvS5EUvWWTmyWvdTJZAqrLxHH1w5Q@mail.gmail.com> (raw)
In-Reply-To: <20200708100527.GA448589@kroah.com>

I thought it's working for our system. But as you said, it might be
not true for others. I got your point. Partition label would be a
great idea for us.

Thank you for your comment!

2020년 7월 8일 (수) 오후 7:05, Greg KH <gregkh@linuxfoundation.org>님이 작성:
>
> On Mon, Jul 06, 2020 at 08:47:07AM +0900, Daeho Jeong wrote:
> > > No Documentation/ABI/ entry for your new sysfs file/link?
> >
> > This is for adding a symbolic link to a pre-existed
> > /sys/fs/f2fs/<disk> directory and it means /sys/fs/f2fs/<mount> points
> > to /sys/fs/f2fs/<disk>. I already added the description of this in
> > Documentation/filesystems/f2fs.rst.
>
> Ok, but that's not the standard location for sysfs file documentation.
>
> > > And what does this help with?
> >
> > Some system daemons in Android access with the pre-defined sysfs entry
> > name in the json file. So whenever the project changes and the
> > partition layout is changed, we have to follow up the changes and
> > modify /sys/fs/f2fs/<disk> name in the json file accordingly.
>
> That's what partition names are for, you should never depend on a
> "random number".
>
> > This will help them access all the f2fs sysfs entries consistently
> > without requiring to know those changes.
>
> No, please use a partition name, that is the only way to always know you
> are mounting the correct partition.  You have created a random number
> here that might, or might not, change between boots depending on the
> order of the filesystem being mounted.  It is not persistant or
> deterministic at all, please do not treat it as such.
>
> > > If it's really needed, why don't we do this for all filesystem types?
> >
> > This is for the daemon to change the mode of only F2FS with the power
> > hint of Android.
>
> Again, the point is that a filesystem type is not unique, this, if
> really really needed, should be an attribute for ALL filesystem types,
> f2fs is not special here at all.
>
> Please do not rely on this number ever being the same across boots,
> because your code is such that you can not guarantee that.
>
> And again, if you really want to know the partition you are mounting
> really is the partition you think you are mounting, use the partition
> label name, that is what it is there for, and is why we have been
> relying on that for decades.  A new special per-filesystem-attribute
> that is semi-random is not the correct solution for the problem you are
> describing as far as I can determine.
>
> thanks,
>
> greg k-h


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

      reply	other threads:[~2020-07-09  1:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-03  6:54 [f2fs-dev] [PATCH v3] f2fs: add symbolic link to kobject in sysfs Daeho Jeong
2020-07-03  8:18 ` Chao Yu
2020-07-03 14:13 ` Greg KH
2020-07-05 23:47   ` Daeho Jeong
2020-07-08 10:05     ` Greg KH
2020-07-09  1:07       ` Daeho Jeong [this message]

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=CACOAw_zKK7oD+w2R-0OQGFvS5EUvWWTmyWvdTJZAqrLxHH1w5Q@mail.gmail.com \
    --to=daeho43@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).