8 Dec 2004 DV   » (Master)

Gnome

Seems I will be back on the board again next year. A bit disapointed by the low number of overall casted votes.

Mapping file in partitions

Old-timers like me probably remember the PCTools defragger interface where you could see the map of the blocks moving while data were compacted. I had the need to at least get an equivalent static picture for a set of files in Linux partitions. Shortest way was
1/ a small program extracting filesystem and data index informations and generating XML data, this need to run as root. It takes the list of files either on the CLI or using a --list filelist option
2/ a small XSLT stylesheet generating SVGs out of it (there is a line wrapping bug I know, not implemented yet).

First example was to map the set of file from /etc/readahead.files, here is the first map. Then by doing:

mkdir /temp
for f in `cat /etc/readahead.files` ; do \cp -f $f . ; done
rm -f temp/*
for f in `cat /etc/readahead.files` ; do \cp -f $f . ; done

The new set of files in /temp looks easier to fetch from disk. So at least from a basic experiment it seems one could do some interesting trick to speed up loading a bunch of files even without implementing hard kernel APIs. This still need a lot of work to really get an estimate of how best to do this and how efficient it would really be (plus the map does not include the directories and fs metadata)

BTW is there an SVG viewer with <title> support, i.e. showing a tooltip with the string associated with the element, that would allow to just point at the block and see what file it maps to, that would be extremely convenient and possibly fun too. Speaking of fun I ran it for the list generated by rpm -ql openoffice.org ... try it, it's scary ! The fact that I ran multiple upgrades of my system instead of fresh reinstalls is likely to have made thing worse.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!