xfs
[Top] [All Lists]

[Bug 258] New: Kernel (smp) lockup: ioctl(XFS_IOC_RESVSP); truncate() on

To: xfs-master@xxxxxxxxxxx
Subject: [Bug 258] New: Kernel (smp) lockup: ioctl(XFS_IOC_RESVSP); truncate() on fs with unwritten=1
From: bugzilla-daemon@xxxxxxxxxxx
Date: Sun, 29 Jun 2003 15:49:53 -0700
Sender: linux-xfs-bounce@xxxxxxxxxxx
http://oss.sgi.com/bugzilla/show_bug.cgi?id=258

           Summary: Kernel (smp) lockup: ioctl(XFS_IOC_RESVSP); truncate()
                    on fs with unwritten=1
           Product: Linux XFS
           Version: Current
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: High
         Component: XFS kernel code
        AssignedTo: xfs-master@xxxxxxxxxxx
        ReportedBy: mikes@xxxxxx


The following code seem to be causing kernel (cvs 2.4.21-xfs smp with highmem=1
and highio=1, SGI-XFS CVS-2003-06-24_05:00_UTC with no debug enabled) lockup.
Machine is dual Pentium 3, 860 MHz 2Gb RAM.

#define _GNU_SOURCE
#define _FILE_OFFSET_BITS 64
#define _LARGEFILE_SOURCE
#define LARGE_FILES

#include <sys/types.h>
#include <sys/ioctl.h>
#include <xfs/xfs_fs.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>

int main(int argc, char** argv)
{
        int           fd;
        xfs_flock64_t req = { 0 };
        const off_t   len = (off_t)10 * ((off_t)1 << 30);
        const char*   fn  = argc > 1 ? argv[1] : "tt";

        if ((fd = open(fn, O_RDWR | O_CREAT | O_EXCL, 0644)) < 0) {
                perror(fn);
                return 1;
        }
        req.l_start  = 0;
        req.l_len    = len;
        req.l_whence = SEEK_END;
        if (ioctl(fd, XFS_IOC_RESVSP, &req) != 0) {
                perror("XFS_IOC_RESVSP");
                close(fd);
                return 1;
        }
        if (close(fd) != 0) {
                perror("close");
                return 1;
        }

        if (truncate(fn, len) != 0) {
                perror("truncate");
                return 1;
        }

        return 0;
}

Below is xfs_info ouptput
meta-data=/mnt/raid1             isize=256    agcount=26, agsize=1048576 blks
         =                       sectsz=512  
data     =                       bsize=4096   blocks=26656912, imaxpct=25
         =                       sunit=16     swidth=48 blks, unwritten=1
naming   =version 2              bsize=4096  
log      =internal               bsize=4096   blocks=3264, version=1
         =                       sectsz=512   sunit=0 blks
realtime =none                   extsz=196608 blocks=0, rtextents=0

fs is on software raid (md) 0 with 3x36GB scsi drives.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


<Prev in Thread] Current Thread [Next in Thread>
  • [Bug 258] New: Kernel (smp) lockup: ioctl(XFS_IOC_RESVSP); truncate() on fs with unwritten=1, bugzilla-daemon <=