Hello.

Nice post. I had never noticed that. And I am able to reproduce the ls-stat 
behavior on a debian box with ext4 fs and no SELinux, or any other ACL's 
whatsoever.

In any case, from here,

On Jul 2, 2011, at 8:00 AM, Mulyadi Santosa wrote:
> 
> Few kind people already share their opinions on Linkedin. Here is the
> summary so far:
> http://the-hydra.blogspot.com/2011/07/feedback-regarding-my-stat-or-ls-post.html

You state:

> But my friend pointed that stat was accouting extra blocks that might (I say 
> "might" because my friend is not so sure) contain metadata such as SELinux 
> and ACL.

I am no ext3 expert, but I cannot wrap my head around the FS accounting for 
*metadata* blocks when stat is invoked. And I don't believe the ACLs would be 
kept within data blocks either, so this makes little sense to me.

In any case, after looking at ext3, I now believe the 'getattr' method in 
'struct inode_operations' is left for the VFS to handle with its 
'generic_fillattr()' method, and it pretty much copies everything relevant from 
the inode to the 'struct kstat'. Thing is, does the inode 'i_blocks' field keep 
track of both metadata and data blocks, or only data blocks? (I think only the 
latter makes any sense, but hey, that's just me).

---
João Eduardo Luís
gpg key: 477C26E5 from pool.keyserver.eu 





Attachment: PGP.sig
Description: This is a digitally signed message part

_______________________________________________
Kernelnewbies mailing list
[email protected]
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to