|
|
About
TODO
Blog
RSS
Old blog
Projects
Gallery
Notes
Sun, 02 Mar 2008
Removing arbitrary size directory with single network command in POHMELFS.
All operations in pohmelfs
are made locally and are populated back to the server during writeback time (or via cache coherency
algorithm, which is not implemented fully yet). POHMELFS uses
writeback cache in all its power, which allows to remove directory of arbitrary size
using only single network command.
During unlink/rmdir time local object is removed and potentially destroyed, while short reference
of what it was is stored in a sync list of the parent, which is marked as dirty. So, when writeback
hits parent directory of the just removed object, it sends all information of the removed objects to the server.
So, when directory with arbitrary number
of subdirs and other objects is recursively removed locally, information is not sent, but added to appropriate
parent subdirs, which are removed in own turn, so when the whole subdir is removed, only single object
becomes dirty - parent of the just-removed directory, which contains information of the removed
dir. Message about this will be sent later (on writeback or because cache coherency protocol), which will
force server to remove the whole subdir recursively. This is much faster than sending information about
every single object being removed during recursive removal of the directory.
Of course if writeback starts hitting pohmelfs inodes during deletion time it is possible that not only
information about the highest removed directory will be sent, but also about some underlying subdirs, but
that does not matter a lot, since this is a very short condition (inode is in dirty list and yet not removed
by the recursive removal) and number of such inodes is still much smaller compared to overall number of removed
objects.
Actually cache coherency algorithm is the last serious thing to implement in pohmelfs I think. There are bugs
of course and some feature extensions, but major milestone will be set after this got implemented.
Stay tuned!
/devel/fs :: Link / Comments (0)
Please solve this captcha to be allowed to post (need to reload in a minute): 54 + 80
|