From mi@aldan.algebra.com Fri Apr 23 18:57:43 2010 Return-Path: Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6CA3106564A for ; Fri, 23 Apr 2010 18:57:43 +0000 (UTC) (envelope-from mi@aldan.algebra.com) Received: from smtp02.lnh.mail.rcn.net (smtp02.lnh.mail.rcn.net [207.172.157.102]) by mx1.freebsd.org (Postfix) with ESMTP id A32668FC17 for ; Fri, 23 Apr 2010 18:57:43 +0000 (UTC) Received: from mr08.lnh.mail.rcn.net ([207.172.157.28]) by smtp02.lnh.mail.rcn.net with ESMTP; 23 Apr 2010 14:57:43 -0400 Received: from mx04.lnh.mail.rcn.net (mx04.lnh.mail.rcn.net [207.172.157.54]) by mr08.lnh.mail.rcn.net (MOS 3.10.8-GA) with ESMTP id LOK10084; Fri, 23 Apr 2010 14:57:42 -0400 (EDT) Received: from pool-173-70-194-135.nwrknj.fios.verizon.net (HELO aldan.narawntapu) ([173.70.194.135]) by smtp04.lnh.mail.rcn.net with ESMTP; 23 Apr 2010 14:57:42 -0400 Received: from aldan.narawntapu (localhost [127.0.0.1]) by aldan.narawntapu (8.14.4/8.14.3) with ESMTP id o3NIvf6H052275 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 23 Apr 2010 14:57:41 -0400 (EDT) (envelope-from mi@aldan.algebra.com) Received: (from mi@localhost) by aldan.narawntapu (8.14.4/8.14.3/Submit) id o3NIvf0w052272; Fri, 23 Apr 2010 14:57:41 -0400 (EDT) (envelope-from mi) Message-Id: <201004231857.o3NIvf0w052272@aldan.narawntapu> Date: Fri, 23 Apr 2010 14:57:41 -0400 (EDT) From: "Mikhail T." Reply-To: "Mikhail T." To: FreeBSD-gnats-submit@freebsd.org Cc: Subject: optional offset for `mdconfig -t vnode' X-Send-Pr-Version: 3.113 X-GNATS-Notify: >Number: 145999 >Category: kern >Synopsis: [request] optional offset for `mdconfig -t vnode' >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: suspended >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Apr 23 19:00:12 UTC 2010 >Closed-Date: >Last-Modified: Thu Nov 18 18:30:12 UTC 2010 >Originator: Mikhail T. >Release: FreeBSD 7.3-STABLE amd64 >Organization: Virtual Estates, Inc. http://sybpipe.com/ >Environment: System: FreeBSD aldan.narawntapu 7.3-STABLE FreeBSD 7.3-STABLE #3: Fri Apr 9 17:20:45 EDT 2010 mi@aldan.narawntapu:/var/src/sys/amd64/compile/SILVER-SMP amd64 >Description: It is already possible to use only part of the file by explicitly specifying the size (mdconfig -s) of the md. For completeness, it should also be possible to request, that certain number of bytes be skipped from the beginning... If necessary, requiring that this offset be a multiple of 512 or some such is acceptable. For example: mdconfig -t vnode -f zhoo -b 8192 (-b would stand for "begin"). >How-To-Repeat: This could be useful for people dealing with files, that have file-system images embedded in them -- preceded by some other data... The only existing work-around for such situations is using something like dd skip= to produce a separate file, which can almost double the storage requirements and cause other inconvenience. I propose, that the md_base field of the md_ioctl struct (currently in use only in the MD_PRELOAD cases) be used for this purpose. >Fix: The userland changes (add an option for mdconfig.c) is easy. The kernel changes required are beyond my knowledge... >Release-Note: >Audit-Trail: State-Changed-From-To: open->suspended State-Changed-By: linimon State-Changed-When: Sat Apr 24 00:41:52 UTC 2010 State-Changed-Why: Mark suspended awaiting patches. http://www.freebsd.org/cgi/query-pr.cgi?pr=145999 From: Mateusz Guzik To: bug-followup@FreeBSD.org, mi@aldan.algebra.com Cc: Subject: Re: kern/145999: [request] optional offset for `mdconfig -t vnode' Date: Thu, 18 Nov 2010 19:29:05 +0100 This can be achieved with gnop(8). $ mdocnfig -t vnode md0 $ gnop create -o md0 $ ls /dev/md0* /dev/md0 /dev/md0.nop /dev/md0.nops1 /dev/md0.nops1a /dev/md0.nops1b /dev/md0.nops1d Have fun. :) -- Mateusz Guzik >Unformatted: