8 Commits

Author SHA1 Message Date
Luflosi c2e90ebe64 Allow changing KERNEL_DIR (#8)
Allow building in a different directory.
This is useful on NixOS, where all software is stored under /nix.
As a nice side-effect, this change also reduces code duplication a little.
2021-04-19 19:31:58 -03:00
sperg 32e79a6925 Fix build for Linux 5.8
mpage_readpages doesn't seem to be present in version 5.8 of the kernel,
so this fixes building for it.

[ernesto.mnd.fernandez@gmail.com: fixed whitespace and added comments]
2020-08-05 20:59:22 -03:00
Ernesto A. Fernández 2a598f1433 Fix reading of large directories
A single call to apfs_readdir() is not necessarily enough to list a
whole directory; ctx->pos tries to keep track of the last dentry found,
so that the next call can continue from the same spot.

Now that the module can create large numbers of files, it has become
obvious that this doesn't work: many files are missing from the ls
output for big directories.  The bug is very simple: ctx->pos is being
incremented twice for each new record.  Remove one of the increments.

This patch is a backport of commit 39e4474396cd ("apfs: fix reading of
large directories") from the development tree, so it will be dropped for
the next "release".  From now on this branch can be considered stable.

Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
2019-10-13 16:07:03 -03:00
Chih-Hsuan Yen 277a34e048 Allow using this tree with dkms
* Add dkms.conf
* Make Makefile dkms-friendly
2019-08-25 18:56:38 -03:00
Ernesto A. Fernández 6269eeda47 Add a CONTRIBUTING file
Add a short CONTRIBUTING file explaining that development is done via
email.  Github should show this to users before they open issues or pull
requests.

Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
2019-06-05 21:08:40 -03:00
Ernesto A. Fernández 990444da8d Replace 'SUBDIRS' with 'M' in Makefile
When the module is built under Linux 5.0, a warning is given about the
use of 'SUBDIRS'.  Replace it with 'M', as the message suggests.

Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
2019-03-07 11:56:09 -03:00
Ernesto A. Fernández 50dba078e8 Support symlinks in kernels that expect .readlink
Starting with kernel version 4.10, a NULL value for the ->readlink()
method defaults to generic_readlink(), or to a similar codepath.  For
older kernels this field must be set explicitly, otherwise the readlink
syscall will fail.

Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
2019-03-03 21:49:43 -03:00
Ernesto A. Fernández 72e6425af6 Set up a standalone repository for the APFS module
Copy the code of the APFS module into its own repository, without the
rest of the kernel tree.  Development will continue upstream, but the
intention is to make life easier for potential users.

To get the module to build independently, rewrite the Makefile and
add a definition for the APFS_SUPER_MAGIC macro.  Since the intention is
to support a range of kernel versions, use preprocessor checks to handle
kernels without statx, without iversion, and without SB_RDONLY.

Provide a README file based on the upstream documentation, but with
additional build and mount instructions.  Add a LICENSE file as well.

Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
2019-03-03 17:29:23 -03:00