Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Feb 2002 16:17:11 +1300 (NZDT)
From:      Jonathan Chen <jonc@chen.org.nz>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/34895: Linuxulator linux_fcntl64() doesn't handle mode F_SETLKW64
Message-ID:  <200202130317.g1D3HBo00755@wapsolutions.co.nz>

next in thread | raw e-mail | index | archive | help

>Number:         34895
>Category:       kern
>Synopsis:       Linuxulator linux_fcntl64() doesn't handle mode F_SETLKW64
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 12 19:20:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Jonathan Chen
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
>Environment:
System: FreeBSD central.wapsolutions.co.nz 4.5-STABLE FreeBSD 4.5-STABLE #0: Tue Jan 29 16:21:08 NZDT 2002 root@central.wapsolutions.co.nz:/usr/obj/usr/src/sys/GENERIC i386


>Description:
When Linux Informix-SE, any attempt to create a database will fail
with a Invalid argument error. Running truss(1) on the sqlexec process
reveals the following:

    [...]
    linux_open("a.dbs/syscolumns.idx",32770,00)  = 4 (0x4)
    linux_fcntl64(0x4,0x2,0x1)           = 0 (0x0)
    linux_open("a.dbs/syscolumns.dat",32770,00)  = 5 (0x5)
    linux_fcntl64(0x5,0x2,0x1)           = 0 (0x0)
    linux_fcntl64(0x4,0xe,0x8193a88)         ERR#22 'Invalid argument'
    write(1,0x81a4500,22)                = 22 (0x16)
    [...]

A quick look at a Linux system's /usr/include/bits/fcntl.h shows:

    [...]
    /* Values for the second argument to `fcntl'.  */
    #define F_DUPFD     0   /* Duplicate file descriptor.  */
    #define F_GETFD     1   /* Get file descriptor flags.  */
    #define F_SETFD     2   /* Set file descriptor flags.  */
    #define F_GETFL     3   /* Get file status flags.  */
    #define F_SETFL     4   /* Set file status flags.  */
    #ifndef __USE_FILE_OFFSET64
    # define F_GETLK    5   /* Get record locking info.  */
    # define F_SETLK    6   /* Set record locking info (non-blocking).  */
    # define F_SETLKW   7   /* Set record locking info (blocking).  */
    #else
    # define F_GETLK    F_GETLK64  /* Get record locking info.  */
    # define F_SETLK    F_SETLK64  /* Set record locking info (non-blocking).*/
    # define F_SETLKW   F_SETLKW64 /* Set record locking info (blocking).  */
    #endif
    #define F_GETLK64   12  /* Get record locking info.  */
    #define F_SETLK64   13  /* Set record locking info (non-blocking).  */
    #define F_SETLKW64  14  /* Set record locking info (blocking).  */
    [...]

I'm assuming that the '0xe' in the invalid call above refers to
F_SETLKW64 on the Linux side. Any tips to fix this appreciated.

>How-To-Repeat:
Install and load linux_base-7
Download Informix SE http://www.informix.com/evaluate/ and install.
Attempt to create a database
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200202130317.g1D3HBo00755>