All pastes #30577 Raw Edit

neuron

public text v1 · immutable
#30577 ·published 2005-11-23 15:08 UTC
rendered paste body
decompress should open it's own fd and ignore filedata's.
 - This means on compressor_data close we can close the fd aswell? (bad idea)
 - truncate could be simpler this way
 
compress/compress_* can be made a bit simpler, it does goto out a lot, we can check if (fd > 0) close fd here, instead of putting it in every error handler.

Storing -> size in the database:
  store ->size in database and use it for getattr
   - list_move if entry is > 20 into the database, getattr calls are many in a row.
  clean on open() calls.
   - since it scans through the database anyway it can check ->accesses.
   - also modify open to not need lock on filename during scan, and only change filename with database lock.
need to update size on:
  truncate
  decompress
  open (pass size to quick_open)
  rename (invalidate it)
  unlink (invalidate it)
  
only run protect/unprotect when accesses > 0, this saves us some scans aswell.
merge protect/unprotect system with direct_compress, will save a LOT of scans, and it'll also work much better with rename/unlink scans.


CLEAN UP COMMENTS AT THE TOP OF DIRECT_COMPRESS