UFS and BIO_DELETE
BIO_DELETE is yet another I/O request. The two most famous I/O requests are of course BIO_READ and BIO_WRITE.
The BIO_DELETE bascially can be used to say “I don’t need this range of data anymore”. The underlying provider, which receives such a request can do various things, depending on its purpose. The geli(8) GEOM class, which implements disk encryption can, for example, fill the range of data with random bits. Memory- and swap-backed md(4) device could just free memory. Unfortunately there is currently no support for BIO_DELETE on file systems side. When UFS free some blocks, it should send BIO_DELETE.
And this is bascially what I recently implemented. Actually, it was surprisingly easy to implement, but it is not implemented correctly yet. The problem is that UFS use the buffer cache for writes. If it sends delayed write request, which is ment to update blocks used by the given inode and update free blocks bitmap I can’t send BIO_DELETE immediately. Sending BIO_DELETE right away means, that if a system crash or a power failure occurs between BIO_DELETE and inode update, we may end up with a file pointing to a garbage.
Why BIO_DELETE is worth implementing? Because once it’s in place we can implement a lot of really nice features on top of it. Let me name a few:
– md swap-backed temporary file system, on which when you delete a file, memory is freed, – blocks deallocation for gvirstor; gvirstor is a GEOM class implemented by Ivan Voras during Google SoC, which allows to initially define very large virtual provider, but with limited physical storage available, which one can add when needed; unfortunately currently when file is deleted, gvirstor has no way to reassign those blocks elsewhere, – GEOM compresion layer; actually it could be implemented without BIO_DELETE, but compression layer is about saving space, right? Actually adding compression to gvirstor may be not a bad idea, – maybe gjournal can hold its gjournal in free blocks and migrate journal when blocks are allocated?:) Silly idea, but having BIO_DELETE in place we can tell which blocks are really used by the file system and this is very powerful information.
January 30th, 2007 at 1:48 pm
Yay. Really cool stuff, thanks for your work!
Apropos BIO_*: I always wondered how sync and fflush could do their work without the BIO_FLUSH request you recently added.
March 4th, 2007 at 7:24 am
Thanks for your work!
March 10th, 2007 at 10:26 am
Just wanted to say thanks for all the hard work.
January 21st, 2008 at 11:36 am
If your friend aches for a brisk and manageable cash advance loans just search for for http://www.2minutecashadvance.com . They are convenient for loan seekers in Michigan and even for applicants from Wisconsin.
March 10th, 2008 at 8:34 am
$anchor$basketball Betting,final Four,final Four Betting,final Four Gambling,final Four Sports Book,final Four Sportsbook,march Madness,march Madness Betting,march Madness Gambling,march Madness Sports Book,march Madness Sportsbook,ncaa,ncaa Betting,...
$anchor$basketball Betting,final Four,final Four Betting,final Four Gambling,final Four Sports Book,final Four Sportsbook,march Madness,march Madness Betting,march Madness Gambling,march Madness Sports Book,march Madness Sportsbook,ncaa,ncaa Betting,nc…
March 13th, 2008 at 1:36 pm
Kennethssportsgrid7567$anchor$basketball Betting,final Four,final Four Betting,final Four Gambling,final Four Sports Book,final Four Sportsbook,march Madness,march Madness Betting,march Madness Gambling,march Madness Sports Book,march Madness Sportsb…
Kennethssportsgrid7567$anchor$basketball Betting,final Four,final Four Betting,final Four Gambling,final Four Sports Book,final Four Sportsbook,march Madness,march Madness Betting,march Madness Gambling,march Madness Sports Book,march Madness Sportsboo…
March 14th, 2008 at 8:44 am
YbjkqA cool blog, man!
March 15th, 2008 at 3:19 pm
4913CY U from Russia?
April 5th, 2008 at 11:54 pm
Please keep these excellent posts coming.
April 17th, 2008 at 7:42 am
Men, U cool
April 17th, 2008 at 5:44 pm
U cool, man
April 18th, 2008 at 6:54 am
wery good, respect!
April 18th, 2008 at 8:49 am
? ??? ????, ???? ?? ?????
April 18th, 2008 at 8:53 am
? ??? ????, ???? ?? ?????