Wednesday, 17 July 2013

vmblock patch for linux 3.11-rc1 (vmware 9)

Linux 3.11-rc1 was released a few days ago. With it comes a kernel-level API change related to VFS. Specifically, struct file_operations no longer contains the function pointer readdir and vfs_readdir() which was defined in fs/readdir.c is now gone. They are both superseded by iterate and iterate_dir() respectively. Unfortunately, these changes broke the compilation of the vmblock fs module.

So, here is a simple patch I've written for anyone who is interested. Note that you also have to apply the vmblock patch for linux 3.10 if you haven't already. Otherwise, the compilation would fail.

Download: vmblock.3.11.patch As usual, apply the patch and do: Verification to show that the patch works properly:

7 comments:

  1. Nice. This is what worked for me:

    cd /tmp
    curl -O http://pkgbuild.com/git/aur-mirror.git/plain/vmware-patch/vmblock-9.0.2-5.0.2-3.10.patch
    curl -O http://pkgbuild.com/git/aur-mirror.git/plain/vmware-patch/vmnet-9.0.2-5.0.2-3.10.patch
    wget https://sites.google.com/site/mysticalzerotmp/vmblock.3.11.patch
    cd /usr/lib/vmware/modules/source
    tar -xvf vmblock.tar
    tar -xvf vmnet.tar
    patch -p0 -i /tmp/vmblock-9.0.2-5.0.2-3.10.patch
    patch -p0 -i /tmp/vmnet-9.0.2-5.0.2-3.10.patch
    cd vmblock-only
    patch -p1 -i /tmp/vmblock.3.11.patch
    cd ..
    tar -cf vmblock.tar vmblock-only
    tar -cf vmnet.tar vmnet-only
    rm -r vmblock-only
    rm -r vmnet-only
    vmware-modconfig --console --install-all

    ReplyDelete
    Replies
    1. Thanks, works like a charm on Ubuntu 13.04 with kernel 3.11

      Delete
  2. Really nice shell script ^ works on fedora rawhide

    ReplyDelete
  3. Another API change in 3.12. See here for my patch: http://dominator008.com/shootingrange/2013/10/03/vmware-9-0-2-vmblock-patch-for-linux-kernel-3-12/

    ReplyDelete
  4. Why the hell so many API changes?

    ReplyDelete
  5. Thanks a bunch!

    ReplyDelete