Hi all,
I know you dont like it, but i need to get the device id as it appear
in user space from kernel space.
i know its anonymous device id and i should not get it. but i still need it.

I found there are 2 ways to get it:
1.  cast inode to btrfs_inode and get it from btrfs_inode->root->anon_dev
2. from dentry object: dentry->d_inode->i_op->getattr(NULL, dentry,kstat);

There is a problem !
Usually what I do on file system event is to take the
dentry->d_inode-... everything works fine.

BUT on rename operations, the signature for vfs_rename is dual of
inode-struct: (struct inode *, struct dentry *,struct inode *, struct
dentry *, unsigned int)
So what i do is take the 2nd dual dentry struct (destination dentry),
and when i look for d_inode, there is no inode.
And if i take the 2nd dual inode parameter from the vfs_rename
function and try to call it inode->i_op->getattr(...) with the 2nd
dual dentry -> I get btrfs_getattr exception.

Is there a solution ?
This happens on Suse kernel 3.12.69-60 - hello david s :)


-- 


-
Ilan Schwarts
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to