Skip to content

Commit

Permalink
Update APFS driver to v0.3.12-2
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 9, 2024
1 parent 893b47a commit 41b6962
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 18 deletions.
43 changes: 27 additions & 16 deletions 8001-Add-APFS-driver.patch
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 ++++++++++
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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)
Expand Down Expand Up @@ -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]>
Expand Down Expand Up @@ -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);
+
Expand All @@ -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;
Expand Down Expand Up @@ -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;
+
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions apfs_ver
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

0 comments on commit 41b6962

Please sign in to comment.