UBIFS question: Power-cuts after ubifs_leb_unmap()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Montag, 30. Juli 2018, 10:07:25 CEST schrieb Adrian Hunter:
> > With grouped nodes a power-cut is okay, the bigger problem is the number of xattrs.
> > We support up to 2^16. Do delete an inode via journal we need UBIFS_INO_NODE_SZ bytes
> > in the journal.
> > So, in worst case we need to write 2^16 times UBIFS_INO_NODE_SZ bytes to the journal.
> > I'm still looking into this option right now, just to be sure that this is really the
> > solution to the problem I see. Finding a stable reproducer is also not easy...
> > 
> > Another possibility is playing with ubifs_tnc_remove_ino(), upon unlink() it removes
> > all entries from the TNC and marks them as dirty.
> > The problem is that also all xattr inodes are marked as dirty.
> > If we manage to find a way that these get marked only as dirty when we are sure that
> > they are gone the GC will no longer unmap a "used" LEB.
> > But that all is very tricky.
> 
> What about: add the inode to be deleted to orphans, then delete the xattrs
> one at a time, then when they are all gone, delete the inode and remove it
> from orphans.

Hmm, deleting one at a time still means that UBIFS has to write up to 2^16 times
to the journal.
But I agree this approach is better than allocating space for 2^16 inodes at once
in the journal.
Using the orphan list we can make sure that deletion still is atomic.

Thanks,
//richard




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux