]> git.baikalelectronics.ru Git - kernel.git/commit
ROMFS: support inode blocks calculation
authorLibing Zhou <libing.zhou@nokia-sbell.com>
Fri, 16 Oct 2020 03:13:42 +0000 (20:13 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 16 Oct 2020 18:11:22 +0000 (11:11 -0700)
commit600a2f66af8adcf3f1c215ad9b142246f7492c82
tree9bc50688e46d1abe7af63709cabe8fef6fdb4c01
parentf34d5607768b7432e808596264063ecd144ffaa9
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: Libing Zhou <libing.zhou@nokia-sbell.com>
Signed-off-by: Andrew 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: Linus Torvalds <torvalds@linux-foundation.org>
fs/romfs/super.c