Skip to contentSkip to conversation

b_dev vs. b_rdev confusion

DISCUSSION [email protected] 1 participant 1 message Jun 19, 2001

lore
Share & tools
lore
#0 lore raw
Quoted 1 line

how do the inode->i_dev, i_rdev fit into this?

These are what you see with stat(2).
i_dev gives the device the file is on
i_rdev is usually undefined, but for device special files it gives the real device.

Quoted 2 lines

Is there a set rule on when/where one should use a buffer head's b_dev and when/where one should use b_rdev?

b_dev gives the device the user was thinking about b_rdev is the actual underlying device

Andries