All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Friesen <chris.friesen@genband.com>
To: Ben Myers <bpm@sgi.com>
Cc: Alex Elder <elder@kernel.org>, Eric Sandeen <sandeen@sandeen.net>,
	xfs@oss.sgi.com
Subject: Re: any way to work backwards from xfs_inode_t to a filename?
Date: Thu, 16 May 2013 09:44:57 -0600	[thread overview]
Message-ID: <5194FEF9.6040802@genband.com> (raw)
In-Reply-To: <20130515230459.GY812@sgi.com>

On 05/15/2013 05:04 PM, Ben Myers wrote:
> Chris,
>
> On Wed, May 15, 2013 at 05:19:52PM -0500, Eric Sandeen wrote:
>> On 5/15/13 5:10 PM, Ben Myers wrote:
>>>> 1) do_unlinkat() has the filesystem path, but iput() returns void.
>>>> Is there any way for me to add instrumentation to xfs_inactive() to
>>>> work backwards from the xfs_inode_t pointer to print out a path to
>>>> the file being deleted?
>>>
>>> Use VFS_I to get to a 'struct inode' and from there you can look at the
>>> dentries on i_dentry list and traverse back through the path by looking at
>>> d_parent.  Might be easier to just print the path in do_unlinkat?
>>
>> or just print out the inode nr (i_ino) and do a find -inum after the fact.  :)
>
> +1
>
> Dave pointed out that you might not be able to get to the inode at this point
> in the lifecycle.  Apologies if I posted misinformation.  ;)

Thanks guys,

I'm headed away for a few days so it'll be a while before I can dig into 
this again, but this should give me a good start.

Chris

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2013-05-16 15:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-15 21:58 any way to work backwards from xfs_inode_t to a filename? Chris Friesen
2013-05-15 22:10 ` Ben Myers
2013-05-15 22:19   ` Eric Sandeen
2013-05-15 23:04     ` Ben Myers
2013-05-16 15:44       ` Chris Friesen [this message]
2013-05-15 22:20 ` Dave Chinner

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=5194FEF9.6040802@genband.com \
    --to=chris.friesen@genband.com \
    --cc=bpm@sgi.com \
    --cc=elder@kernel.org \
    --cc=sandeen@sandeen.net \
    --cc=xfs@oss.sgi.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.