mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Anton Altaparmakov <aia21@cam.ac.uk>
To: David Sanders <linux@sandersweb.net>
Cc: LKML <linux-kernel@vger.kernel.org>,
	ntfsdev <linux-ntfs-dev@lists.sourceforge.net>
Subject: Re: [PATCH-BK-2.6] NTFS fix "du" and "stat" output (NTFS 2.1.6).
Date: Thu, 22 Jan 2004 09:29:58 +0000	[thread overview]
Message-ID: <1074763798.16785.35.camel@imp.csi.cam.ac.uk> (raw)
In-Reply-To: <200401211412.55229@sandersweb.net>

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/



  reply	other threads:[~2004-01-22  9:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-19 14:15 Anton Altaparmakov
2004-01-21 18:24 ` David Sanders
2004-01-21 19:14   ` David Sanders
2004-01-22  9:29     ` Anton Altaparmakov [this message]
2004-01-21 19:38   ` David Sanders
2004-01-22 10:32     ` Anton Altaparmakov
2004-01-22  9:20   ` Anton Altaparmakov
2004-01-22 17:48     ` David Sanders

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1074763798.16785.35.camel@imp.csi.cam.ac.uk \
    --to=aia21@cam.ac.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-ntfs-dev@lists.sourceforge.net \
    --cc=linux@sandersweb.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®