linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* ubifs_jnl_update and extended attribute inode removal
@ 2012-05-10  3:19 Subodh Nijsure
  2012-05-10  4:31 ` Artem Bityutskiy
  0 siblings, 1 reply; 4+ messages in thread
From: Subodh Nijsure @ 2012-05-10  3:19 UTC (permalink / raw)
  To: linux-mtd

Hello,

Probably not many users of extended attributes on ubifs. I am trying to 
add this feature (patch v3) coming soon.

(xattr == extended attribute)

I have written updated the integck utility and discovered that sometimes 
files have wrong extended attributes. This happens only when some files 
are deleted from the filesystem.

Easy way to describe this is: I create 100 files, assign then extended 
attribute, and remember what the xattr was, it always stays the same. 
However now if I delete some of these files randomly some of the files 
end up having wrong xattr.

So  I have been trying to see how UBIFS handles file removal. I see that 
ubifs_unlink() calls ubifs_jnl_update() as:

         err = ubifs_jnl_update(c, dir, &dentry->d_name, inode, 1, 0);

However ubifs_jnl_update never removes the  inode that is created to 
store the xattr associated , when reference drops to zero. I certainly 
know how to get access to inode that holds the xattr, what would be the 
right place where I can delete this inode also.  Or does the UBIFS has 
some other logic that will cleanup the xattr orphan inode at later time?

Note, there are implementation of remove_xattr() and that works, but 
that function is only called when some user space program explicitly 
removes proceeds. I am just trying to get some advice from folks who 
understand tnc management far better than I do. Would appreciate the 
help/pointer.

-Subodh

-Subodh

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

end of thread, other threads:[~2012-06-05 12:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-10  3:19 ubifs_jnl_update and extended attribute inode removal Subodh Nijsure
2012-05-10  4:31 ` Artem Bityutskiy
2012-05-10 23:22   ` Subodh Nijsure
2012-06-05 12:07     ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).