erofs: move erofs out of staging
Subsystems (5)
RFC PATCH 1/1 erofs: move erofs out of staging
EROFS filesytem has been merged into linux-staging tree for a year.
During the past year, EROFS was greatly improved by many contributors, self-tested, betaed by a large number of our internal users, and successfully applied to 10+ million mobile phones as a part of EMUI 9.1 [1] which are already on the market.
Decompression inplace and compacted indexes have been merged for linux-5.3, which improves its read performance and becomes a part of EROFS. A brief meterial about EROFS at Open Source Summit China 2019 [2] and a USENIX ATC'19 paper [3] describing most of its design are available as well.
Again, the goal of EROFS is to save extra storage space with guaranteed end-to-end performance for read-only files and we have a dedicated kernel team keeping on working on this filesystem in order to make it better.
EROFS behaves as a block-based filesystem driver, the main code is ~7KLOC, self-contained and stable enough to move out of staging. We will keep on developping / tuning EROFS with the evolution of Linux kernel as the other in-kernel filesystems.
Recently, the related topic [4] got a few suggestions from fs people, and now it turns into silence again for a period of time. Perhaps it's a good signal since no strong objections raised here. Regretfully no explicit ACK of this topic till now as well and I have been looking forward to get some external ACKs of this stuff all the time, sincerely...
As Pavel suggested earlier [5], it is better to do it as one commit since git can do moves and all histories will be saved in this way.
Let's promote it from staging and enhance it more actively!
[1] http://web.archive.org/web/20190326175036/https://consumer.huawei.com/en/emui/
[2] https://sched.co/Nru2
[3] https://www.usenix.org/conference/atc19/presentation/gao
[4] https://lore.kernel.org/linux-fsdevel/20190802125347.166018-1-gaoxiang25 at huawei.com/
[5] https://lore.kernel.org/linux-fsdevel/20190714104940.GA1282 at xo-6d-61-c0.localdomain/
---
Hi folks,
This patch is marked as a RFC patch since it's still some early for linux-5.4-rc1.
However, I, Chao and other people currently working on EROFS stuffs would like to know what the next step is. We already proved the advantage of our compression solution and do good enough as a part of staging driver.
EROFS was initially developped myself as a homebrew in my leisure time in the end of 2017 in order to demo fixed-sized output compression, I persuaded my boss to try to work on this new solution for system partitions on our Android products at the very beginning of 2018 after we failed to switch to squashfs suggested by Google in 2016. Chao and other colleagues were joined into this project at that time. Chao was happy to be the co-maintainer of linux kernel EROFS as well. This work was very cautious at the very high level of HUAWEI but it turns to be a success now.
We also persuaded our bosses to make a decision of open-source this filesystem at the early stage since we know it's hard to maintain as an out-of-tree Linux filesystem in the long term and we are happy to apply it into wider use cases. For example, use it into desktop distrbutions or Docker images.
On the one hand, as words documented in "Documentation/process/2.Process.rst", entry into staging is not the end of the story and distributors also tend to be relatively reluctant to enable staging drivers as well.
On the other hand, there are many cooking stuffs of EROFS on the way from Chao (iomap), Guifu (erofs-fuse) and me (new algorithm support), but we'd like to get whether EROFS can be a part of Linux mainstream at least to play with it even further.
Please kindly share comments about EROFS, thanks!
Thanks,
Gao Xiang
.../filesystems/erofs.txt | 4 --
drivers/staging/Kconfig | 2 -
drivers/staging/Makefile | 1 -
drivers/staging/erofs/TODO | 46 -------------------
fs/Kconfig | 1 +
fs/Makefile | 1 +
{drivers/staging => fs}/erofs/Kconfig | 0
{drivers/staging => fs}/erofs/Makefile | 4 +-
{drivers/staging => fs}/erofs/compress.h | 2 +-
{drivers/staging => fs}/erofs/data.c | 2 +-
{drivers/staging => fs}/erofs/decompressor.c | 2 +-
{drivers/staging => fs}/erofs/dir.c | 2 +-
{drivers/staging => fs}/erofs/erofs_fs.h | 3 +-
{drivers/staging => fs}/erofs/inode.c | 2 +-
{drivers/staging => fs}/erofs/internal.h | 3 +-
{drivers/staging => fs}/erofs/namei.c | 2 +-
{drivers/staging => fs}/erofs/super.c | 2 +-
{drivers/staging => fs}/erofs/tagptr.h | 0
{drivers/staging => fs}/erofs/utils.c | 2 +-
{drivers/staging => fs}/erofs/xattr.c | 2 +-
{drivers/staging => fs}/erofs/xattr.h | 2 +-
{drivers/staging => fs}/erofs/zdata.c | 2 +-
{drivers/staging => fs}/erofs/zdata.h | 2 +-
{drivers/staging => fs}/erofs/zmap.c | 2 +-
{drivers/staging => fs}/erofs/zpvec.h | 2 +-
.../include => include}/trace/events/erofs.h | 0
include/uapi/linux/magic.h | 1 +
27 files changed, 21 insertions(+), 73 deletions(-)
rename {drivers/staging/erofs/Documentation => Documentation}/filesystems/erofs.txt (98%)
delete mode 100644 drivers/staging/erofs/TODO
rename {drivers/staging => fs}/erofs/Kconfig (100%)
rename {drivers/staging => fs}/erofs/Makefile (68%)
rename {drivers/staging => fs}/erofs/compress.h (97%)
rename {drivers/staging => fs}/erofs/data.c (99%)
rename {drivers/staging => fs}/erofs/decompressor.c (99%)
rename {drivers/staging => fs}/erofs/dir.c (98%)
rename {drivers/staging => fs}/erofs/erofs_fs.h (99%)
rename {drivers/staging => fs}/erofs/inode.c (99%)
rename {drivers/staging => fs}/erofs/internal.h (99%)
rename {drivers/staging => fs}/erofs/namei.c (99%)
rename {drivers/staging => fs}/erofs/super.c (99%)
rename {drivers/staging => fs}/erofs/tagptr.h (100%)
rename {drivers/staging => fs}/erofs/utils.c (99%)
rename {drivers/staging => fs}/erofs/xattr.c (99%)
rename {drivers/staging => fs}/erofs/xattr.h (98%)
rename {drivers/staging => fs}/erofs/zdata.c (99%)
rename {drivers/staging => fs}/erofs/zdata.h (99%)
rename {drivers/staging => fs}/erofs/zmap.c (99%)
rename {drivers/staging => fs}/erofs/zpvec.h (98%)
rename {drivers/staging/erofs/include => include}/trace/events/erofs.h (100%)Documentation/filesystems/erofs.txt renamed from drivers/staging/erofs/Documentation/filesystems/erofs.txt +0 -4
@@ -49,10 +49,6 @@ Bugs and patches are welcome, please kindly help us and send to the following linux-erofs mailing list: >> linux-erofs mailing list <linux-erofs at lists.ozlabs.org> -Note that EROFS is still working in progress as a Linux staging driver, -Cc the staging mailing list as well is highly recommended: ->> Linux Driver Project Developer List <devel at driverdev.osuosl.org> - Mount options =============
drivers/staging/Kconfig +0 -2
@@ -112,8 +112,6 @@ source "drivers/staging/gasket/Kconfig" source "drivers/staging/axis-fifo/Kconfig" -source "drivers/staging/erofs/Kconfig" - source "drivers/staging/fieldbus/Kconfig" source "drivers/staging/kpc2000/Kconfig"
drivers/staging/Makefile +0 -1
@@ -46,7 +46,6 @@ obj-$(CONFIG_DMA_RALINK) += ralink-gdma/ obj-$(CONFIG_SOC_MT7621) += mt7621-dts/ obj-$(CONFIG_STAGING_GASKET_FRAMEWORK) += gasket/ obj-$(CONFIG_XIL_AXIS_FIFO) += axis-fifo/ -obj-$(CONFIG_EROFS_FS) += erofs/ obj-$(CONFIG_FIELDBUS_DEV) += fieldbus/ obj-$(CONFIG_KPC2000) += kpc2000/ obj-$(CONFIG_ISDN_CAPI) += isdn/
drivers/staging/erofs/TODO deleted +0 -46
46 lines not on this page · raw message
fs/Kconfig +1 -0
@@ -261,6 +261,7 @@ source "fs/romfs/Kconfig" source "fs/pstore/Kconfig" source "fs/sysv/Kconfig" source "fs/ufs/Kconfig" +source "fs/erofs/Kconfig" endif # MISC_FILESYSTEMS
fs/Makefile +1 -0
@@ -130,3 +130,4 @@ obj-$(CONFIG_F2FS_FS) += f2fs/ obj-$(CONFIG_CEPH_FS) += ceph/ obj-$(CONFIG_PSTORE) += pstore/ obj-$(CONFIG_EFIVAR_FS) += efivarfs/ +obj-$(CONFIG_EROFS_FS) += erofs/
fs/erofs/Kconfig renamed from drivers/staging/erofs/Kconfig +0 -0
fs/erofs/Makefile renamed from drivers/staging/erofs/Makefile +1 -3
@@ -1,12 +1,10 @@ # SPDX-License-Identifier: GPL-2.0-only -EROFS_VERSION = "1.0pre1" +EROFS_VERSION = "1.0" ccflags-y += -DEROFS_VERSION=\"$(EROFS_VERSION)\" obj-$(CONFIG_EROFS_FS) += erofs.o -# staging requirement: to be self-contained in its own directory -ccflags-y += -I $(srctree)/$(src)/include erofs-objs := super.o inode.o data.o namei.o dir.o utils.o erofs-$(CONFIG_EROFS_FS_XATTR) += xattr.o erofs-$(CONFIG_EROFS_FS_ZIP) += decompressor.o zmap.o zdata.o
fs/erofs/compress.h renamed from drivers/staging/erofs/compress.h +1 -1
@@ -1,6 +1,6 @@/* SPDX-License-Identifier: GPL-2.0-only */ /* -* linux/drivers/staging/erofs/compress.h +* linux/fs/erofs/compress.h * * Copyright (C) 2019 HUAWEI, Inc. * http://www.huawei.com/
fs/erofs/data.c renamed from drivers/staging/erofs/data.c +1 -1
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0-only /* -* linux/drivers/staging/erofs/data.c +* linux/fs/erofs/data.c * * Copyright (C) 2017-2018 HUAWEI, Inc. * http://www.huawei.com/
fs/erofs/decompressor.c renamed from drivers/staging/erofs/decompressor.c +1 -1
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0-only /* -* linux/drivers/staging/erofs/decompressor.c +* linux/fs/erofs/decompressor.c * * Copyright (C) 2019 HUAWEI, Inc. * http://www.huawei.com/
fs/erofs/dir.c renamed from drivers/staging/erofs/dir.c +1 -1
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0-only /* -* linux/drivers/staging/erofs/dir.c +* linux/fs/erofs/dir.c * * Copyright (C) 2017-2018 HUAWEI, Inc. * http://www.huawei.com/
fs/erofs/erofs_fs.h renamed from drivers/staging/erofs/erofs_fs.h +1 -2
@@ -1,6 +1,6 @@/* SPDX-License-Identifier: GPL-2.0-only OR Apache-2.0 */ /* -* linux/drivers/staging/erofs/erofs_fs.h +* linux/fs/erofs/erofs_fs.h * * Copyright (C) 2017-2018 HUAWEI, Inc. * http://www.huawei.com/
@@ -10,7 +10,6 @@#define __EROFS_FS_H/* Enhanced(Extended) ROM File System */ -#define EROFS_SUPER_MAGIC_V1 0xE0F5E1E2#define EROFS_SUPER_OFFSET 1024/*
fs/erofs/inode.c renamed from drivers/staging/erofs/inode.c +1 -1
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0-only /* -* linux/drivers/staging/erofs/inode.c +* linux/fs/erofs/inode.c * * Copyright (C) 2017-2018 HUAWEI, Inc. * http://www.huawei.com/
fs/erofs/internal.h renamed from drivers/staging/erofs/internal.h +2 -1
@@ -1,6 +1,6 @@/* SPDX-License-Identifier: GPL-2.0-only */ /* -* linux/drivers/staging/erofs/internal.h +* linux/fs/erofs/internal.h * * Copyright (C) 2017-2018 HUAWEI, Inc. * http://www.huawei.com/
@@ -16,6 +16,7 @@#include <linux/bio.h> #include <linux/buffer_head.h> #include <linux/cleancache.h> +#include <linux/magic.h> #include <linux/slab.h> #include <linux/vmalloc.h> #include "erofs_fs.h"
fs/erofs/namei.c renamed from drivers/staging/erofs/namei.c +1 -1
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0-only /* -* linux/drivers/staging/erofs/namei.c +* linux/fs/erofs/namei.c * * Copyright (C) 2017-2018 HUAWEI, Inc. * http://www.huawei.com/
fs/erofs/super.c renamed from drivers/staging/erofs/super.c +1 -1
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0-only /* -* linux/drivers/staging/erofs/super.c +* linux/fs/erofs/super.c * * Copyright (C) 2017-2018 HUAWEI, Inc. * http://www.huawei.com/
fs/erofs/tagptr.h renamed from drivers/staging/erofs/tagptr.h +0 -0
fs/erofs/utils.c renamed from drivers/staging/erofs/utils.c +1 -1
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0-only /* -* linux/drivers/staging/erofs/utils.c +* linux/fs/erofs/utils.c * * Copyright (C) 2018 HUAWEI, Inc. * http://www.huawei.com/
fs/erofs/xattr.c renamed from drivers/staging/erofs/xattr.c +1 -1
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0-only /* -* linux/drivers/staging/erofs/xattr.c +* linux/fs/erofs/xattr.c * * Copyright (C) 2017-2018 HUAWEI, Inc. * http://www.huawei.com/
fs/erofs/xattr.h renamed from drivers/staging/erofs/xattr.h +1 -1
@@ -1,6 +1,6 @@/* SPDX-License-Identifier: GPL-2.0-only */ /* -* linux/drivers/staging/erofs/xattr.h +* linux/fs/erofs/xattr.h * * Copyright (C) 2017-2018 HUAWEI, Inc. * http://www.huawei.com/
fs/erofs/zdata.c renamed from drivers/staging/erofs/zdata.c +1 -1
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0-only /* -* linux/drivers/staging/erofs/zdata.c +* linux/fs/erofs/zdata.c * * Copyright (C) 2018 HUAWEI, Inc. * http://www.huawei.com/
fs/erofs/zdata.h renamed from drivers/staging/erofs/zdata.h +1 -1
@@ -1,6 +1,6 @@/* SPDX-License-Identifier: GPL-2.0-only */ /* -* linux/drivers/staging/erofs/zdata.h +* linux/fs/erofs/zdata.h * * Copyright (C) 2018 HUAWEI, Inc. * http://www.huawei.com/
fs/erofs/zmap.c renamed from drivers/staging/erofs/zmap.c +1 -1
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0-only /* -* linux/drivers/staging/erofs/zmap.c +* linux/fs/erofs/zmap.c * * Copyright (C) 2018-2019 HUAWEI, Inc. * http://www.huawei.com/
fs/erofs/zpvec.h renamed from drivers/staging/erofs/zpvec.h +1 -1
@@ -1,6 +1,6 @@/* SPDX-License-Identifier: GPL-2.0-only */ /* -* linux/drivers/staging/erofs/zpvec.h +* linux/fs/erofs/zpvec.h * * Copyright (C) 2018 HUAWEI, Inc. * http://www.huawei.com/
include/trace/events/erofs.h renamed from drivers/staging/erofs/include/trace/events/erofs.h +0 -0
include/uapi/linux/magic.h +1 -0
@@ -19,6 +19,7 @@#define SQUASHFS_MAGIC 0x73717368#define ECRYPTFS_SUPER_MAGIC 0xf15f#define EFS_SUPER_MAGIC 0x414A53 +#define EROFS_SUPER_MAGIC_V1 0xE0F5E1E2#define EXT2_SUPER_MAGIC 0xEF53#define EXT3_SUPER_MAGIC 0xEF53#define XENFS_SUPER_MAGIC 0xabba1974
Signature · 1 line
2.17.1
Hi Gao,
One small suggestion: just remove the file names from the comments at the top of the files rather than change them to reflect that they have moved. We can usually tell the name of a file by its name :-)
Signature · 9 lines
Cheers, Stephen Rothwell -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: <http://lists.ozlabs.org/pipermail/linux-erofs/attachments/20190807/2b9b64e5/attachment.sig>
Hi Stephen,
Quoted 5 lines · Stephen Rothwell
Hi Gao,
One small suggestion: just remove the file names from the comments at the top of the files rather than change them to reflect that they have moved. We can usually tell the name of a file by its name :-)
Thanks for your reply :)
For this part, EROFS initially followed what ext4, f2fs, even fsverity do,
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/ext4/namei.c
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/f2fs/namei.c
https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/tree/fs/verity/verify.c?h=fsverity
I think I can remove these filenames as you suggested in the next version. I thought these are some common practice and there is no obvious right or wrong of this kind of stuffs.
Thanks,
Gao Xiang
Quoted 4 lines
Signature · 3 lines
-- Cheers, Stephen Rothwell
Hi Gao,
Quoted 9 lines · On Wed, 7 Aug 2019 01:02:58 +0800 Gao Xiang <[email protected]> wrote:
Quoted 4 lines · Stephen Rothwell
One small suggestion: just remove the file names from the comments at the top of the files rather than change them to reflect that they have moved. We can usually tell the name of a file by its name :-)
Thanks for your reply :)
Quoted 8 lines
For this part, EROFS initially followed what ext4, f2fs, even fsverity do,
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/ext4/namei.c
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/f2fs/namei.c
https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/tree/fs/verity/verify.c?h=fsverityI think I can remove these filenames as you suggested in the next version. I thought these are some common practice and there is no obvious right or wrong of this kind of stuffs.
Fair enough.
Signature · 9 lines
Cheers, Stephen Rothwell -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: <http://lists.ozlabs.org/pipermail/linux-erofs/attachments/20190807/d77e073c/attachment.sig>