Skip to content

Commit 68182d3

Browse files
Update APFS driver to v0.3.17-2
1 parent f32e738 commit 68182d3

File tree

2 files changed

+48
-20
lines changed

2 files changed

+48
-20
lines changed

8001-Add-APFS-driver.patch

Lines changed: 46 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
From 7e8a7ff83e6fb74997a3b7e0e53f5c471986664a Mon Sep 17 00:00:00 2001
1+
From 7c0d9187ec318852caaf61e1da26f23da4ed5c47 Mon Sep 17 00:00:00 2001
22
From: "github-actions[bot]"
33
<41898282+github-actions[bot]@users.noreply.github.com>
4-
Date: Thu, 27 Nov 2025 18:50:01 +0000
4+
Date: Wed, 31 Dec 2025 18:53:11 +0000
55
Subject: [PATCH] Add APFS driver
66

77
---
88
fs/apfs/Makefile | 28 +
9-
fs/apfs/apfs.h | 1316 ++++++++++++
9+
fs/apfs/apfs.h | 1343 ++++++++++++
1010
fs/apfs/apfs_raw.h | 1570 ++++++++++++++
1111
fs/apfs/btree.c | 1174 +++++++++++
1212
fs/apfs/compress.c | 478 +++++
13-
fs/apfs/dir.c | 1504 ++++++++++++++
13+
fs/apfs/dir.c | 1505 ++++++++++++++
1414
fs/apfs/extents.c | 2374 ++++++++++++++++++++++
1515
fs/apfs/file.c | 224 ++
1616
fs/apfs/inode.c | 2594 ++++++++++++++++++++++++
@@ -39,7 +39,7 @@ Subject: [PATCH] Add APFS driver
3939
fs/apfs/version.h | 1 +
4040
fs/apfs/xattr.c | 914 +++++++++
4141
fs/apfs/xfield.c | 171 ++
42-
34 files changed, 26938 insertions(+)
42+
34 files changed, 26966 insertions(+)
4343
create mode 100644 fs/apfs/Makefile
4444
create mode 100644 fs/apfs/apfs.h
4545
create mode 100644 fs/apfs/apfs_raw.h
@@ -111,10 +111,10 @@ index 000000000..a2dbed980
111111
+ make -C $(KERNEL_DIR) M=$(PWD) clean
112112
diff --git a/fs/apfs/apfs.h b/fs/apfs/apfs.h
113113
new file mode 100644
114-
index 000000000..5b65bf50b
114+
index 000000000..5a729fca7
115115
--- /dev/null
116116
+++ b/fs/apfs/apfs.h
117-
@@ -0,0 +1,1316 @@
117+
@@ -0,0 +1,1343 @@
118118
+/* SPDX-License-Identifier: GPL-2.0-only */
119119
+/*
120120
+ * Copyright (C) 2018 Ernesto A. Fernández <[email protected]>
@@ -1333,6 +1333,33 @@ index 000000000..5b65bf50b
13331333
+#define page_has_buffers(page) folio_buffers(page_folio(page))
13341334
+#endif
13351335
+
1336+
+static inline int apfs_inode_state_read_once(struct inode *inode)
1337+
+{
1338+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 19, 0)
1339+
+ return inode_state_read_once(inode);
1340+
+#else
1341+
+ return inode->i_state;
1342+
+#endif
1343+
+}
1344+
+
1345+
+static inline void apfs_inode_state_set_raw(struct inode *inode, int flags)
1346+
+{
1347+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 19, 0)
1348+
+ inode_state_set_raw(inode, flags);
1349+
+#else
1350+
+ inode->i_state |= flags;
1351+
+#endif
1352+
+}
1353+
+
1354+
+static inline void apfs_inode_state_clear_raw(struct inode *inode, int flags)
1355+
+{
1356+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 19, 0)
1357+
+ inode_state_clear_raw(inode, flags);
1358+
+#else
1359+
+ inode->i_state &= ~flags;
1360+
+#endif
1361+
+}
1362+
+
13361363
+/*
13371364
+ * TODO: the following are modified variants of buffer head functions that will
13381365
+ * work with the shared block device for the container. The correct approach
@@ -4673,10 +4700,10 @@ index 000000000..2e05e7a02
46734700
+}
46744701
diff --git a/fs/apfs/dir.c b/fs/apfs/dir.c
46754702
new file mode 100644
4676-
index 000000000..bc86e2ceb
4703+
index 000000000..01f409b45
46774704
--- /dev/null
46784705
+++ b/fs/apfs/dir.c
4679-
@@ -0,0 +1,1504 @@
4706+
@@ -0,0 +1,1505 @@
46804707
+// SPDX-License-Identifier: GPL-2.0-only
46814708
+/*
46824709
+ * Copyright (C) 2018 Ernesto A. Fernández <[email protected]>
@@ -5934,9 +5961,10 @@ index 000000000..bc86e2ceb
59345961
+{
59355962
+ struct inode *inode = d_inode(dentry);
59365963
+
5937-
+ inode->i_state |= I_LINKABLE; /* Silence warning about nlink 0->1 */
5964+
+ /* Silence warning about nlink 0->1 */
5965+
+ apfs_inode_state_set_raw(inode, I_LINKABLE);
59385966
+ inc_nlink(inode);
5939-
+ inode->i_state &= ~I_LINKABLE;
5967+
+ apfs_inode_state_clear_raw(inode, I_LINKABLE);
59405968
+
59415969
+ apfs_undo_delete_dentry(dentry);
59425970
+}
@@ -8793,7 +8821,7 @@ index 000000000..3e8a55897
87938821
+};
87948822
diff --git a/fs/apfs/inode.c b/fs/apfs/inode.c
87958823
new file mode 100644
8796-
index 000000000..38f429956
8824+
index 000000000..6e38e05ad
87978825
--- /dev/null
87988826
+++ b/fs/apfs/inode.c
87998827
@@ -0,0 +1,2594 @@
@@ -9836,7 +9864,7 @@ index 000000000..38f429956
98369864
+ inode = apfs_iget_locked(sb, cnid);
98379865
+ if (!inode)
98389866
+ return ERR_PTR(-ENOMEM);
9839-
+ if (!(inode->i_state & I_NEW))
9867+
+ if (!(apfs_inode_state_read_once(inode) & I_NEW))
98409868
+ return inode;
98419869
+
98429870
+ down_read(&nxi->nx_big_sem);
@@ -21880,7 +21908,7 @@ index 000000000..be4f9df8f
2188021908
+};
2188121909
diff --git a/fs/apfs/transaction.c b/fs/apfs/transaction.c
2188221910
new file mode 100644
21883-
index 000000000..3fea8d5fe
21911+
index 000000000..e743ccb0b
2188421912
--- /dev/null
2188521913
+++ b/fs/apfs/transaction.c
2188621914
@@ -0,0 +1,1034 @@
@@ -22354,7 +22382,7 @@ index 000000000..3fea8d5fe
2235422382
+ curr_err = apfs_update_inode(inode, NULL /* new_name */);
2235522383
+ if (curr_err)
2235622384
+ err = curr_err;
22357-
+ inode->i_state &= ~I_DIRTY_ALL;
22385+
+ apfs_inode_state_clear_raw(inode, I_DIRTY_ALL);
2235822386
+
2235922387
+ /*
2236022388
+ * The same inode may get dirtied again as soon as we release
@@ -26115,11 +26143,11 @@ index 000000000..e3b7edc51
2611526143
+#endif /* _APFS_UNICODE_H */
2611626144
diff --git a/fs/apfs/version.h b/fs/apfs/version.h
2611726145
new file mode 100644
26118-
index 000000000..4cdeb4fc4
26146+
index 000000000..e16b23c10
2611926147
--- /dev/null
2612026148
+++ b/fs/apfs/version.h
2612126149
@@ -0,0 +1 @@
26122-
+#define GIT_COMMIT "v0.3.17"
26150+
+#define GIT_COMMIT ""
2612326151
diff --git a/fs/apfs/xattr.c b/fs/apfs/xattr.c
2612426152
new file mode 100644
2612526153
index 000000000..c21b8e469
@@ -27218,5 +27246,5 @@ index 000000000..b8cbe17fd
2721827246
+ return total_len;
2721927247
+}
2722027248
--
27221-
2.51.2
27249+
2.52.0
2722227250

apfs_ver

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
CURRENT_HASH=de721cd995945ff4f1be6aa628c8e7aee1cb5151
2-
RELEASE_VER=0.3.17-1
1+
CURRENT_HASH=a3bca211bdb596c768ae5114d6e5ea527aa181b9
2+
RELEASE_VER=0.3.17-2

0 commit comments

Comments
 (0)