Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Apr 1996 00:30:07 +0200 (SAT)
From:      Peter van Heusden <pvh@leftside.its.uct.ac.za>
To:        freebsd-fs@freebsd.org
Subject:   Compressing filesystem: Technical issues
Message-ID:  <Pine.BSD.3.91.960426001058.18458A-100000@leftside>

next in thread | raw e-mail | index | archive | help
I'm slowly getting started on the issue of writing a compressing 
filesystem for BSD. The situation thus far:

1) I'm thinking of a model much like the Netware 4.x one, where a file is 
compressed if it has not been 'touched' (ie. read or written) in a 
certain time (e.g. a week). It is then decompressed on being 'touched'.

2) I think the correct approach is to base the filesystem on the existing 
ufs code, and just add a flag which can sit in the i_flag field of the 
inode which states whether this file is compressed or not. On a 
successful read or write (i.e. one where data has actually been moved 
to/from disk successfully) the to_be_compressed flag can be cleared.

3) I am as yet uncertain about some of the design of the mark and sweep 
process which would do the compressing. My current thinking is that this 
would be a daemon spawned at mount time which would cycle through the 
inodes (in numerical order) doing the mark 'n sweep thing using a new 
filesystem specific ioctl. An unmount would have to gracefully kill the 
daemon process, of course. I'm currently not certain where to put the 
temporary data during compression... in memory? In a filesystem?

4) I'll have to think up a good compression strategy which allows 
recovery from corruption, etc etc.

Anyway, in my mind, issue 3, the process to do the compressing, is the 
one I am having the most problems with. Any suggestions on the design of 
something like this would be appreciated.

Thanks,
Peter




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSD.3.91.960426001058.18458A-100000>