Two patches

Ivan Voras ivoras at fer.hr
Wed Nov 30 19:01:52 GMT 2005


If anyone's interested, I've made two patches to GEOM-related utilities:

- g_zero
Normally, g_zero is a provider of a huge device made of zeros. My patch 
extends this to allow specifying some other byte that the device should 
be made of, via kern.geom.zero.byte sysctl. The usage for this is mainly 
for testing & poking around the system, for example when testing 
something geom-related on a device already erased with zeros from 
previous testing attempts, so to distinguish the new write's effect (or 
also something like a general purpose /dev/zero :) ).

This is a simple patch at:
http://ivoras.sharanet.org/stuff/g_zero.c.diff

(it should be applied to sys/geom/zero/g_zero.c)

- ggatel
Ggatel is (mostly) used to export a file as a device, similar to md(4). 
I've added the option to log all I/O requests when they pass through the 
device in one of several modes: "short" - a text file that just contains 
the type of operation, offset and length of I/O, "long" that also 
hexdumps the data and "binary" that dumps the struct g_gate_ctl_io and 
buffer data as binary records. This is useful to record & analyze access 
patterns to the device (for example, coming from the filesystem layer).

The archive containing source files with Makefile and the patches is at:
http://ivoras.sharanet.org/stuff/ggatel.tgz

I've also modified the man page :)



More information about the freebsd-geom mailing list