Re: Files truncate on vfat filesystem

OGAWA Hirofumi (hirofumi@mail.parknet.co.jp)
Wed, 07 May 2003 05:02:46 +0900


Peder Stray <peder@ifi.uio.no> writes:

> > What partition size do you use? And does that FAT use what logical
> > sector size? The directory entry pointer may be overflowed...
>
> 250GB partition, FAT32 LBA (partition type 0x0c i think).
>
> The problem is verry inconsistent as i said earlier, so the number of
> files in a directory doesn't seem to matter, nor do the depth in the
> directory structure. Some files i manage to copy yo the disk, some files i
> don't... I havent managed to find any pattern in what files this affects.

I meant, "directory entry pointer" is position of the directory entry
in the _partition_. like the following,

in fs/fat/misc.c:fat__get_entry()

offset &= sb->s_blocksize - 1;
*de = (struct msdos_dir_entry *) ((*bh)->b_data + offset);
*ino = (sector << sbi->dir_per_block_bits) + (offset >> MSDOS_DIR_BITS);
^^^

This is used for _updates_ (not create) of the directory entry. And
there is a possibility of cause of the problem which you said. If my
guess is right and a partition will be splited small, a problem will
not occur.

In short, I think it's the bug of fat driver and it's needed the fix.

-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/