Re: Possibly OT: no. of blocks allocated to a file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux