public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* Adding attr, inode reference query
@ 2008-10-07  0:04 Barry Naujok
  2008-10-07  0:45 ` Timothy Shimmin
  2008-10-07  0:54 ` Dave Chinner
  0 siblings, 2 replies; 6+ messages in thread
From: Barry Naujok @ 2008-10-07  0:04 UTC (permalink / raw)
  To: xfs@oss.sgi.com, xfs-dev

I'm doing a bit of debugging with attr creation in xfs_repair which uses
libxfs which has it's own simple cache/ref counting/transaction mechanism
for inodes and buffers.

I came across a refcounting issue when adding an extended attribute to an
inode, calling xfs_attr_set_int (indirectly in Phase 6):
   - if there are no extended attributes, a attr fork area is created within
     the inode (calling xfs_bmap_add_attrfork). After this call in libxfs,
     the inode is derefenced.
   - if extended attributes already exist, the inode isn't dereferenced
     after calling xfs_attr_set_int.

I seem to have traced this down to xfs_bmap_add_attrfork not calling
xfs_trans_ihold after calling xfs_trans_ijoin like other similar functions.
BUT, it does call IHOLD(ip).

It seems most other routines do call xfs_trans_ihold, esp in the attr code.

Also, it seems IHOLD isn't normally called in these routine in the
core XFS code.

Is this a bug in xfs_bmap_add_attrfork?

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

end of thread, other threads:[~2008-10-07  2:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-07  0:04 Adding attr, inode reference query Barry Naujok
2008-10-07  0:45 ` Timothy Shimmin
2008-10-07  0:54 ` Dave Chinner
2008-10-07  1:23   ` Timothy Shimmin
2008-10-07  1:30     ` Timothy Shimmin
2008-10-07  1:51       ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox