Skip to content

Any plans for upstream? #68

Open
Open

Description

@AdityaGarg8

Hi

I really appreciate your work. I was wondering whether there are plans for upstreaming this driver? Although as far as I understand, since the code of lzfse is not GPL, I guess it won't.

Anyways, I compile my own kernels for the purpose of running Linux on my Mac, and the read support of your driver is quite useful. I now add your driver in my kernel itself. Although, it compiles well, I wanted to know the exact kconfig of this driver that I should use.

My current config is below:

# SPDX-License-Identifier: GPL-2.0-only
config APFS_FS
	tristate "Apple file system support"
	select CRYPTO
	select CRYPTO_CRC32C
	select LIBCRC32C
	select CRYPTO_XXHASH
	select CRYPTO_SHA256
	select CRYPTO_BLAKE2B
	select BUFFER_HEAD
	select FS_IOMAP
	select LEGACY_DIRECT_IO
	help
	  If you say Y here, you will be able to mount APFS partitions
	  with read-only access. Write access is experimental and will
	  corrupt your container.

Activity

  1. eafer commented on Jun 9, 2024

    @eafer
    Member

    I was wondering whether there are plans for upstreaming this driver?

    This question has come up before. The situation has not changed that much. At the very least I would need to fix the locking and handle ENOSPC better. But I don't expect upstream to be all that interested.

    the code of lzfse is not GPL

    It's under the 3-clause bsd license, which is compatible with the gpl. The real problem with the lzfse code is that it triggers an objtool warning, probably because of all the crazy gotos.

    I wanted to know the exact kconfig

    Frankly I have no idea. I only build out of tree these days, and always for standard distro kernels. I'm sure you at least need to select ZLIB_INFLATE as well.

  2. eafer commented on Jun 9, 2024

    @eafer
    Member

    I found this old commit from the original repo:

    linux-apfs/linux-apfs@885a04c

    I guess you also need to select NLS.

  3. AdityaGarg8 commented on Jun 9, 2024

    @AdityaGarg8
    ContributorAuthor

    Thanks for the reply!

  4. AdityaGarg8 commented on Jun 10, 2024

    @AdityaGarg8
    ContributorAuthor

    As a last question @eafer , anything in the kconfig above which you feel is absolutely unnecessary

  5. eafer commented on Jun 12, 2024

    @eafer
    Member

    You can leave this open if you prefer, I do need to think about Kconfig eventually. As for your question, I don't think we use any of the crypto hashes you selected right now, only crc32c.

  6. AdityaGarg8 commented on Jun 12, 2024

    @AdityaGarg8
    ContributorAuthor

    You can leave this open if you prefer, I do need to think about Kconfig eventually. As for your question, I don't think we use any of the crypto hashes you selected right now, only crc32c.

    Alright, I'll reopened

  7. AdityaGarg8 commented on Jun 12, 2024

    @AdityaGarg8
    ContributorAuthor
    # SPDX-License-Identifier: GPL-2.0-only
    config APFS_FS
    	tristate "Apple file system support"
    	select LIBCRC32C
    	select ZLIB_INFLATE
    	select NLS
    	select BUFFER_HEAD
    	select FS_IOMAP
    	select LEGACY_DIRECT_IO
    	help
    	  If you say Y here, you will be able to mount APFS partitions
    	  with read-only access. Write access is experimental and will
    	  corrupt your container.
    

    I settled with this

  8. ethancedwards8 commented on Jan 22, 2025

    @ethancedwards8

    @eafer . I would be more than happy to collaborate with you on upstreaming this. I wouldn't mind handling all of the grunt work/bouncing it off the mailing list if you would help me test/help review it once I have a working setup.

  9. eafer commented on Jan 23, 2025

    @eafer
    Member

    @ethancedwards8 I don't see it happening at this point, the upstream filesystem people are very demanding (which is reasonable because a bad filesystem can do a lot of damage). At the very least I would need to get rid of buffer heads first, and I haven't even looked into that.

  10. eafer commented on Jun 26, 2026

    @eafer
    Member

    I'm seeing some traffic to this issue, so for the record: upstream is no longer interested in picking up new filesystems without a good reason, so I don't plan to ever submit it myself. The code has all the proper signoffs and everything though, so I can't/won't stop others from trying if they want to, like Ethan did last year.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions