How to safely access inode/dentry from struct page * (contained in bio)?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am trying to obtain file name at block layer level (above IO scheduler).
At this level I receive bio structure(describing write), within which
page pointers are kept.

Thereby I do following to obtain the inode and dentry -

struct inode *inode_ptr = page->mapping->host;
if (inode_ptr != NULL)
/* Access dentry i.e. i_dentry in the inode */


This works usually. But problem is, inode and dentry may get released
from inode and dentry cache at any time.
While accessing inode/dentry I need to ensure that till the time I am
accessing'em these structure remain valid in memory.
Is it possible to ensure that? Which structures/locks I need to check
for the purpose.

Appreciate any help.

Thanks!

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




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux