linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Didier Spaier <didier@slint.fr>
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] Questions about using f2fs to format the root partition during Slint installation.
Date: Wed, 24 Jun 2020 17:35:43 -0700	[thread overview]
Message-ID: <20200625003543.GA34187@google.com> (raw)
In-Reply-To: <13e19af7-69d5-6db3-441e-3be4921983de@slint.fr>

Hi,

On 06/25, Didier Spaier wrote:
> Hello list,
> 
> this email is a follow-up of:
> https://www.mail-archive.com/linux-f2fs-devel@lists.sourceforge.net/msg14390.html
> 
> I will number the questions Q1, Q2 etc.
> 
> To summarize the context and goal: I want that the Slint installer
> format the root partition with f2fs when appropriate, if possible
> without asking questions to the user about the device.
> 
> I target usage of f2fs for the root file system in cases of USB flash
> drives aka USB sticks, SD cards, eMMC, as if I understand correctly
> these kinds of devices benefit the most of wear minimization and
> increase of performance when using f2fs. I plan to use ext4 for SSD
> (including NVMe) and hard disks.
> 
> This leads to several questions:
> 
> Q1: Comments about this choice of target devices for f2fs, knowing that
> I favor security over performances and that the "auto" option of the
> installer is intended for your grand-mother? I am a grand father myself
> <smile>.

Which security and performance feature do you want to use in the system?
For example, mkfs.f2fs requires some options like:
- fscrypt : -O encrypt
- quota : -O quota
- fsverity : -O verity
- compression : -O compression -O extra_attr
- casefolding : -O casefold -C utf8

> 
> Q2. How-to determine if the drive fall in one of the types listed above
> without asking the user if possible?
> 
> I have considered using the output of lsblk and/or "udevadm info" but
> that doesn't seem to provide enough information on the device.
> 
> As an aside, I have seen rota=1 for an USB boot stick. ??? 

I don't have a good idea to detect this. Maybe by measuring write bandwidth
and checking IO interface?

> 
> Q3. What would be the safest options to include in the relevant line of
> /etc/fstab forthe root partition using f2fs?

default + any features that you're interested in?
We've been using the below option for several years in Android.
https://android.googlesource.com/device/google/coral/+/refs/heads/master/fstab.hardware#11

> 
> Q4. do you confirm the statement below? it is a quote of web page:
> https://wiki.gentoo.org/wiki/F2FS
> > When using f2fs > When using f2fs as rootfs fsck fails on boot.
> > Solutions are either disabling fsck in /etc/fstab (setting the last
> > number to 0) or enabling the force-flag for fsck in /etc/conf.d/fsck.
> > See bug #671786

Yes, likewise e2fsprogs, fsck.f2fs doesn't allow to open ro-mounted disk
with "-a". But we added a patch to allow it with "-f".

> 
> Q5. I am correct f2fs can be expanded but not shrinked. Is it still
> true? Will it planned to bring this feature?

That can be done by ioctl() in runtime since v5.3.
https://lore.kernel.org/linux-f2fs-devel/20190711171336.GA66396@jaegeuk-macbookpro.roam.corp.google.com/#r

> 
> Q6. Currently we ship a 4.19 kernel. Would it be preferable to ship a
> 5.4 one instead shipped in Slackware-current at time of writing, knowing
> that we ship an no patched (aka vanilla) kernel and what would be the
> benefit of doing so wrt f2fs?

v5.4 would be better, and if you have some time, it'd be great to sync
my backporting patches from the below branches. These are all mirrored to
Android common kernels as well.

https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-stable.git/log/?h=linux-5.4.y
https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-stable.git/log/?h=linux-4.19.y
https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-stable.git/log/?h=linux-4.14.y

Thanks,


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

  reply	other threads:[~2020-06-25  0:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-24 22:17 [f2fs-dev] Questions about using f2fs to format the root partition during Slint installation Didier Spaier
2020-06-25  0:35 ` Jaegeuk Kim [this message]
2020-08-23 15:53   ` Didier Spaier
2020-08-31 17:42     ` Jaegeuk Kim
2020-09-01 22:50       ` Didier Spaier

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=20200625003543.GA34187@google.com \
    --to=jaegeuk@kernel.org \
    --cc=didier@slint.fr \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    /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).