Re: [HOWTO...] LUFS, readpage and large files

From: Miklos Szeredi
Date: Fri Jun 04 2004 - 11:47:15 EST



> while writting a new LUFS plugin (to emulate large file support on
> FAT32;) I stumbled over a problem with it's kernel communication module.
> The symptoms were the same as with broken programs that use int or long
> int instead of size_t (or even long long) for storing file offsets.
> However, here the broken offsets (modulo 4GB) came from kernel so I
> traced it down to this method:

[...]

> offset = p->index << PAGE_CACHE_SHIFT;

This should be:

offset = (unsigned long long) p->index << PAGE_CACHE_SHIFT;

BTW, you can use FUSE + LUFIS for running LUFS filesystems with the
FUSE kernel module. Or even better: you can write your filesystem
natively with FUSE ;)

You can download LUFIS from http://sourceforge.net/projects/avf, FUSE
is already in debian testing.

Cheers,
Miklos


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/