FS to physical disk block conversion
Dima Naumov
shadow_user at rambler.ru
Wed May 26 14:27:08 UTC 2010
I am sorry for my English. OK my problem: i do not understand how i can
get real address of disk block, when i use macros fsbtodb() to convert
fs address to physical disk block address i receive odd result, explain
me please where my error.
Example:
struct fs *sblock;
ino_t inode = 2;
caddr_t inoblock;
struct ufs2_dinode * ino;
...
if(pread(dev_fd, ino, sizeof(struct ufs2_dinode),\
(sblock->fs_bsize * fsbtodb(sblock, \
ino_to_fsba(sblock, inode)))) != sizeof(struct
ufs2_dinode))
error(__LINE__, errno);
After executing this string a not get correct inode in "ino". Please
explain, it important to me!
More information about the freebsd-fs
mailing list