Skip to content

Commit

Permalink
Update APFS driver to v0.3.10-2
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jul 31, 2024
1 parent b3628f2 commit d083830
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 11 deletions.
39 changes: 30 additions & 9 deletions 8001-Add-APFS-driver.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From c28b830fa91f07b7dd1874fae7f41b329d1c4ce0 Mon Sep 17 00:00:00 2001
From b39e97f674ca3007d01ab898b282c6c626561212 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Tue, 16 Jul 2024 18:41:31 +0000
Date: Wed, 31 Jul 2024 18:42:17 +0000
Subject: [PATCH] Add APFS driver

---
Expand Down Expand Up @@ -40,13 +40,13 @@ Subject: [PATCH] Add APFS driver
fs/apfs/spaceman.c | 1305 +++++++++++
fs/apfs/super.c | 1795 +++++++++++++++
fs/apfs/symlink.c | 80 +
fs/apfs/transaction.c | 976 +++++++++
fs/apfs/transaction.c | 997 +++++++++
fs/apfs/unicode.c | 3157 +++++++++++++++++++++++++++
fs/apfs/unicode.h | 27 +
fs/apfs/version.h | 1 +
fs/apfs/xattr.c | 922 ++++++++
fs/apfs/xfield.c | 171 ++
41 files changed, 29015 insertions(+)
41 files changed, 29036 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 @@ -24062,10 +24062,10 @@ index 000000000..be4f9df8f
+};
diff --git a/fs/apfs/transaction.c b/fs/apfs/transaction.c
new file mode 100644
index 000000000..ab0d51d2d
index 000000000..7dbd7850a
--- /dev/null
+++ b/fs/apfs/transaction.c
@@ -0,0 +1,976 @@
@@ -0,0 +1,997 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2019 Ernesto A. Fernández <[email protected]>
Expand Down Expand Up @@ -24750,7 +24750,11 @@ index 000000000..ab0d51d2d
+ }
+ list_for_each_entry_safe(bhi, tmp, &nx_trans->t_buffers, list) {
+ struct buffer_head *bh = bhi->bh;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
+ struct folio *folio = NULL;
+#else
+ struct page *page = NULL;
+#endif
+ bool is_metadata;
+
+ ASSERT(buffer_trans(bh));
Expand All @@ -24770,27 +24774,44 @@ index 000000000..ab0d51d2d
+ kfree(bhi);
+ bhi = NULL;
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
+ folio = page_folio(bh->b_page);
+ folio_get(folio);
+#else
+ page = bh->b_page;
+ get_page(page);
+#endif
+
+ is_metadata = buffer_csum(bh);
+ clear_buffer_csum(bh);
+ put_bh(bh);
+ bh = NULL;
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
+ folio_lock(folio);
+ folio_mkclean(folio);
+#else
+ /* Future writes to mmapped areas should fault for CoW */
+ lock_page(page);
+ page_mkclean(page);
+#endif
+ /* XXX: otherwise, the page cache fills up and crashes the machine */
+ if (!is_metadata) {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
+ try_to_free_buffers(folio);
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
+ try_to_free_buffers(page_folio(page));
+#else
+ try_to_free_buffers(page);
+#endif
+ }
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
+ folio_unlock(folio);
+ folio_put(folio);
+#else
+ unlock_page(page);
+ put_page(page);
+#endif
+ }
+ err = apfs_checkpoint_end(sb);
+ if (err) {
Expand Down Expand Up @@ -28240,11 +28261,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..3a8789fc1
index 000000000..e16b23c10
--- /dev/null
+++ b/fs/apfs/version.h
@@ -0,0 +1 @@
+#define GIT_COMMIT "v0.3.10"
+#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=695455bfdb5e97155c377dae2b28d90ff7bb8fe9
RELEASE_VER=0.3.10-1
CURRENT_HASH=707d91b48603ce0832d863945bb845df799945af
RELEASE_VER=0.3.10-2

0 comments on commit d083830

Please sign in to comment.