-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
893b47a
commit 41b6962
Showing
2 changed files
with
29 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
From 9ce966383303f8fac62b691711c6ac92fde2bbcc Mon Sep 17 00:00:00 2001 | ||
From 2d93a3f060b81534c1cc61054c0720a596f13877 Mon Sep 17 00:00:00 2001 | ||
From: "github-actions[bot]" | ||
<41898282+github-actions[bot]@users.noreply.github.com> | ||
Date: Sat, 2 Nov 2024 09:25:52 +0000 | ||
Date: Sat, 9 Nov 2024 18:42:11 +0000 | ||
Subject: [PATCH] Add APFS driver | ||
|
||
--- | ||
fs/apfs/Makefile | 23 + | ||
fs/apfs/Makefile | 28 + | ||
fs/apfs/apfs.h | 1191 ++++++++++ | ||
fs/apfs/apfs_raw.h | 1562 +++++++++++++ | ||
fs/apfs/btree.c | 1174 ++++++++++ | ||
|
@@ -38,15 +38,15 @@ Subject: [PATCH] Add APFS driver | |
fs/apfs/object.c | 315 +++ | ||
fs/apfs/snapshot.c | 681 ++++++ | ||
fs/apfs/spaceman.c | 1433 ++++++++++++ | ||
fs/apfs/super.c | 1955 +++++++++++++++++ | ||
fs/apfs/super.c | 1961 +++++++++++++++++ | ||
fs/apfs/symlink.c | 80 + | ||
fs/apfs/transaction.c | 988 +++++++++ | ||
fs/apfs/unicode.c | 3156 +++++++++++++++++++++++++++ | ||
fs/apfs/unicode.h | 27 + | ||
fs/apfs/version.h | 1 + | ||
fs/apfs/xattr.c | 922 ++++++++ | ||
fs/apfs/xfield.c | 171 ++ | ||
41 files changed, 29349 insertions(+) | ||
41 files changed, 29360 insertions(+) | ||
create mode 100644 fs/apfs/Makefile | ||
create mode 100644 fs/apfs/apfs.h | ||
create mode 100644 fs/apfs/apfs_raw.h | ||
|
@@ -91,10 +91,10 @@ Subject: [PATCH] Add APFS driver | |
|
||
diff --git a/fs/apfs/Makefile b/fs/apfs/Makefile | ||
new file mode 100644 | ||
index 000000000..ab4c49d55 | ||
index 000000000..a2dbed980 | ||
--- /dev/null | ||
+++ b/fs/apfs/Makefile | ||
@@ -0,0 +1,23 @@ | ||
@@ -0,0 +1,28 @@ | ||
+# SPDX-License-Identifier: GPL-2.0-only | ||
+# | ||
+# Makefile for the out-of-tree Linux APFS module. | ||
|
@@ -110,6 +110,11 @@ index 000000000..ab4c49d55 | |
+ lzfse/lzvn_decode_base.o message.o namei.o node.o object.o snapshot.o \ | ||
+ spaceman.o super.o symlink.o transaction.o unicode.o xattr.o xfield.o | ||
+ | ||
+# If you want mounts to be writable by default, run the build as: | ||
+# make CONFIG=-DCONFIG_APFS_RW_ALWAYS | ||
+# This is risky and not generally recommended. | ||
+ccflags-y += $(CONFIG) | ||
+ | ||
+default: | ||
+ ./genver.sh | ||
+ make -C $(KERNEL_DIR) M=$(PWD) | ||
|
@@ -22338,10 +22343,10 @@ index 000000000..7667f8733 | |
+} | ||
diff --git a/fs/apfs/super.c b/fs/apfs/super.c | ||
new file mode 100644 | ||
index 000000000..2d3a5df93 | ||
index 000000000..8fe9fac6d | ||
--- /dev/null | ||
+++ b/fs/apfs/super.c | ||
@@ -0,0 +1,1955 @@ | ||
@@ -0,0 +1,1961 @@ | ||
+// SPDX-License-Identifier: GPL-2.0-only | ||
+/* | ||
+ * Copyright (C) 2018 Ernesto A. Fernández <[email protected]> | ||
|
@@ -22459,6 +22464,12 @@ index 000000000..2d3a5df93 | |
+ msb_raw = (struct apfs_nx_superblock *)bh->b_data; | ||
+ blocksize = le32_to_cpu(msb_raw->nx_block_size); | ||
+ | ||
+ sb->s_magic = le32_to_cpu(msb_raw->nx_magic); | ||
+ if (sb->s_magic != APFS_NX_MAGIC) { | ||
+ apfs_warn(sb, "not an apfs container - are you mounting the right partition?"); | ||
+ goto fail; | ||
+ } | ||
+ | ||
+ if (sb->s_blocksize != blocksize) { | ||
+ brelse(bh); | ||
+ | ||
|
@@ -22474,11 +22485,6 @@ index 000000000..2d3a5df93 | |
+ msb_raw = (struct apfs_nx_superblock *)bh->b_data; | ||
+ } | ||
+ | ||
+ sb->s_magic = le32_to_cpu(msb_raw->nx_magic); | ||
+ if (sb->s_magic != APFS_NX_MAGIC) { | ||
+ apfs_err(sb, "not an apfs filesystem"); | ||
+ goto fail; | ||
+ } | ||
+ if (!apfs_obj_verify_csum(sb, bh)) | ||
+ apfs_notice(sb, "backup superblock seems corrupted"); | ||
+ return bh; | ||
|
@@ -23537,6 +23543,11 @@ index 000000000..2d3a5df93 | |
+ /* Set default values before parsing */ | ||
+ nx_flags = 0; | ||
+ | ||
+#ifdef CONFIG_APFS_RW_ALWAYS | ||
+ /* Still risky, but some packagers want writable mounts by default */ | ||
+ nx_flags |= APFS_READWRITE; | ||
+#endif | ||
+ | ||
+ if (!options) | ||
+ goto out; | ||
+ | ||
|
@@ -28574,11 +28585,11 @@ index 000000000..e3b7edc51 | |
+#endif /* _APFS_UNICODE_H */ | ||
diff --git a/fs/apfs/version.h b/fs/apfs/version.h | ||
new file mode 100644 | ||
index 000000000..68cc43af9 | ||
index 000000000..e16b23c10 | ||
--- /dev/null | ||
+++ b/fs/apfs/version.h | ||
@@ -0,0 +1 @@ | ||
+#define GIT_COMMIT "v0.3.12" | ||
+#define GIT_COMMIT "" | ||
diff --git a/fs/apfs/xattr.c b/fs/apfs/xattr.c | ||
new file mode 100644 | ||
index 000000000..0de1db140 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
CURRENT_HASH=5a2db9bd684233f2513bfaa6eca725b274e285a8 | ||
RELEASE_VER=0.3.12-1 | ||
CURRENT_HASH=1643ae2688d78568d2a9a8f44b9f8580c03fef55 | ||
RELEASE_VER=0.3.12-2 |