From owner-freebsd-bugs@FreeBSD.ORG Fri Apr 23 19:00:13 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AADD106566B for ; Fri, 23 Apr 2010 19:00:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0E6438FC19 for ; Fri, 23 Apr 2010 19:00:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o3NJ0Cw3070009 for ; Fri, 23 Apr 2010 19:00:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o3NJ0C7c070008; Fri, 23 Apr 2010 19:00:12 GMT (envelope-from gnats) Resent-Date: Fri, 23 Apr 2010 19:00:12 GMT Resent-Message-Id: <201004231900.o3NJ0C7c070008@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Mikhail T." 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." To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/145999: optional offset for `mdconfig -t vnode' X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Mikhail T." List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Apr 2010 19:00:13 -0000 >Number: 145999 >Category: kern >Synopsis: optional offset for `mdconfig -t vnode' >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >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: >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: >Unformatted: