All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergio Paracuellos <sparacuellos@lock-linux.com>
To: LINUX-Fs-DEVEL <linux-fsdevel@vger.kernel.org>,
	winter <winter.sui@gmail.com>
Subject: Re: Problems with current file descriptor
Date: Thu, 27 Oct 2005 11:06:03 +0200	[thread overview]
Message-ID: <1130403963.2864.19.camel@localhost.localdomain> (raw)
In-Reply-To: <16f1140f0510270130t1609905as@mail.gmail.com>

El jue, 27-10-2005 a las 16:30 +0800, winter escribió:
> 2005/10/27, Sergio Paracuellos <sparacuellos@lock-linux.com>:
> > > current file ?what is meaning?
> > > for exmaple ,you opened 3 file, file1,file2, file3. which is current file?
> >
> > Sorry, I want the last file I used. For example if I just have done "cat
> > foobar" the file I want is this.
> >
> if you used the command "cat foobar", the linux kernel's do the
> following 3 phase for you:
>   1. open() --> sys_open()  // in this phase, the filp struct is
> create and save at
>                                         // current->files->fd[x]. the x=fd.
>   2. read() --> sys_read()    // in this phase, read file's data, the
> fd is not changed.
>   3. close() --> sys_close() // in this phase, free the filp struct.
> the result is
>                                        // current->files->fd[fd] = 0.
> so it is, kernel can not save the last file which you opend.
> which  phase you want get the path at?

The problem is I need to get complete path in lookup(). Lookup is the
first thig kernel execute and in lookup I can't get complete path
because I have a dentry structure...

cat foobar was an example I need to get the path in other operations too
like "write..." but always in lookup function.

Any ideas about it?

Thanks in advance,

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

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

  reply	other threads:[~2005-10-27  9:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-26 15:43 Problems with current file descriptor Sergio Paracuellos
2005-10-26 16:06 ` Jörn Engel
2005-10-27  2:34 ` winter
2005-10-27  7:20   ` Sergio Paracuellos
2005-10-27  8:30     ` winter
2005-10-27  9:06       ` Sergio Paracuellos [this message]
2005-10-27  9:26         ` Sergio Paracuellos
  -- strict thread matches above, loose matches on Subject: below --
2005-10-26 14:46 Sergio Paracuellos
2005-10-26 14:46 ` Sergio Paracuellos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1130403963.2864.19.camel@localhost.localdomain \
    --to=sparacuellos@lock-linux.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=winter.sui@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.