From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95024C433DF for ; Thu, 25 Jun 2020 00:35:58 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 57CD120781; Thu, 25 Jun 2020 00:35:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="D34zvBdC"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="FDxYuxV+"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="gDskKqXp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 57CD120781 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1joFrx-0001Cs-1e; Thu, 25 Jun 2020 00:35:57 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joFrv-0001Ci-19 for linux-f2fs-devel@lists.sourceforge.net; Thu, 25 Jun 2020 00:35:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=sGG+VAkdXEMKn+z9CcSnjOrNdzj17nH/Eh18dsMEtII=; b=D34zvBdCoYPG9ctg3LpQsjkb+R sPwGa3Klyo5NKvZXkFWcqUx4HwD4dKTlW882gsHC15r+EAcxv1ajbksXEtKLdp8OkphOnC8blk7Ei +4ZcnmXqfZFhZCbTMrxKJ4RLEw9oUVJsobLAiRIqUO8CJGLy/VgeoO9/re9cGK02IrQ0=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=sGG+VAkdXEMKn+z9CcSnjOrNdzj17nH/Eh18dsMEtII=; b=FDxYuxV+4j1JxpdR0mzAtOwjRd zOFw1xhBQZk2K/d4r0MGJkC56Vw18MyrOJYCWLc7aS5S/eUwgcAsiAy8rNYids3HjmB/xDXjYtNe8 sNqHuE3Kz5GZgmViHR32ccGkSK1833HrL4yZLuc72RrJI1jKe6dMK1KktdDjEE2Odg58=; Received: from mail.kernel.org ([198.145.29.99]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1joFrs-00HCoy-3D for linux-f2fs-devel@lists.sourceforge.net; Thu, 25 Jun 2020 00:35:54 +0000 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 0EF892078D; Thu, 25 Jun 2020 00:35:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593045344; bh=9/yif0uED8r0mBA3VK8O5YzprCAsTE6sgzq4YVVCc/M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gDskKqXpfqJhDcdBBjy0d6SJy1+sv2YszPkTe5/AvZu1ZdygZFbm2BbwFTP6fHN7O 25lPKfWryj4fxscB0Ngo9WI0El14RmKXS1wyXw6bFWK7YFuLtRd6jMqXpw7e4XYMm6 NYdlqYXMoI0FK1FOE/9MluFCxpsH2Hym2YuGQSz0= Date: Wed, 24 Jun 2020 17:35:43 -0700 From: Jaegeuk Kim To: Didier Spaier Message-ID: <20200625003543.GA34187@google.com> References: <13e19af7-69d5-6db3-441e-3be4921983de@slint.fr> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <13e19af7-69d5-6db3-441e-3be4921983de@slint.fr> X-Headers-End: 1joFrs-00HCoy-3D Subject: Re: [f2fs-dev] Questions about using f2fs to format the root partition during Slint installation. X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net 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 > . 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