Getting absolute path of a dentry

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

 



Hello,

I'm developing some custom functionality in the kernel in the flavour
of inotify, basically creating a linked list (in the kernel) with all
changed dentries. Then I want to consume that list (just print the
file names from userspace). I've done all of this and I'm using
dentry_path_raw do get the path, this works well for mounts which
originate from the root mount point. However, in the case I have a
dentry which is not under the root mount dentry_path_raw returns the
path under the mount point but not the mount point itself. Concretely,
If I have my /home as a separate mount and something is changed under
/home/dir1/dir2/changed_file and I do the
dentry_path_raw(changed_file), the path returned is
/dir1/dir2/changed_file. So mu question is how do I also get the path
of the mount point included as well? I did try including more context,
than the dentry like the get_fs_root of the process which triggered
the change and then feeding the dentry + the vfsmount from the
changing process' root to d_absolute_path to no avail. Any ideas or
pointers would be greatly appreciated.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux