Giter Site home page Giter Site logo

Comments (10)

jodh-intel avatar jodh-intel commented on July 17, 2024

@ViktorWb - Please can you run the command specified in the issue template to help us diagnose the issue. What you should have seen in the template is:

from documentation.

devimc avatar devimc commented on July 17, 2024

thanks @ViktorWb for raising this, look like the 9p patch (https://github.com/kata-containers/packaging/blob/master/kernel/patches/5.4.x/0001-NO-UPSTREAM-9P-always-use-cached-inode-to-fill-in-v9.patch) was not applied, could you confirm that?

from documentation.

ariel-adam avatar ariel-adam commented on July 17, 2024

Closing this issue.
@ViktorWb feel free to reopen if you could provide the additional information or try the 9p patch recommended.

from documentation.

ViktorWb avatar ViktorWb commented on July 17, 2024

Thanks for your responses, indeed it looks like the patch you mentioned @devimc fails to be applied The output I'm getting from the ./build-kernel.sh -v 5.4.60 setup command is:

INFO: Config version: 92
INFO: Kernel version: 5.4.60
INFO: kernel path does not exist, will download kernel
INFO: Download kernel checksum file: sha256sums.asc
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  102k  100  102k    0     0  5122k      0 --:--:-- --:--:-- --:--:-- 5122k
INFO: Download kernel version 5.4.60
INFO: Download kernel
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   162  100   162    0     0  13500      0 --:--:-- --:--:-- --:--:-- 13500
100  104M  100  104M    0     0  8492k      0  0:00:12  0:00:12 --:--:-- 10.2M
linux-5.4.60.tar.xz: OK
INFO: Apply patches from /root/go/src/github.com/kata-containers/packaging/kernel/patches//5.4.x
INFO: Found 7 patches
INFO: Apply /root/go/src/github.com/kata-containers/packaging/kernel/patches//5.4.x/0001-9p-retrieve-fid-from-file-when-file-instance-exist.patch
INFO: Apply /root/go/src/github.com/kata-containers/packaging/kernel/patches//5.4.x/0001-NO-UPSTREAM-9P-always-use-cached-inode-to-fill-in-v9.patch
INFO: Apply /root/go/src/github.com/kata-containers/packaging/kernel/patches//5.4.x/0002-ACPI-Always-build-evged-in.patch
INFO: Apply /root/go/src/github.com/kata-containers/packaging/kernel/patches//5.4.x/0002-net-virtio_vsock-Fix-race-condition-between-bind-and.patch
INFO: Apply /root/go/src/github.com/kata-containers/packaging/kernel/patches//5.4.x/0003-arm-arm64-Provide-a-wrapper-for-SMCCC-1.1-calls.patch
INFO: Apply /root/go/src/github.com/kata-containers/packaging/kernel/patches//5.4.x/0004-arm-arm64-smccc-psci-add-arm_smccc_1_1_get_conduit.patch
INFO: Apply /root/go/src/github.com/kata-containers/packaging/kernel/patches//5.4.x/0006-arm64-mm-Enable-memory-hot-remove.patch
ls: cannot access '/root/go/src/github.com/kata-containers/packaging/kernel/configs/fragments/x86_64/../common/experimental/*.conf': No such file or directory
INFO: Constructing config from fragments: /root/go/src/github.com/kata-containers/packaging/kernel/configs/fragments/x86_64/.config
INFO: Copying config file from: /root/go/src/github.com/kata-containers/packaging/kernel/configs/fragments/x86_64/.config
scripts/kconfig/conf  --oldconfig Kconfig
#
# configuration written to .config
#
Kernel source ready: /root/go/src/github.com/kata-containers/packaging/kernel/kata-linux-5.4.60-92

It did attempt to apply the patch? Yet when I do cat -n kata-linux-5.4.60-92/fs/9p/vfs_inode.c and scroll to the line affected by the patch, it does not appear to have been changed.

1052	v9fs_vfs_getattr(const struct path *path, struct kstat *stat,
1053			 u32 request_mask, unsigned int flags)
1054	{
1055		struct dentry *dentry = path->dentry;
1056		struct v9fs_session_info *v9ses;
1057		struct p9_fid *fid;
1058		struct p9_wstat *st;
1059	
1060		p9_debug(P9_DEBUG_VFS, "dentry: %p\n", dentry);
1061		v9ses = v9fs_dentry2v9ses(dentry);
1062		if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) {
1063			generic_fillattr(d_inode(dentry), stat);
1064			return 0;

from documentation.

devfaz avatar devfaz commented on July 17, 2024

@ariel-adam may I ask you to re-open the issue? Seeing the same behavior. Patches "applied" successfully, but files dont change in the filesystem/directory.

from documentation.

devfaz avatar devfaz commented on July 17, 2024
INFO: Apply patches from /root/go/src/github.com/kata-containers/packaging/kernel/patches//5.4.x
INFO: Found 7 patches
INFO: Apply /root/go/src/github.com/kata-containers/packaging/kernel/patches//5.4.x/0001-9p-retrieve-fid-from-file-when-file-instance-exist.patch
INFO: Apply /root/go/src/github.com/kata-containers/packaging/kernel/patches//5.4.x/0001-NO-UPSTREAM-9P-always-use-cached-inode-to-fill-in-v9.patch
INFO: Apply /root/go/src/github.com/kata-containers/packaging/kernel/patches//5.4.x/0002-ACPI-Always-build-evged-in.patch
INFO: Apply /root/go/src/github.com/kata-containers/packaging/kernel/patches//5.4.x/0002-net-virtio_vsock-Fix-race-condition-between-bind-and.patch
INFO: Apply /root/go/src/github.com/kata-containers/packaging/kernel/patches//5.4.x/0003-arm-arm64-Provide-a-wrapper-for-SMCCC-1.1-calls.patch
INFO: Apply /root/go/src/github.com/kata-containers/packaging/kernel/patches//5.4.x/0004-arm-arm64-smccc-psci-add-arm_smccc_1_1_get_conduit.patch
INFO: Apply /root/go/src/github.com/kata-containers/packaging/kernel/patches//5.4.x/0006-arm64-mm-Enable-memory-hot-remove.patch

from documentation.

devfaz avatar devfaz commented on July 17, 2024

seems git-apply is not changing anything:

root@ns31374480:~/go/src/github.com/kata-containers/packaging/kernel/kata-linux-5.4.60-92# git apply /root/go/src/github.com/kata-containers/packaging/kernel/patches//5.4.x/0001-9p-retrieve-fid-from-file-when-file-instance-exist.patch
root@ns31374480:~/go/src/github.com/kata-containers/packaging/kernel/kata-linux-5.4.60-92# diff fs/9p/vfs_inode_dotl.c.bck fs/9p/vfs_inode_dotl.c
root@ns31374480:~/go/src/github.com/kata-containers/packaging/kernel/kata-linux-5.4.60-92# 

from documentation.

devfaz avatar devfaz commented on July 17, 2024

but "patch" is working

root@ns31374480:~/go/src/github.com/kata-containers/packaging/kernel/kata-linux-5.4.60-92# patch -p1 < /root/go/src/github.com/kata-containers/packaging/kernel/patches//5.4.x/0001-9p-retrieve-fid-from-file-when-file-instance-exist.patch
patching file fs/9p/vfs_inode.c
patching file fs/9p/vfs_inode_dotl.c
root@ns31374480:~/go/src/github.com/kata-containers/packaging/kernel/kata-linux-5.4.60-92# diff fs/9p/vfs_inode_dotl.c.bck fs/9p/vfs_inode_dotl.c
543c543
< 	struct p9_fid *fid;
---
> 	struct p9_fid *fid = NULL;
563c563,568
< 	fid = v9fs_fid_lookup(dentry);
---
> 	if (iattr->ia_valid & ATTR_FILE) {
> 		fid = iattr->ia_file->private_data;
> 		WARN_ON(!fid);
> 	}
> 	if (!fid)
> 		fid = v9fs_fid_lookup(dentry);

from documentation.

devfaz avatar devfaz commented on July 17, 2024

Hint: https://stackoverflow.com/a/27283285

I will try to "workaround" this for now by using "patch":

diff --git a/scripts/apply_patches.sh b/scripts/apply_patches.sh
index aa6b19b..b038d0a 100755
--- a/scripts/apply_patches.sh
+++ b/scripts/apply_patches.sh
@@ -40,7 +40,7 @@ if [ -d "$patches_dir" ]; then
        echo "INFO: Found ${#patches[@]} patches"
        for patch in ${patches[@]}; do
                echo "INFO: Apply $patch"
-               git apply "$patch" || \
+               patch -p1 < "$patch" && echo "INFO: Applied $patch successfully" || \
                        { echo >&2 "ERROR: Not applied. Exiting..."; exit 1; }
        done
 else

from documentation.

devfaz avatar devfaz commented on July 17, 2024

@ViktorWb afterwards my "apt" is working without issues.

from documentation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.