From bf65e0596a57cbe2358ea56f168bdbe4f43fe8c7 Mon Sep 17 00:00:00 2001 From: shadichy Date: Sun, 2 Nov 2025 15:45:42 +0700 Subject: [PATCH] Updated patches for Backport to 6.12 Signed-off-by: shadichy --- .SRCINFO | 18 ++- ...e.c-Resolve-import-for-inode_generic.patch | 4 +- ...-iomap_-arguments-temporarily-for-ke.patch | 4 +- ...t-ntfs_iomap.c-functions-to-kernels-.patch | 4 +- ...Using-mmap-instead-of-mmap_prepare-f.patch | 6 +- ...s.c-using-page-index-instead-of-page.patch | 6 +- ...iomap_zero_range-iomap_page_mkwrite-.patch | 145 ++++++++++++++++++ ...t-ntfs_mkdir-for-kernels-older-than-.patch | 76 +++++++++ ...t-_ntfs_finish_ioend_buffered-and-nt.patch | 123 +++++++++++++++ PKGBUILD | 20 ++- 10 files changed, 381 insertions(+), 25 deletions(-) create mode 100644 0006-ntfsplus-Update-iomap_zero_range-iomap_page_mkwrite-.patch create mode 100644 0007-ntfsplus-Backport-ntfs_mkdir-for-kernels-older-than-.patch create mode 100644 0008-ntfsplus-Backport-_ntfs_finish_ioend_buffered-and-nt.patch diff --git a/.SRCINFO b/.SRCINFO index 68d00cedeb37..6793bdaeaa0f 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,6 +1,6 @@ pkgbase = ntfsplus-dkms-git pkgdesc = A new NTFS driver for Linux promised to be better than NTFS3. These patches are directly taken from the maintainer's mailing list posts. Backported to 6.17. - pkgver = 2025.10.20.r32.d76784df4 + pkgver = 2025.10.20.r35.8d8af2b59 pkgrel = 1 url = https://lore.kernel.org/all/20251020021227.5965-6-linkinjeon@kernel.org arch = any @@ -17,17 +17,23 @@ pkgbase = ntfsplus-dkms-git source = 0003-ntfsplus-Backport-ntfs_iomap.c-functions-to-kernels-.patch source = 0004-ntfsplus-file.c-Using-mmap-instead-of-mmap_prepare-f.patch source = 0005-ntfsplus-compress.c-using-page-index-instead-of-page.patch + source = 0006-ntfsplus-Update-iomap_zero_range-iomap_page_mkwrite-.patch + source = 0007-ntfsplus-Backport-ntfs_mkdir-for-kernels-older-than-.patch + source = 0008-ntfsplus-Backport-_ntfs_finish_ioend_buffered-and-nt.patch source = 0099-fs-ntfsplus-Makefile-DKMS-patch.patch source = dkms.conf source = 90-udev-prefer-ntfsplus.rules sha256sums = SKIP sha256sums = 03b57c05e6f9fbf5b5bf34507aa212f6491967f21c53a73352e7f78ebfaf66a8 sha256sums = bede30ed663dada47c946f74a314b8e25817c4cd8b6c39e0cd5810bbd1cddca2 - sha256sums = 13f17e71c2c81332c3931ff587cc6224a65a5c670e15ba318fb48e3271cdc17a - sha256sums = db0add66c82e5709cc3c96940dbb9dedeedebd60756eac47a01f97e55259be8c - sha256sums = 628687495499e6ab9269a6c27271061e417825fddfa77603902cbf931c34131c - sha256sums = f32e8cbb55c2799be918fed82037baf56b7ac31ad3c1b11b330ceaeb64893904 - sha256sums = d3935300534ce7b8f548c27c5376d110f8fce283e727cc51bdf4042ea01fe8f9 + sha256sums = dd682c4ac17dd2b6cf83b1c9bb72054fe80b3ebfe2811759cacce3f238194435 + sha256sums = e2076bb0aa0ee00b52a07f6158028023af5bcbff9c47060cad35bd37675da841 + sha256sums = b4ebc8c9a4db7293f293a8276f70dc4a7799812a9a73d681b3b732a0beaaa326 + sha256sums = 1fcc9a36238d5aa779b8a1b1171c5f2a6b493f5eedaa30815e3793afe68be653 + sha256sums = 6a7dd17acf94f2741105c45acc53b04bfe0fd13b9f3c3b79bf4e533db78f7262 + sha256sums = 1624bf66ab17ed7fd564ad83b01b172b27dad02087f1e28c024f89024d71ec2a + sha256sums = 3b6f8efd31053e1bdba0a149a97ba2cab9fa7a841b73e08f09116edcbef4971c + sha256sums = 9d75ed62e696e295140c7e61c1e8e781a619406cab9f60f51393dfb763bfd33d sha256sums = e217fa145f507b1e07e228e746528554f705f44fd5744f293b302b29df764b96 sha256sums = ed9db8ec0caa09c977529c7ae89b808ee8c238331ec0fdf873525c115fcdfb7c sha256sums = e3866cac3d71da15740159c89b233d4d1f61981dbf737d4e3bc9a4c56bfa24be diff --git a/0001-fs-ntfsplus-inode.c-Resolve-import-for-inode_generic.patch b/0001-fs-ntfsplus-inode.c-Resolve-import-for-inode_generic.patch index 00df3acd318a..05c4be5a2a3f 100644 --- a/0001-fs-ntfsplus-inode.c-Resolve-import-for-inode_generic.patch +++ b/0001-fs-ntfsplus-inode.c-Resolve-import-for-inode_generic.patch @@ -1,7 +1,7 @@ -From addb62412e538ac3e6c46285c5fe392c3e32e523 Mon Sep 17 00:00:00 2001 +From 1198732f210e77e64664214091e57f445c519a6b Mon Sep 17 00:00:00 2001 From: shadichy Date: Thu, 23 Oct 2025 01:19:10 +0700 -Subject: [PATCH 1/5] fs/ntfsplus/inode.c: Resolve import for +Subject: [PATCH 1/8] fs/ntfsplus/inode.c: Resolve import for inode_generic_drop (temporarily) for kernels older than 6.18 --- diff --git a/0002-ntfsplus-Resolve-iomap_-arguments-temporarily-for-ke.patch b/0002-ntfsplus-Resolve-iomap_-arguments-temporarily-for-ke.patch index 70cac1367903..2349cdf38fd2 100644 --- a/0002-ntfsplus-Resolve-iomap_-arguments-temporarily-for-ke.patch +++ b/0002-ntfsplus-Resolve-iomap_-arguments-temporarily-for-ke.patch @@ -1,7 +1,7 @@ -From a6d86e81b1193f8a5efa4cfd7fdcc206d6ec77fe Mon Sep 17 00:00:00 2001 +From d43da5e38d8b88cac71e06f9fe32c8cb731b1a3d Mon Sep 17 00:00:00 2001 From: shadichy Date: Fri, 24 Oct 2025 01:48:52 +0700 -Subject: [PATCH 2/5] ntfsplus: Resolve iomap_* arguments (temporarily) for +Subject: [PATCH 2/8] ntfsplus: Resolve iomap_* arguments (temporarily) for kernel older than 6.17 --- diff --git a/0003-ntfsplus-Backport-ntfs_iomap.c-functions-to-kernels-.patch b/0003-ntfsplus-Backport-ntfs_iomap.c-functions-to-kernels-.patch index 98f4465bcce0..8f9d63606ace 100644 --- a/0003-ntfsplus-Backport-ntfs_iomap.c-functions-to-kernels-.patch +++ b/0003-ntfsplus-Backport-ntfs_iomap.c-functions-to-kernels-.patch @@ -1,7 +1,7 @@ -From 5d4d8d657172d010a4bc953f600c0f40ce86a3ab Mon Sep 17 00:00:00 2001 +From 39b4718e8057dbee6c5f4b9ea9fbbf42f9ebec7a Mon Sep 17 00:00:00 2001 From: shadichy Date: Sun, 2 Nov 2025 03:43:12 +0700 -Subject: [PATCH 3/5] ntfsplus: Backport ntfs_iomap.c functions to kernels +Subject: [PATCH 3/8] ntfsplus: Backport ntfs_iomap.c functions to kernels older than 6.17 --- diff --git a/0004-ntfsplus-file.c-Using-mmap-instead-of-mmap_prepare-f.patch b/0004-ntfsplus-file.c-Using-mmap-instead-of-mmap_prepare-f.patch index 47090eb3ba28..c3e21834709f 100644 --- a/0004-ntfsplus-file.c-Using-mmap-instead-of-mmap_prepare-f.patch +++ b/0004-ntfsplus-file.c-Using-mmap-instead-of-mmap_prepare-f.patch @@ -1,8 +1,8 @@ -From b2be21a87f6f9104fef7cece84642166abae55b6 Mon Sep 17 00:00:00 2001 +From 22e77c8f27a99be70759f6ae9d044020ae7d5c0b Mon Sep 17 00:00:00 2001 From: shadichy Date: Sun, 2 Nov 2025 04:20:28 +0700 -Subject: [PATCH 4/5] ntfsplus: file.c: Using `mmap` instead of `mmap_prepare` - for kernels older than 6.15 +Subject: [PATCH 4/8] ntfsplus: file.c: Using `mmap` instead of `mmap_prepare` + for kernels older than 6.16 --- fs/ntfsplus/file.c | 39 +++++++++++++++++++++++++++++++++++++++ diff --git a/0005-ntfsplus-compress.c-using-page-index-instead-of-page.patch b/0005-ntfsplus-compress.c-using-page-index-instead-of-page.patch index 7bb07ca9d7e3..0522798214ec 100644 --- a/0005-ntfsplus-compress.c-using-page-index-instead-of-page.patch +++ b/0005-ntfsplus-compress.c-using-page-index-instead-of-page.patch @@ -1,8 +1,8 @@ -From 445a442563ad21156f748d45c652618921b29ebd Mon Sep 17 00:00:00 2001 +From c95407b12bdad7c7940c4e288a2c9ec0465d5d91 Mon Sep 17 00:00:00 2001 From: shadichy Date: Sun, 2 Nov 2025 04:35:50 +0700 -Subject: [PATCH 5/5] ntfsplus: compress.c: using `page->index` instead of - `page->__folio_index` for kernels older than 6.15 +Subject: [PATCH 5/8] ntfsplus: compress.c: using `page->index` instead of + `page->__folio_index` for kernels older than 6.16 --- fs/ntfsplus/compress.c | 33 +++++++++++++++++++++++++++++---- diff --git a/0006-ntfsplus-Update-iomap_zero_range-iomap_page_mkwrite-.patch b/0006-ntfsplus-Update-iomap_zero_range-iomap_page_mkwrite-.patch new file mode 100644 index 000000000000..8bb783b1d2ab --- /dev/null +++ b/0006-ntfsplus-Update-iomap_zero_range-iomap_page_mkwrite-.patch @@ -0,0 +1,145 @@ +From 4d56e31f40c7000df3c700df0d9aad6ff536a0b4 Mon Sep 17 00:00:00 2001 +From: shadichy +Date: Sun, 2 Nov 2025 13:42:58 +0700 +Subject: [PATCH 6/8] ntfsplus: Update `iomap_zero_range`, `iomap_page_mkwrite` + and `iomap_truncate_page` for kernels older than 6.15 + +--- + fs/ntfsplus/file.c | 47 ++++++++++++++++++++++++++++++--------------- + fs/ntfsplus/inode.c | 8 +++++--- + 2 files changed, 36 insertions(+), 19 deletions(-) + +diff --git a/fs/ntfsplus/file.c b/fs/ntfsplus/file.c +index f9caddf0b..ed90c14a1 100644 +--- a/fs/ntfsplus/file.c ++++ b/fs/ntfsplus/file.c +@@ -292,11 +292,13 @@ int ntfs_setattr(struct mnt_idmap *idmap, struct dentry *dentry, + if (NInoNonResident(NTFS_I(vi)) && + attr->ia_size < old_size) { + err = iomap_truncate_page(vi, attr->ia_size, NULL, +- &ntfs_read_iomap_ops, ++ &ntfs_read_iomap_ops + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)) +- &ntfs_iomap_folio_ops, ++ , &ntfs_iomap_folio_ops, NULL ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)) ++ , NULL + #endif +- NULL); ++ ); + if (err) + goto out; + } +@@ -314,11 +316,13 @@ int ntfs_setattr(struct mnt_idmap *idmap, struct dentry *dentry, + round_up(old_size, PAGE_SIZE) - old_size, + attr->ia_size - old_size); + err = iomap_zero_range(vi, old_size, len, +- NULL, &ntfs_read_iomap_ops, ++ NULL, &ntfs_read_iomap_ops + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)) +- &ntfs_iomap_folio_ops, ++ , &ntfs_iomap_folio_ops, NULL ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)) ++ , NULL + #endif +- NULL); ++ ); + } + } + if (ia_valid == ATTR_SIZE) +@@ -695,7 +699,11 @@ static vm_fault_t ntfs_filemap_page_mkwrite(struct vm_fault *vmf) + sb_start_pagefault(inode->i_sb); + file_update_time(vmf->vma->vm_file); + +- ret = iomap_page_mkwrite(vmf, &ntfs_page_mkwrite_iomap_ops, NULL); ++ ret = iomap_page_mkwrite(vmf, &ntfs_page_mkwrite_iomap_ops ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)) ++ , NULL ++#endif ++ ); + sb_end_pagefault(inode->i_sb); + return ret; + } +@@ -707,6 +715,7 @@ static const struct vm_operations_struct ntfs_file_vm_ops = { + }; + + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 16, 0)) ++ + static int ntfs_file_mmap_prepare(struct vm_area_desc *desc) + { + struct file *file = desc->file; +@@ -983,11 +992,13 @@ static long ntfs_fallocate(struct file *file, int mode, loff_t offset, loff_t le + to = min_t(loff_t, (start_vcn + 1) << vol->cluster_size_bits, + end_offset); + err = iomap_zero_range(vi, offset, to - offset, NULL, +- &ntfs_read_iomap_ops, ++ &ntfs_read_iomap_ops + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)) +- &ntfs_iomap_folio_ops, ++ , &ntfs_iomap_folio_ops, NULL ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)) ++ , NULL + #endif +- NULL); ++ ); + if (err < 0 || (end_vcn - start_vcn) == 1) + goto out; + start_vcn++; +@@ -997,11 +1008,13 @@ static long ntfs_fallocate(struct file *file, int mode, loff_t offset, loff_t le + + from = (end_vcn - 1) << vol->cluster_size_bits; + err = iomap_zero_range(vi, from, end_offset - from, NULL, +- &ntfs_read_iomap_ops, ++ &ntfs_read_iomap_ops + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)) +- &ntfs_iomap_folio_ops, ++ , &ntfs_iomap_folio_ops, NULL ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)) ++ , NULL + #endif +- NULL); ++ ); + if (err < 0 || (end_vcn - start_vcn) == 1) + goto out; + end_vcn--; +@@ -1052,11 +1065,13 @@ static long ntfs_fallocate(struct file *file, int mode, loff_t offset, loff_t le + round_up(old_size, PAGE_SIZE) - old_size, + offset - old_size); + err = iomap_zero_range(vi, old_size, len, NULL, +- &ntfs_read_iomap_ops, ++ &ntfs_read_iomap_ops + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)) +- &ntfs_iomap_folio_ops, ++ , &ntfs_iomap_folio_ops, NULL ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)) ++ , NULL + #endif +- NULL); ++ ); + } + NInoSetFileNameDirty(ni); + inode_set_mtime_to_ts(vi, inode_set_ctime_current(vi)); +diff --git a/fs/ntfsplus/inode.c b/fs/ntfsplus/inode.c +index dd0ee4f86..520190307 100644 +--- a/fs/ntfsplus/inode.c ++++ b/fs/ntfsplus/inode.c +@@ -2418,11 +2418,13 @@ int ntfs_extend_initialized_size(struct inode *vi, const loff_t offset, + if (!NInoCompressed(ni) && old_init_size < offset) { + err = iomap_zero_range(vi, old_init_size, + offset - old_init_size, +- NULL, &ntfs_read_iomap_ops, ++ NULL, &ntfs_read_iomap_ops + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0)) +- &ntfs_iomap_folio_ops, ++ , &ntfs_iomap_folio_ops, NULL ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)) ++ , NULL + #endif +- NULL); ++ ); + if (err) + return err; + } +-- +2.51.2 + diff --git a/0007-ntfsplus-Backport-ntfs_mkdir-for-kernels-older-than-.patch b/0007-ntfsplus-Backport-ntfs_mkdir-for-kernels-older-than-.patch new file mode 100644 index 000000000000..6f02fc1c148a --- /dev/null +++ b/0007-ntfsplus-Backport-ntfs_mkdir-for-kernels-older-than-.patch @@ -0,0 +1,76 @@ +From 6a0254517a8684e2081fd4fe85f2d727b3653d85 Mon Sep 17 00:00:00 2001 +From: shadichy +Date: Sun, 2 Nov 2025 14:20:59 +0700 +Subject: [PATCH 7/8] ntfsplus: Backport `ntfs_mkdir` for kernels older than + 6.15 + +--- + fs/ntfsplus/namei.c | 22 ++++++++++++++++------ + 1 file changed, 16 insertions(+), 6 deletions(-) + +diff --git a/fs/ntfsplus/namei.c b/fs/ntfsplus/namei.c +index d3f9dc629..d9731f7fb 100644 +--- a/fs/ntfsplus/namei.c ++++ b/fs/ntfsplus/namei.c +@@ -968,7 +968,7 @@ static int ntfs_unlink(struct inode *dir, struct dentry *dentry) + return err; + } + +-static struct dentry *ntfs_mkdir(struct mnt_idmap *idmap, struct inode *dir, ++static int __ntfs_mkdir_compat(struct mnt_idmap *idmap, struct inode *dir, + struct dentry *dentry, umode_t mode) + { + struct super_block *sb = dir->i_sb; +@@ -979,20 +979,20 @@ static struct dentry *ntfs_mkdir(struct mnt_idmap *idmap, struct inode *dir, + int uname_len; + + if (NVolShutdown(vol)) +- return ERR_PTR(-EIO); ++ return -EIO; + + uname_len = ntfs_nlstoucs(vol, dentry->d_name.name, dentry->d_name.len, + &uname, NTFS_MAX_NAME_LEN); + if (uname_len < 0) { + if (uname_len != -ENAMETOOLONG) + ntfs_error(sb, "Failed to convert name to unicode."); +- return ERR_PTR(-ENOMEM); ++ return -ENOMEM; + } + + err = ntfs_check_bad_char(uname, uname_len); + if (err) { + kmem_cache_free(ntfs_name_cache, uname); +- return ERR_PTR(err); ++ return err; + } + + if (!(vol->vol_flags & VOLUME_IS_DIRTY)) +@@ -1002,13 +1002,23 @@ static struct dentry *ntfs_mkdir(struct mnt_idmap *idmap, struct inode *dir, + kmem_cache_free(ntfs_name_cache, uname); + if (IS_ERR(ni)) { + err = PTR_ERR(ni); +- return ERR_PTR(err); ++ return err; + } + + d_instantiate_new(dentry, VFS_I(ni)); +- return ERR_PTR(err); ++ return err; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)) ++static struct dentry *ntfs_mkdir(struct mnt_idmap *idmap, struct inode *dir, ++ struct dentry *dentry, umode_t mode) ++{ ++ return ERR_PTR(__ntfs_mkdir_compat(idmap, dir, dentry, mode)); ++} ++#else ++#define ntfs_mkdir __ntfs_mkdir_compat ++#endif ++ + static int ntfs_rmdir(struct inode *dir, struct dentry *dentry) + { + struct inode *vi = dentry->d_inode; +-- +2.51.2 + diff --git a/0008-ntfsplus-Backport-_ntfs_finish_ioend_buffered-and-nt.patch b/0008-ntfsplus-Backport-_ntfs_finish_ioend_buffered-and-nt.patch new file mode 100644 index 000000000000..d709293b4bc0 --- /dev/null +++ b/0008-ntfsplus-Backport-_ntfs_finish_ioend_buffered-and-nt.patch @@ -0,0 +1,123 @@ +From 3fba053448c40d912f6683026867c5547b663bd9 Mon Sep 17 00:00:00 2001 +From: shadichy +Date: Sun, 2 Nov 2025 15:36:41 +0700 +Subject: [PATCH 8/8] ntfsplus: Backport `_ntfs_finish_ioend_buffered` and + `ntfs_submit_ioend` for kernels older than 6.15 + +--- + fs/ntfsplus/ntfs_iomap.c | 47 +++++++++++++++++++++++++++++----------- + 1 file changed, 34 insertions(+), 13 deletions(-) + +diff --git a/fs/ntfsplus/ntfs_iomap.c b/fs/ntfsplus/ntfs_iomap.c +index 60d7159f2..d41534c5e 100644 +--- a/fs/ntfsplus/ntfs_iomap.c ++++ b/fs/ntfsplus/ntfs_iomap.c +@@ -711,7 +711,6 @@ const struct iomap_writeback_ops ntfs_writeback_ops = { + }; + #else + +- + /* + * iomap_folio_state is an internal struct to the iomap subsystem and is not + * available in a public header. We define it here for compatibility. +@@ -762,17 +761,18 @@ static void _ntfs_finish_folio_write(struct inode *inode, struct folio *folio, + } + + /* +- * Based on iomap_finish_ioend_buffered from fs/iomap/ioend.c in newer kernels. ++ * Based on iomap_finish_ioend_buffered from fs/iomap/ioend.c in newer kernels ++ * and fs/iomap/buffered-io.c in 6.14 kernels. + */ +-static u32 _ntfs_finish_ioend_buffered(struct iomap_ioend *ioend) ++static u32 _ntfs_finish_ioend_buffered(struct iomap_ioend *ioend, int error) + { + struct inode *inode = ioend->io_inode; + struct bio *bio = &ioend->io_bio; + struct folio_iter fi; + u32 folio_count = 0; + +- if (ioend->io_error) { +- mapping_set_error(inode->i_mapping, ioend->io_error); ++ if (error) { ++ mapping_set_error(inode->i_mapping, error); + if (!bio_flagged(bio, BIO_QUIET)) { + pr_err_ratelimited( + "%s: writeback error on inode %lu, offset %lld, sector %llu", +@@ -796,36 +796,53 @@ static u32 _ntfs_finish_ioend_buffered(struct iomap_ioend *ioend) + static void _ntfs_ioend_writeback_end_bio(struct bio *bio) + { + struct iomap_ioend *ioend = iomap_ioend_from_bio(bio); ++ int error = blk_status_to_errno(bio->bi_status); + +- ioend->io_error = blk_status_to_errno(bio->bi_status); +- _ntfs_finish_ioend_buffered(ioend); ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)) ++ ioend->io_error = error; ++#endif ++ _ntfs_finish_ioend_buffered(ioend, error); + } + +-static int ntfs_submit_ioend(struct iomap_writepage_ctx *wpc, int error) +-{ +- struct iomap_ioend *ioend = wpc->ioend; +- ++static int __ntfs_submit_ioend_compat(struct iomap_ioend *ioend, int error, struct iomap_writepage_ctx *wpc) { + if (!ioend) + return error; + + if (!ioend->io_bio.bi_end_io) + ioend->io_bio.bi_end_io = _ntfs_ioend_writeback_end_bio; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)) + if (WARN_ON_ONCE(wpc->iomap.flags & IOMAP_F_ANON_WRITE)) + error = -EIO; ++#endif + + if (error) { + ioend->io_bio.bi_status = errno_to_blk_status(error); + bio_endio(&ioend->io_bio); +- wpc->ioend = NULL; ++ // wpc->ioend = NULL; + return error; + } + + submit_bio(&ioend->io_bio); +- wpc->ioend = NULL; ++ // wpc->ioend = NULL; + return 0; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)) ++static int ntfs_submit_ioend(struct iomap_writepage_ctx *wpc, int error) ++{ ++ int result = __ntfs_submit_ioend_compat(wpc->ioend, error, wpc); ++ ++ wpc->ioend = NULL; ++ return result; ++} ++#else ++static int ntfs_prepare_ioend(struct iomap_ioend *ioend, int error) ++{ ++ return __ntfs_submit_ioend_compat(ioend, error, NULL); ++} ++#endif ++ + static void ntfs_discard_folio(struct folio *folio, loff_t pos) + { + struct inode *inode = folio->mapping->host; +@@ -846,7 +863,11 @@ static void ntfs_discard_folio(struct folio *folio, loff_t pos) + + const struct iomap_writeback_ops ntfs_writeback_ops = { + .map_blocks = ntfs_map_blocks, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)) + .submit_ioend = ntfs_submit_ioend, ++#else ++ .prepare_ioend = ntfs_prepare_ioend, ++#endif + .discard_folio = ntfs_discard_folio, + }; + #endif +\ No newline at end of file +-- +2.51.2 + diff --git a/PKGBUILD b/PKGBUILD index 5a332bad24bb..57c0eed65768 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,7 +3,7 @@ pkgbase=ntfsplus-dkms-git pkgname=("$pkgbase" "ntfsplus-udev") -pkgver=2025.10.20.r32.d76784df4 +pkgver=2025.10.20.r35.8d8af2b59 pkgrel=1 # epoch=1 pkgdesc="A new NTFS driver for Linux promised to be better than NTFS3. These patches are directly taken from the maintainer's mailing list posts. Backported to 6.17." @@ -67,6 +67,9 @@ source=( '0003-ntfsplus-Backport-ntfs_iomap.c-functions-to-kernels-.patch' '0004-ntfsplus-file.c-Using-mmap-instead-of-mmap_prepare-f.patch' '0005-ntfsplus-compress.c-using-page-index-instead-of-page.patch' + '0006-ntfsplus-Update-iomap_zero_range-iomap_page_mkwrite-.patch' + '0007-ntfsplus-Backport-ntfs_mkdir-for-kernels-older-than-.patch' + '0008-ntfsplus-Backport-_ntfs_finish_ioend_buffered-and-nt.patch' '0099-fs-ntfsplus-Makefile-DKMS-patch.patch' 'dkms.conf' '90-udev-prefer-ntfsplus.rules' @@ -75,11 +78,14 @@ sha256sums=( SKIP 03b57c05e6f9fbf5b5bf34507aa212f6491967f21c53a73352e7f78ebfaf66a8 bede30ed663dada47c946f74a314b8e25817c4cd8b6c39e0cd5810bbd1cddca2 - 13f17e71c2c81332c3931ff587cc6224a65a5c670e15ba318fb48e3271cdc17a - db0add66c82e5709cc3c96940dbb9dedeedebd60756eac47a01f97e55259be8c - 628687495499e6ab9269a6c27271061e417825fddfa77603902cbf931c34131c - f32e8cbb55c2799be918fed82037baf56b7ac31ad3c1b11b330ceaeb64893904 - d3935300534ce7b8f548c27c5376d110f8fce283e727cc51bdf4042ea01fe8f9 + dd682c4ac17dd2b6cf83b1c9bb72054fe80b3ebfe2811759cacce3f238194435 + e2076bb0aa0ee00b52a07f6158028023af5bcbff9c47060cad35bd37675da841 + b4ebc8c9a4db7293f293a8276f70dc4a7799812a9a73d681b3b732a0beaaa326 + 1fcc9a36238d5aa779b8a1b1171c5f2a6b493f5eedaa30815e3793afe68be653 + 6a7dd17acf94f2741105c45acc53b04bfe0fd13b9f3c3b79bf4e533db78f7262 + 1624bf66ab17ed7fd564ad83b01b172b27dad02087f1e28c024f89024d71ec2a + 3b6f8efd31053e1bdba0a149a97ba2cab9fa7a841b73e08f09116edcbef4971c + 9d75ed62e696e295140c7e61c1e8e781a619406cab9f60f51393dfb763bfd33d e217fa145f507b1e07e228e746528554f705f44fd5744f293b302b29df764b96 ed9db8ec0caa09c977529c7ae89b808ee8c238331ec0fdf873525c115fcdfb7c e3866cac3d71da15740159c89b233d4d1f61981dbf737d4e3bc9a4c56bfa24be @@ -99,7 +105,7 @@ prepare() { _mailbox_last_date=$(git log -1 --format='%ad' --date=iso-strict) # Apply patches - git am "$srcdir"/0*.patch + git am --empty=keep --whitespace=fix "$srcdir"/0*.patch } pkgver() {