xfs
[Top] [All Lists]

Re: XFS force shutdown : EFSCORRUPTED

To: "Stephen Lord" <lord@xxxxxxx>
Subject: Re: XFS force shutdown : EFSCORRUPTED
From: "Hiroyuki Nakano" <nakano@xxxxxxxxxxxxxxxxxx>
Date: Wed, 19 Jun 2002 17:41:12 +0900
Cc: <linux-xfs@xxxxxxxxxxx>
References: <013d01c20d55$28ec6f00$3e68010a@xxxxxxxxxxxxxxxxxx><1023369251.1701.20.camel@snafu> <011f01c20dc8$33a11450$3e68010a@xxxxxxxxxxxxxxxxxx><1023449770.1178.3.camel@snafu> <1023450889.1178.5.camel@snafu> <006d01c21736$9d68a930$3e68010a@xxxxxxxxxxxxxxxxxx> <1024454610.1168.14.camel@snafu>
Sender: owner-linux-xfs@xxxxxxxxxxx
Hi Steve,

I executed Shell-scrippt, as I changed lseek second argument value
to 4096*12, 4096*14, 4096*15, 4096*17, 4096*18, 4096*20 from 4096*16.
Shell-script was normal end. Only 4096*16(10000H) is a problem.

Physical address 10000H-13fffH is inode chunk area on dev/hda7.
I think
   Inode chunk area is in page buffers. Read function access to page
buffers.
   If read function access to device, page buffers are broken.



My Shell-scrippt (org-g.sh) is :

  umount /dev/hda7
  /usr/src/cmd/xfsprogs/mkfs/mkfs.xfs -f  -l agnum=1,size=2000b /dev/hda7
  mount  /dev/hda7 /mnt/xfs
  cd /mnt/xfs
  tar zxvf /test/xfs-cmd.tar.gz
  /test/test_dev_read
  cd /test
  rm -rf /mnt/xfs/cmd

and my program (test_dev_read.c) is :

  #include <sys/types.h>
  #include <sys/stat.h>
  #include <fcntl.h>
  #include <unistd.h>
  #include <errno.h>
  #include <string.h>

  int main( argc, argv )
  int argc;
  const char *argv[];
  {
  int     fd,ret,i,error;
  char    bufl[4096];

          if( ( fd = open( "/dev/hda7" , O_RDONLY , S_IRWXU ) ) < 0 ){
                  printf( "error= %s\n" , strerror(errno) );
                  return;
          }
          for( i=0; i<1; i++ ){
                  ret = 40;
                  error =  read( fd , bufl , ret );
                  printf( "test  read1 finish = %x \n",(char)bufl[0] );
          }
          if ( lseek( fd, 4096*16, SEEK_CUR ) == -1 ){
                  printf( "error2= %s\n" , strerror(errno) );
          }

          for( i=0; i<1; i++ ){
                 ret = 40;
                 error =  read( fd , bufl , ret );
                 printf( "test  read2  finish = %x \n",(char)bufl[0] );
          }
          printf( "test program finish \n" );

          close( fd );
  }

Thanks.

-nak


>
> At the moment I cannot - it may possibly be very specific to which
> blocks in the filesystem you read - which in turn would be related
> to exactly how large the filesystem is. Does varying where you read
> from the block device make any difference here?
>
> Steve
>


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