11-03-2003
9,926,
461
Join Date: Aug 2001
Last Activity: 26 February 2016, 12:31 PM EST
Location: Ashburn, Virginia
Posts: 9,926
Thanks Given: 63
Thanked 461 Times in 270 Posts
Please read our rules. You will find a link to our rules at the bottom of the page. You really do not increase your chances of an answer by forcing the mods to delete your duplicate post.
The answer to your question would depend on such things as which OS and which filesystem you are talking about. Once filesystems with variable geometry arose, that macro became worthless anyway. You're supposed to get the value out of the superblock. The traditional location was <sys/param.h> and HP-UX still has:
#define INOPB(fs) ((fs)->fs_inopb)
which I suppose could be called a "calculation".
It looks like Sun moved it to <sys/fs/ufs_fs.h> perhaps because it looks like it won't work with veritas file systems. But there is a define for fs_inopb in vx_layout.h on Suns and vx_fs.h on HP's which looks like it extends the INOPB macro into veritas filesystems.
If you're using other OS's or filesystems, you're on your own.