xfs
[Top] [All Lists]

Re: the shell will make the xfs fs locked

To: tom wang <wddi_1976@xxxxxxxxxxxx>
Subject: Re: the shell will make the xfs fs locked
From: Steve Lord <lord@xxxxxxx>
Date: 11 Oct 2002 15:42:37 -0500
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <20021001092416.74643.qmail@web15204.mail.bjs.yahoo.com>
References: <20021001092416.74643.qmail@web15204.mail.bjs.yahoo.com>
Sender: linux-xfs-bounce@xxxxxxxxxxx
On Tue, 2002-10-01 at 04:24, tom wang wrote:
> xfs-developers:
>  when I run the shell program as following on a xfs
> FS, the process will locked.

I just checked some code into cvs which should fix this.

Steve

> 
> #!/bin/sh
> for((i=0;i<300000;i++)); do
>      truncate /mnt/current/a $(($i*8192));
>      cat /tmp/4kfile >> /mnt/current/a
> done
> /tmp/4kfile is a 4096-sized file
> xfs FS  mounted at /mnt/current
> the truncate program:
>      
> #include <unistd.h>
> #include <stdlib.h>
> #include <stdio.h>
> 
> int main(int argc, char *argv[])
> {
>       long long length = 0;
> 
>       if( argc < 2 || argc > 3 ){
>               printf("Usage: truncate filename [length]\n");
>               return -1;
>       }
> 
>       if( argv[2] )
>               length = atoll(argv[2]);
> 
>       if( truncate64( argv[1], length ) ){
>               perror("truncate failed");
>               return -1;
>       }
>       return 0;
> }
> 
> 
> _________________________________________________________
> Do You Yahoo!? 
> "åçäèææ,åæååéèåæç!"
> http://cn.ent.yahoo.com/star/midautumn/index.html
> 
-- 

Steve Lord                                      voice: +1-651-683-3511
Principal Engineer, Filesystem Software         email: lord@xxxxxxx


<Prev in Thread] Current Thread [Next in Thread>