[lkml]   [2000]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Bug in block device read/write!
   Date: 	Fri, 08 Sep 2000 03:41:27 +0100
From: Anton Altaparmakov <>

I have been trying to get the linear md driver to work with NTFS volumes
for several months and it never worked. - I was suspecting the NTFS driver
(after having fixed linear md and verified that at least that worked fine)
but today I finally found why it doesn't work:

There is a bug in reading/writing to block devices. - It manifests itself
in the form that partitions are too small by exactly one sector!

Even though a cfdisk shows that a partition has a certain number of
sectors, you can never seek + read and/or write to the last sector (doing
file i/o using read/write(2) [also tried fread/fwrite(3), same result]. -
Last sector doesn't seem to exist. However reading the actual hd (/dev/hdb
or /dev/sda, ie. affects both IDE and SCSI) instead of the partition
(/dev/hdb7 or whatever) the sector does exist and contains the expected

This isn't a bug. The last sector is used by the md device to store the
md superblock.

- Ted
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:38    [W:3.035 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site