Closed peabee closed 2 months ago
PB:
I know that support for aufs on kernel 5.10 has finished..... but am wondering if anyone can suggest why the latest 5.10.220 build with aufs-5.10.140 has suddenly started to fail:
v5.10.220 contains e864d4d834f8 2024-06-21 namei: introduce struct renamedata and its changes the parameter of vfs_rename(). The commit is originated to v5.12. 9fe61450972d 2021-01-24 namei: introduce struct renamedata
And aufs5.12 contains 85fab2b2001b 2021-03-06 aufs: v5.12-rc1 idmapper userns 1/2, new parameter
You need to backport it.
J. R. Okajima
J.R.O. - Many thanks for the insight - much appreciated. That looks to be a big "backport": 19 changed files with 227 additions and 107 deletions.
Can a patch be extracted from Github?? I think this probably means that 5.10 kernels from 5.10.220 onwards can no longer be produced in aufs versions - sadly.
PB:
J.R.O. - Many thanks for the insight - much appreciated. That looks to be a big "backport": 19 changed files with 227 additions and 107 deletions.
Count it by commit. It is not so big.
$ git log1 --no-merges aufs5.10..aufs5.12 fs/aufs include/uapi/linux/aufs_type.h 9e5e47e46da7 2021-10-14 aufs: tiny, fix an editing failure 5cd24b8dc279 2021-04-27 aufs: version 5.12 6e046b556eee 2021-03-06 aufs: v5.12-rc1 idmapper userns 2/2, set path->mnt earlier 85fab2b2001b 2021-03-06 aufs: v5.12-rc1 idmapper userns 1/2, new parameter ccc9496d4919 2021-02-15 Revert "aufs: aufs5.11" 93ec4dd2c953 2021-02-15 aufs: aufs5.11 b9cb27885793 2021-01-09 aufs: for linux-v5.11-rc1, dummy def lockdep_is_held() 5bf2a1969bc4 2020-12-28 Revert "aufs: version 5.10"
But you need to check them all carefully whether v5.10.220 contains the corresponding part or not.
J. R. Okajima
@peabee @sfjro
I'm late to the party ... but this patch (applied on top of aufs5.10.140) will make aufs builds (and works) again for 5.10.224 (and perhaps down to 5.10.220, I didn't test).
diff --git a/fs/aufs/hfsnotify.c b/fs/aufs/hfsnotify.c
index b029fa20..6b35e886 100644
--- a/fs/aufs/hfsnotify.c
+++ b/fs/aufs/hfsnotify.c
@@ -238,7 +238,8 @@ static int au_hfsn_init_br(struct au_branch *br, int perm)
goto out;
err = 0;
- group = fsnotify_alloc_group(&au_hfsn_ops);
+ group = fsnotify_alloc_group(&au_hfsn_ops,
+ /*flags - not for userspace*/0);
if (IS_ERR(group)) {
err = PTR_ERR(group);
pr_err("fsnotify_alloc_group() failed, %d\n", err);
diff --git a/fs/aufs/vfsub.c b/fs/aufs/vfsub.c
index a85774c9..b2ef1db9 100644
--- a/fs/aufs/vfsub.c
+++ b/fs/aufs/vfsub.c
@@ -400,6 +400,7 @@ int vfsub_rename(struct inode *src_dir, struct dentry *src_dentry,
struct inode **delegated_inode, unsigned int flags)
{
int err;
+ struct renamedata rd;
struct path tmp = {
.mnt = path->mnt
};
@@ -416,9 +417,14 @@ int vfsub_rename(struct inode *src_dir, struct dentry *src_dentry,
if (unlikely(err))
goto out;
+ rd.old_dir = src_dir;
+ rd.old_dentry = src_dentry;
+ rd.new_dir = dir;
+ rd.new_dentry = path->dentry;
+ rd.delegated_inode = delegated_inode;
+ rd.flags = flags;
lockdep_off();
- err = vfs_rename(src_dir, src_dentry, dir, path->dentry,
- delegated_inode, flags);
+ err = vfs_rename(&rd);
lockdep_on();
if (!err) {
int did;
Same diff file in a file attachment. Remove the extraneous .txt extension (which I had to append, or otherwise github will refuse to allow me to upload the diff).
I know that support for aufs on kernel 5.10 has finished..... but am wondering if anyone can suggest why the latest 5.10.220 build with aufs-5.10.140 has suddenly started to fail:
2024-07-01T01:24:20.7089109Z Linux: 5.10.220 2024-07-01T01:24:20.7110980Z aufs=5.10.140 2024-07-01T01:24:20.7111420Z aufs_util=5.8