Kernel needs to provide FIFREEZE/FITHAW ioctl so that open-vm-dkms can build

Bug #1088053 reported by Nate Muench (Mink)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
VMWare tools
Unknown
Unknown
linux (Ubuntu)
Invalid
Medium
Unassigned
open-vm-tools (Ubuntu)
Fix Released
Undecided
Nate Muench (Mink)

Bug Description

Hello,

My name is Nate, and I'm responsible for keeping the open-vm-tools package up to date.

I am requesting that ioctl (specifically FIFREEZE/FITHAW ioctl) please be compiled into the kernel (if it hasn't already) because vmsync doesn't compile since newer kernel (namely 3.6 and greater). Yes, I know it's depreciated but it need to be done.

I'm reporting this now because I've known about this for a month or so because I have a scratch machine and both that and Ubuntu are different environments, and I just installed Raring for the first time. And since Ubuntu's kernel has more stuff that the normal kernel, I wanted to know if the module would compile.

Here's part of the info I got:
Traceback (most recent call last):
 File "/usr/share/apport/package-hooks/dkms_packages.py", line 22, in <module> import apport
ImportError: No module named apport
Error! Build of vmsync.ko failed for: 3.7.0-5-generic (i686)

This is coming directly from upstream (http://sourceforge.net/tracker/?func=detail&aid=3579185&group_id=204462&atid=989708).

I can do some of the work from my end (taking out mentions of the vmsync module for dkms from the debian folder, and upload the new config to bzr and wait for approval). But in order for me to upload and mark (my packaging) for approval, I need this to be done please.

Obviously, I'm posting this so I also get a bug report number, that I can put in my packaging's changelog
---
ApportVersion: 2.6.3-0ubuntu4
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: nate 1948 F.... pulseaudio
CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
CurrentDmesg: [ 15.753946] end_request: I/O error, dev fd0, sector 0
DistroRelease: Ubuntu 13.04
HibernationDevice: RESUME=UUID=1d10b04b-de23-4217-9fcd-cfc637bbfaf8
InstallationDate: Installed on 2012-12-08 (0 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Alpha i386 (20121207)
IwConfig:
 lo no wireless extensions.

 eth0 no wireless extensions.
Lsusb: Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MachineType: VMware, Inc. VMware Virtual Platform
MarkForUpload: True
Package: open-vm-tools-dkms
PackageArchitecture: i386
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB: 0 svgadrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.7.0-5-generic root=UUID=eed1e65f-5c0e-4f1e-9c82-c2425504c600 ro quiet splash
ProcVersionSignature: Ubuntu 3.7.0-5.13-generic 3.7.0-rc8
RelatedPackageVersions:
 linux-restricted-modules-3.7.0-5-generic N/A
 linux-backports-modules-3.7.0-5-generic N/A
 linux-firmware 1.98
RfKill:

Tags: raring running-unity raring running-unity
Uname: Linux 3.7.0-5-generic i686
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
dmi.bios.date: 09/20/2012
dmi.bios.vendor: Phoenix Technologies LTD
dmi.bios.version: 6.00
dmi.board.name: 440BX Desktop Reference Platform
dmi.board.vendor: Intel Corporation
dmi.board.version: None
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 1
dmi.chassis.vendor: No Enclosure
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnPhoenixTechnologiesLTD:bvr6.00:bd09/20/2012:svnVMware,Inc.:pnVMwareVirtualPlatform:pvrNone:rvnIntelCorporation:rn440BXDesktopReferencePlatform:rvrNone:cvnNoEnclosure:ct1:cvrN/A:
dmi.product.name: VMware Virtual Platform
dmi.product.version: None
dmi.sys.vendor: VMware, Inc.
modified.conffile..etc.vmware.tools.tools.conf:

mtime.conffile..etc.vmware.tools.tools.conf: 2012-12-07T19:24:35.065678

Related branches

no longer affects: linux
Changed in open-vm-tools (Ubuntu):
assignee: nobody → Nate Muench (Mink) (n-muench)
status: New → In Progress
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1088053

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: raring
Revision history for this message
Nate Muench (Mink) (n-muench) wrote : AlsaInfo.txt

apport information

no longer affects: open-vm-tools-dkms (Ubuntu)
tags: added: apport-collected running-unity
description: updated
Revision history for this message
Nate Muench (Mink) (n-muench) wrote : BootDmesg.txt

apport information

Revision history for this message
Nate Muench (Mink) (n-muench) wrote : Dependencies.txt

apport information

Revision history for this message
Nate Muench (Mink) (n-muench) wrote : Lspci.txt

apport information

Revision history for this message
Nate Muench (Mink) (n-muench) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Nate Muench (Mink) (n-muench) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Nate Muench (Mink) (n-muench) wrote : ProcModules.txt

apport information

Revision history for this message
Nate Muench (Mink) (n-muench) wrote : PulseList.txt

apport information

Revision history for this message
Nate Muench (Mink) (n-muench) wrote : UdevDb.txt

apport information

Revision history for this message
Nate Muench (Mink) (n-muench) wrote :

and the actual build log

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Nate Muench (Mink) (n-muench) wrote :

What's the status of this?

I told you the problem and the solution. I have the branch done, I'm just waiting for it (FIFREEZE/FITHAW ioctl) to be compiled into the kernel.

Changed in linux (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Hi Nate,

It appears FIFREEZE AND FITHAW are already built into the kernel.

Here is the defines in ~/linux/include/linux/fs.h(Also in ~linux/include/uapi/linux/fs.h):
#define FIFREEZE _IOWR('X', 119, int) /* Freeze */
#define FITHAW _IOWR('X', 120, int) /* Thaw */

In ~linux/fs/ioctl.c, there is a switch for FIFREEZE AND FITHAW:
do_vfs_ioctl()

   case FIFREEZE:
                error = ioctl_fsfreeze(filp);
                break;

    case FITHAW:
                error = ioctl_fsthaw(filp);
                break;

These switch statements then call ioctl_fsfreeze() or ioctl_fsthaw():
static int ioctl_fsfreeze(struct file *filp)
{
        struct super_block *sb = filp->f_path.dentry->d_inode->i_sb;

        if (!capable(CAP_SYS_ADMIN))
                return -EPERM;

        /* If filesystem doesn't support freeze feature, return. */
        if (sb->s_op->freeze_fs == NULL)
                return -EOPNOTSUPP;

        /* Freeze */
        return freeze_super(sb);
}

ioctl_fsfreeze() then does a check to see if freeze is supported by the filesystem.

Do you have a more complete log of the failure you are seeing when vmsync doesn't compile? If it was working prior to the v3.6 kernel, then that would also indicate this is a regression versus a new feature request.

Changed in linux (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Nate Muench (Mink) (n-muench) wrote :

If that's the case, that all I needed to know.

Anyways, here's the build log.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

This could be an issue:

/var/lib/dkms/open-vm-tools/2012.10.14/build/vmsync/sync.c: In function ‘VmSyncThawDevices’:
/var/lib/dkms/open-vm-tools/2012.10.14/build/vmsync/sync.c:165:37: error: ‘struct super_block’ has no member named ‘s_frozen’
/var/lib/dkms/open-vm-tools/2012.10.14/build/vmsync/sync.c: In function ‘VmSyncAddPath’:
/var/lib/dkms/open-vm-tools/2012.10.14/build/vmsync/sync.c:240:19: error: ‘struct super_block’ has no member named ‘s_frozen’

The structure super_block in the functions VmSyncThawDevices and VmSyncAddPath might be missing the struc member s_frozen ?

Changed in linux (Ubuntu):
status: Triaged → Incomplete
Changed in open-vm-tools (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Nate Muench (Mink) (n-muench) wrote :

Have you read the Upstream bug report (it's under "remote bug watches")?

"Just disable vmsync on newer kernels, this driver is not needed as long as
kernel provides FIFREEZE/FITHAW ioctls."

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package open-vm-tools - 2012.12.26-958366-0ubuntu1

---------------
open-vm-tools (2012.12.26-958366-0ubuntu1) raring-proposed; urgency=high

  * Merging upstream version 2012.12.26-958366.

  * Added 04-dkms-vmsync.patch: An additional to 03-dkms.patch
    - Deletes lines involving vmsync, adjust other numbers.
    - Module compile still fails if we don't add this patch.
    - This keeps the 03-dkms.patch unmodified.

  * Added 05-vmhgfs.patch:
    - Fixes vmxnet compile issues with 3.8 kernel (LP: #1100096)

  * Stop dkms from building vmblock module.
    - vmblock-fuse takes care of this now.
      + Modules still build, but this gets rid of the vmblock-related
        warning message
 -- Nate Muench <email address hidden> Mon, 28 Jan 2013 16:11:13 -0600

Changed in open-vm-tools (Ubuntu):
status: Fix Committed → Fix Released
Rolf Leggewie (r0lf)
Changed in linux (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.