In inode structure i see two entries of kdev_t namely i_dev and i_rdev. There is no documentation on what is the difference between them. the i_rdev is most frequently used one as accoding to my experience of going thru the code... but never have I known what is the actual difference between them.. can anyone help me thanks a lot, raghu On Mon, 25 Nov 2002, Felipe W Damasio wrote: > Raghu R. Arur wrote: > > given a file descriptor of a file ( not a device file like /dev/hda but > > a normal file like /sbin/ifconfig which actually resides on the device) > > can we get the information about on which device it is stored. > > You can use "fget (fd)" to return a "struct file" pointer. > > In this "struct file" pointer, you can use the "struct vfsmount > *f_vfsmnt" field with the "mntget" function to return the "struct > vfsmount" that contains the device this file is in (char *mnt_devname), > plus a lot more info about that device (check the "struct vfsmount" in > include/linux/mount.h) > > Kind Regards, > > Felipe > > -- > Kernelnewbies: Help each other learn about the Linux kernel. > Archive: http://mail.nl.linux.org/kernelnewbies/ > FAQ: http://kernelnewbies.org/faq/ > -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/