Skip to content
Snippets Groups Projects
Commit d9bc85de authored by Libing Zhou's avatar Libing Zhou Committed by Linus Torvalds
Browse files

ROMFS: support inode blocks calculation


When use 'stat' tool to display file status, the 'Blocks' field always in
'0', this is not good for tool 'du'(e.g.: busybox 'du'), it always output
'0' size for the files under ROMFS since such tool calculates number of
512B Blocks.

This patch calculates approx.  number of 512B blocks based on inode size.

Signed-off-by: default avatarLibing Zhou <libing.zhou@nokia-sbell.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Link: http://lkml.kernel.org/r/20200811052606.4243-1-libing.zhou@nokia-sbell.com


Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6a6155f6
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment