flok99

current BlackHole de-dup scheme

Feb 26th, 2013
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. - get current hash H1 for this sector number
  2.  
  3. - new sector OR replacing data?
  4. - replacing data?
  5. - get number of references to this hash C1
  6. - decrease that count C1
  7. - new count C1 == 0?
  8. - delete hash H1/data pair
  9. - delete usage counter C1
  10. else
  11. - set new usage count C1
  12.  
  13. - get number of references to the new hash C2
  14. - increase that count C2
  15. - new count C2 == 1?
  16. - store hash H2 /data pair
  17. - set new usage count C2
  18.  
  19. - map sector number to new hash H2
Advertisement
Add Comment
Please, Sign In to add comment