* Mapping Inode to File
@ 2010-10-22 14:22 Artur Baruchi
0 siblings, 0 replies; 4+ messages in thread
From: Artur Baruchi @ 2010-10-22 14:22 UTC (permalink / raw)
To: linux-kernel
Hi Guys.
Is there a way to map an Inode number to a File (file path and name)
in a kernel module ?
Thanks,
Att.
Artur Baruchi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Mapping Inode to File
[not found] <fGqN4-2Ns-3@gated-at.bofh.it>
@ 2010-10-22 14:51 ` Bodo Eggert
2010-10-22 16:09 ` Artur Baruchi
0 siblings, 1 reply; 4+ messages in thread
From: Bodo Eggert @ 2010-10-22 14:51 UTC (permalink / raw)
To: Artur Baruchi, linux-kernel
Artur Baruchi <mail.baruchi@gmail.com> wrote:
> Hi Guys.
>
> Is there a way to map an Inode number to a File (file path and name)
> in a kernel module ?
Imagine this:
ln /foo/bar/baz /bar/baz/foo
sleep 2147483647 < /foo/bar/baz &
pivot_root /mnt /mnt/asd
chroot /mnt/asd/foo
What is the name you'd assign to that inode?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Mapping Inode to File
2010-10-22 14:51 ` Mapping Inode to File Bodo Eggert
@ 2010-10-22 16:09 ` Artur Baruchi
2010-10-22 16:59 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Artur Baruchi @ 2010-10-22 16:09 UTC (permalink / raw)
To: 7eggert; +Cc: linux-kernel
Sorry, didnt understand your point.
Could you please clarify?
Note that I need to retrieve the file name in Kernel Space, Im able to
get the inode, but now I need to convert this inode to a name
(something that I could use).
Thanks in advance.
Att.
Artur Baruchi
On Fri, Oct 22, 2010 at 12:51 PM, Bodo Eggert <7eggert@web.de> wrote:
> Artur Baruchi <mail.baruchi@gmail.com> wrote:
>
>> Hi Guys.
>>
>> Is there a way to map an Inode number to a File (file path and name)
>> in a kernel module ?
>
> Imagine this:
>
> ln /foo/bar/baz /bar/baz/foo
> sleep 2147483647 < /foo/bar/baz &
> pivot_root /mnt /mnt/asd
> chroot /mnt/asd/foo
>
> What is the name you'd assign to that inode?
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Mapping Inode to File
2010-10-22 16:09 ` Artur Baruchi
@ 2010-10-22 16:59 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2010-10-22 16:59 UTC (permalink / raw)
To: Artur Baruchi; +Cc: 7eggert, linux-kernel
A: No.
Q: Should I include quotations after my reply?
http://daringfireball.net/2007/07/on_top
On Fri, Oct 22, 2010 at 02:09:44PM -0200, Artur Baruchi wrote:
> Sorry, didnt understand your point.
>
> Could you please clarify?
The point is that, no, it's not simple to do this at all.
> Note that I need to retrieve the file name in Kernel Space, Im able to
> get the inode, but now I need to convert this inode to a name
> (something that I could use).
How about explaining why you need to get the file name from within the
kernel? Perhaps there's a better way to do what you are trying to
accomplish.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-10-22 17:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <fGqN4-2Ns-3@gated-at.bofh.it>
2010-10-22 14:51 ` Mapping Inode to File Bodo Eggert
2010-10-22 16:09 ` Artur Baruchi
2010-10-22 16:59 ` Greg KH
2010-10-22 14:22 Artur Baruchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox