From owner-freebsd-geom@FreeBSD.ORG Wed Nov 30 19:01:51 2005 Return-Path: X-Original-To: freebsd-geom@freebsd.org Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E1DF416A41F for ; Wed, 30 Nov 2005 19:01:51 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from pinus.cc.fer.hr (pinus.cc.fer.hr [161.53.73.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 54AEB43D5A for ; Wed, 30 Nov 2005 19:01:51 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from [161.53.72.113] (lara.cc.fer.hr [161.53.72.113]) by pinus.cc.fer.hr (8.12.2/8.12.2) with ESMTP id jAUJ1fFx012990 for ; Wed, 30 Nov 2005 20:01:45 +0100 (MET) Message-ID: <438DF6F4.3040905@fer.hr> Date: Wed, 30 Nov 2005 20:01:08 +0100 From: Ivan Voras User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050921) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-geom@freebsd.org Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Subject: Two patches X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2005 19:01:52 -0000 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 :)