All of lore.kernel.org
 help / color / mirror / Atom feed
* inode number
@ 2003-05-06  3:27 Sumit Narayan
  2003-05-06  4:09 ` Valdis.Kletnieks
  0 siblings, 1 reply; 6+ messages in thread
From: Sumit Narayan @ 2003-05-06  3:27 UTC (permalink / raw)
  To: linux-kernel

Hi,

How do I know which file has what Inode number? and its under which super block?

Thanks

Sumit


____________________________________________________________
Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: inode number
@ 2003-05-06  3:52 Sumit Narayan
  2003-05-06  3:54 ` Kurt Wall
  2003-05-06  6:43 ` Lucas Correia Villa Real
  0 siblings, 2 replies; 6+ messages in thread
From: Sumit Narayan @ 2003-05-06  3:52 UTC (permalink / raw)
  To: linux-kernel

Hi,

Actually, what I meant with this was, suppose I have a file name, how do I get the inode for that? And also suppose I have the inode number, how do I get the complete object of that inode for use and manipulation?

Thanks in advance

Sumit
--

On Mon, 05 May 2003 23:27:32  
 Sumit Narayan wrote:
>Hi,
>
>How do I know which file has what Inode number? and its under which super block?
>
>Thanks
>
>Sumit
>
>
>____________________________________________________________
>Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
>http://login.mail.lycos.com/r/referral?aid=27005
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at  http://www.tux.org/lkml/
>


____________________________________________________________
Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: inode number
  2003-05-06  3:52 Sumit Narayan
@ 2003-05-06  3:54 ` Kurt Wall
  2003-05-06  6:43 ` Lucas Correia Villa Real
  1 sibling, 0 replies; 6+ messages in thread
From: Kurt Wall @ 2003-05-06  3:54 UTC (permalink / raw)
  To: Sumit Narayan; +Cc: linux-kernel

An unnamed Administration source, Sumit Narayan, wrote:
% Hi,
% 
% Actually, what I meant with this was, suppose I have a file name, how do I get the inode for that? And also suppose I have the inode number, how do I get the complete object of that inode for use and manipulation?

If you have a filename, stat(2); see also lstat(2) and fstat(2).

Kurt
-- 
Error in operator: add beer

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: inode number
  2003-05-06  3:27 inode number Sumit Narayan
@ 2003-05-06  4:09 ` Valdis.Kletnieks
  0 siblings, 0 replies; 6+ messages in thread
From: Valdis.Kletnieks @ 2003-05-06  4:09 UTC (permalink / raw)
  To: sumit_uconn; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 347 bytes --]

On Mon, 05 May 2003 23:27:32 EDT, Sumit Narayan <sumit_uconn@lycos.com>  said:
> How do I know which file has what Inode number? and its under which super blo
ck?

There's no single answer - multiple files can have the same inode number
(they're called hard links).  Finding which filesystem they are on
involves walking through the mount table..

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: inode number
  2003-05-06  3:52 Sumit Narayan
  2003-05-06  3:54 ` Kurt Wall
@ 2003-05-06  6:43 ` Lucas Correia Villa Real
  2003-05-06  6:51   ` Lucas Correia Villa Real
  1 sibling, 1 reply; 6+ messages in thread
From: Lucas Correia Villa Real @ 2003-05-06  6:43 UTC (permalink / raw)
  To: sumit_uconn; +Cc: linux-kernel

Hi,

You can give a look on user_path_walk() and user_path_walk_link() (see 
include/linux/fs.h), given you have the pathname. 
Given you have the inode number, you can get one of the references to it by 
using d_path() (see include/linux/sched.h). I just don't know how it works  
when there is multiple references to the same inode number (hard links).

Lucas


On Tuesday 06 May 2003 00:52, Sumit Narayan wrote:
> Hi,
>
> Actually, what I meant with this was, suppose I have a file name, how do I
> get the inode for that? And also suppose I have the inode number, how do I
> get the complete object of that inode for use and manipulation?
>
> Thanks in advance
>
> Sumit
> --
>
> On Mon, 05 May 2003 23:27:32
>
>  Sumit Narayan wrote:
> >Hi,
> >
> >How do I know which file has what Inode number? and its under which super
> > block?
> >
> >Thanks
> >
> >Sumit
> >
> >
> >____________________________________________________________
> >Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
> >http://login.mail.lycos.com/r/referral?aid=27005
> >-
> >To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> >the body of a message to majordomo@vger.kernel.org
> >More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >Please read the FAQ at  http://www.tux.org/lkml/
>
> ____________________________________________________________
> Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
> http://login.mail.lycos.com/r/referral?aid=27005
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: inode number
  2003-05-06  6:43 ` Lucas Correia Villa Real
@ 2003-05-06  6:51   ` Lucas Correia Villa Real
  0 siblings, 0 replies; 6+ messages in thread
From: Lucas Correia Villa Real @ 2003-05-06  6:51 UTC (permalink / raw)
  To: sumit_uconn; +Cc: linux-kernel

On Tuesday 06 May 2003 03:43, Lucas Correia Villa Real wrote:

> Given you have the inode number, you can get one of the references to it by

Sorry, I mean the struct file.

Lucas

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-05-06  6:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-06  3:27 inode number Sumit Narayan
2003-05-06  4:09 ` Valdis.Kletnieks
  -- strict thread matches above, loose matches on Subject: below --
2003-05-06  3:52 Sumit Narayan
2003-05-06  3:54 ` Kurt Wall
2003-05-06  6:43 ` Lucas Correia Villa Real
2003-05-06  6:51   ` Lucas Correia Villa Real

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.