lkml.org 
[lkml]   [2002]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [BK PATCH] Add ext3 indexed directory (htree) support
Date
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On September 26, 2002 21:12, Andreas Dilger wrote:
> After that, we'd be happy if you could test with a loopback filesystem:

Okay, got another one:
"EXT3-fs error (device loop(7,0)): ext3_add_entry: bad entry in directory #2:
rec_len is smaller than minimal - offset=0, inode=0, rec_len=8, name_len=0"
fsck then reported:
"Directory inode 2, block 166, offset 0: directory corrupted"

This is while deleteing an old fsstress directory (a full fsck had been
performed since the last time the fsstress directory had been touched) while
running a few instances of the attached program.

You guys have any idea what's going on yet?

- -Ryan

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)

iD8DBQE9lQPpLGMzRzbJfbQRAlzdAJ9mbiu8lRBbcFZXE/tD94Ad9DoAowCdFzab
JkelXV/8C4fsqEqg9TfBvb0=
=VA58
-----END PGP SIGNATURE-----
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/time.h>
#include <time.h>

#define MAX_FILE_COUNT 4000000

int main(int argc, char *argv[])
{
while(1)
{
unsigned int seed;
struct timeval tv;
int i;
int count;

gettimeofday(&tv, NULL);
seed = tv.tv_usec;
count = seed % MAX_FILE_COUNT;

srand(seed);
printf("Creating %i files\n" , count);
for(i = 0; i < count;i++)
{
char filename[32];
snprintf(filename, 32, "%x", rand());
close(open(filename, O_CREAT | O_RDONLY));
}

printf("Performing %i random lookups\n" , count);
for(i = 0; i < count;i++)
{
char filename[32];
struct stat useless;

snprintf(filename, 32, "%x", rand());
stat(filename, &useless);
}

srand(seed);
printf("Unlinking %i files\n" , count);
for(i = 0; i < count;i++)
{
char filename[32];
snprintf(filename, 32, "%x", rand());
unlink(filename);
}
}
}
\
 
 \ /
  Last update: 2005-03-22 13:29    [W:0.158 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site