On 2002.07.23 12:02 Stephen C. Tweedie wrote: > Hi, > > On Sat, Jul 06, 2002 at 10:18:37AM +0000, Ian Leonard wrote: > > I appears that the app writing to the raw partition had > > a bug that caused it to write to negative block numbers > > and that this wrote all over the disk. > > Shouldn't be able to happen --- negative offsets are rejected > elsewhere in the kernel before raw devices can get to see them. The > lseek/llseek syscalls return EINVAL if you try to set the offset to be > negative for normal read/write syscalls, and the pread and pwrite > syscalls also check for negative offsets before allowing things to > proceed. I apolgise because this was a complete red herring. The app was behaving badly but the source of the corruption was due to the use of a 160Gb Maxtor disk. However, FYI, the problem still exists. If you write constantly to a partition (in this case I just wrote to the partition without a filesystem), it will reach about 137GB (from memory), wrap and destroy the first partition. I note from the kernel archive that this problem should be fixed in the next release. However 2.4.19-rc1 still does it. I need to check further - maybe the fix is in the ac branch. I also note that support for really, really large disks is due for 2.6, but i think it needs to be sorted out before that. -- Ian Leonard eMail: ileonard@ntlworld.com Phone: +44 (0)1865 765273 Please ignore spelling and punctuation - I did.