Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any plans for upstream? #68

Open
AdityaGarg8 opened this issue Jun 9, 2024 · 7 comments
Open

Any plans for upstream? #68

AdityaGarg8 opened this issue Jun 9, 2024 · 7 comments

Comments

@AdityaGarg8
Copy link

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.
@eafer
Copy link
Member

eafer commented Jun 9, 2024

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.

@eafer
Copy link
Member

eafer commented Jun 9, 2024

I found this old commit from the original repo:

linux-apfs/linux-apfs@885a04c

I guess you also need to select NLS.

@AdityaGarg8
Copy link
Author

Thanks for the reply!

@AdityaGarg8
Copy link
Author

AdityaGarg8 commented Jun 10, 2024

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

@eafer
Copy link
Member

eafer commented Jun 12, 2024

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.

@AdityaGarg8 AdityaGarg8 reopened this Jun 12, 2024
@AdityaGarg8
Copy link
Author

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

@AdityaGarg8
Copy link
Author

AdityaGarg8 commented Jun 12, 2024

# 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants