sfjro / aufs-standalone

29 stars 13 forks source link

Patches not building on RT kernel #10

Closed justablob closed 2 years ago

justablob commented 2 years ago

Good evening

When trying to build aufs5 on a preempt-rt kernel, the build fails. I'm using Linux with preempt-rt version 5.15.26-rt34 and aufs aufs5.15.5. Here is the error:

fs/aufs/i_op.c: In function ‘au_pin_hdir_set_owner’:
fs/aufs/i_op.c:639:52: error: ‘struct rw_semaphore’ has no member named ‘owner’
  639 |         atomic_long_set(&p->hdir->hi_inode->i_rwsem.owner, (long)task);
      |                                                    ^
make[3]: *** [scripts/Makefile.build:277: fs/aufs/i_op.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:540: fs/aufs] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:1868: fs] Error 2
make[1]: Leaving directory '/root/buildroot-2022.02-rc3/output/build/linux-custom'

The build succeeds with only preempt-rt or only aufs, but with both of them, it fails like that. The host is a Debian Bullseye amd64 virtual machine. I'm using buildroot to automate the build, since doing it all manually is a pain.

paulgortmaker commented 2 years ago

You need to apply the rt.patch as well as base/kbuild/standalone patches.

https://github.com/sfjro/aufs5-standalone/blob/aufs5.15.5/rt.patch

Note that the rt.patch does not really need to be kept as a standalone item - it could/should be folded into the fs/aufs/i_op.c unconditionally for anything v5.3 and newer. This is because the Kconfig for PREEMPT_RT was added in mainline linux a50a3f4b6a31

paulgortmaker commented 2 years ago

Actually as it turns out -- the rt.patch does need to be updated for v5.15 kernels.. It needs to bounce through rwbase now. Please see:

https://lists.yoctoproject.org/g/linux-yocto/message/11083

for details.

sfjro commented 2 years ago

Paul Gortmaker:

Actually as it turns out -- the rt.patch does need to be updated for v5.15 kernels.. It needs to bounce through rwbase now. Please see:

https://lists.yoctoproject.org/g/linux-yocto/message/11083

for details.

Thanx for the patch. I will put it into aufs releases as 'rt-5.15.7.patch'.

By the way, on 09 Mar 2022, I have replied your message. Was it delivered? I cannot see it on https://github.com/sfjro/aufs5-standalone/issues/10. I don't know why.

J. R. Okajima

justablob commented 2 years ago

@sfjro I don't think your message was delivered. Either way, I'm gonna wait on the 5.17 release. I'm not in a hurry so take your time :)

paulgortmaker commented 2 years ago

I did not see any message from March 9th - just the one from ~24h ago.

With regards to other AUFS patches - You might also find these links of interest:

https://lists.yoctoproject.org/g/linux-yocto/message/11084

https://lists.yoctoproject.org/g/linux-yocto/message/11085

sfjro commented 2 years ago

Paul Gortmaker:

I did not see any message from March 9th - just the one from ~24h ago.

Ok, my message was totally gone somewhere. But it is ok since the message becomes less important now.

With regards to other AUFS patches - You might also find these links of interest:

https://lists.yoctoproject.org/g/linux-yocto/message/11084 https://lists.yoctoproject.org/g/linux-yocto/message/11085

Hmm, this patch tries supporting the case of "patched but disabled". That is interesting since I would say "if you disable it, why did you apply the patch?" for such case. But now I think I could understand such case. I am going to apply your patch to aufs release.

Thank you.

J. R. Okajima

sfjro commented 2 years ago

------- Blind-Carbon-Copy

From: "J. R. Okajima" @.> To: @. Cc: @., @. Subject: aufs5 GIT release MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: @.> Date: Mon, 04 Apr 2022 00:43:36 +0900 Message-ID: @.>

o news

J. R. Okajima


------- End of Blind-Carbon-Copy

sfjro commented 2 years ago

Hello The Blobbo,

Here is the error:=0D


fs/aufs/i_op.c: In function =E2=80=98au_pin_hdir_set_owner=E2=80=99:=0D
fs/aufs/i_op.c:639:52: error: =E2=80=98struct rw_semaphore=E2=80=99 has n=
o member named =E2=80=98owner=E2=80=99=0D
  639 |         atomic_long_set(&p->hdir->hi_inode->i_rwsem.owner, (long)=
task);=0D
      |                                                    ^=0D

There is a patch for this issue. Try aufs5-standalone.git/rt.patch.

J. R. Okajima