| To: | Eric Sandeen <sandeen@xxxxxxxxxxx> |
|---|---|
| Subject: | Re: any way to work backwards from xfs_inode_t to a filename? |
| From: | Ben Myers <bpm@xxxxxxx> |
| Date: | Wed, 15 May 2013 18:04:59 -0500 |
| Cc: | Chris Friesen <chris.friesen@xxxxxxxxxxx>, Alex Elder <elder@xxxxxxxxxx>, xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <51940A08.2040306@xxxxxxxxxxx> |
| References: | <5194050B.7010401@xxxxxxxxxxx> <20130515221000.GX812@xxxxxxx> <51940A08.2040306@xxxxxxxxxxx> |
| User-agent: | Mutt/1.5.20 (2009-06-14) |
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. ;)
Regards,
Ben
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: any way to work backwards from xfs_inode_t to a filename?, Dave Chinner |
|---|---|
| Next by Date: | Re: Rambling noise #2: Learning to use the v8 pquota/uquota patchset, Chandra Seetharaman |
| Previous by Thread: | Re: any way to work backwards from xfs_inode_t to a filename?, Eric Sandeen |
| Next by Thread: | Re: any way to work backwards from xfs_inode_t to a filename?, Chris Friesen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |