Messages in this thread | | | Subject | Re: [PATCH-BK-2.6] NTFS fix "du" and "stat" output (NTFS 2.1.6). | From | Anton Altaparmakov <> | Date | Thu, 22 Jan 2004 09:29:58 +0000 |
| |
On Wed, 2004-01-21 at 19:14, David Sanders wrote: [snip] > Also, chkdsk in winnt4 reports the cluster size in 512 bytes. The ntfs > driver seems to think the size is 4096 bytes (or 1024 bytes in 2.4 > kernel).
To quote from the man page for "stat(2)":
"The value st_blksize [which is the "IO Block:" field in the stat(1) output you are referring to above] gives the "preferred" blocksize for efficient file system I/O. (Writing to a file in smaller chunks may cause an inefficient read-modify-rewrite.)"
And this is what it is saying. In the new NTFS driver doing any form of i/o is most efficient if it is done in 4096 byte chunks, i.e. a single read or write of 4096 bytes will be faster than reading or writing a single byte 4096 times over. The old NTFS driver didn't really care. IMO 512 would have been a better value to 1024 as the driver uses 512 byte i/o requests but it doesn't really matter much.
To summarise: the st_blksize/"IO Block" has absolutely nothing at all to do with the cluster size of the NTFS volume.
Best regards,
Anton -- Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @) Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/
- 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/
| |