Hi, > > 2. The no. of 512-byte blocks allocated to a file > corresponds to a size in bytes that is the nearest > multiple of 4096 greater than or equal to the > filesize + an extra 4096 bytes. For example, 4096 > bytes are allocated to a zero byte file, 8192 bytes > for a file with any size between 1 and 4096 bytes, > and so on. > > Question: Why should any file be allocated an extra > 4096-byte block? > This is what your program shows on my system: nitin@nitin:~/test$ ./blocks file.txt size: 637 pref blksize: 4096 blocks: 8 blocks * 512 = 4096 which is same as one would expect. It doesn't show any extra block allocated to this file. Can you mail output on your system? niTin -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/