From owner-p4-projects@FreeBSD.ORG Sun Jul 10 04:45:41 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8AA6916A421; Sun, 10 Jul 2005 04:45:40 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2373F16A41F for ; Sun, 10 Jul 2005 04:45:40 +0000 (GMT) (envelope-from soc-cjones@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C743443D53 for ; Sun, 10 Jul 2005 04:45:39 +0000 (GMT) (envelope-from soc-cjones@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j6A4jdYF021575 for ; Sun, 10 Jul 2005 04:45:39 GMT (envelope-from soc-cjones@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j6A4jdFr021572 for perforce@freebsd.org; Sun, 10 Jul 2005 04:45:39 GMT (envelope-from soc-cjones@freebsd.org) Date: Sun, 10 Jul 2005 04:45:39 GMT Message-Id: <200507100445.j6A4jdFr021572@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-cjones@freebsd.org using -f From: soc-cjones To: Perforce Change Reviews Cc: Subject: PERFORCE change 79891 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jul 2005 04:45:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=79891 Change 79891 by soc-cjones@soc-cjones_ides on 2005/07/10 04:45:06 Flesh out 'rename' plan. Affected files ... .. //depot/projects/soc2005/gvinum/docs/PLAN#2 edit Differences ... ==== //depot/projects/soc2005/gvinum/docs/PLAN#2 (text+ko) ==== @@ -9,15 +9,51 @@ - _move - Identify -f flag, drive, object(s) from argv - - Do sanity checks (is object already on drive?) - - Check whether there's free space - - Instantiate a new object on target drive - - Copy, verify, remove original object + - Do sanity checks (is object already on drive?) [kernel-side] + - Check whether there's free space [kernel-side] + - Instantiate a new object on target drive [kernel-side] + - Copy, verify, remove original object [kernel-side] + + req = gctl_get_handle(); + gctl_ro_param(req, "class", -1, "VINUM"); + gctl_ro_param(req, "verb", -1, "move"); - _rename - Identify -r flag, object, new name from argv - - Rename object + - Rename object (call 'move' verb) - Recurse over descendants if applicable + req = gctl_get_handle(); + gctl_ro_param(req, "class", -1, "VINUM"); + gctl_ro_param(req, "verb", -1, "rename"); + gctl_ro_param(req, "cmd", -1, "rename"); + gctl_ro_param(req, "argc", sizeof(int), &argc); + gctl_ro_param(req, "flags", sizeof(int), &flags); + gctl_ro_param(req, "argvX", ... argvX ...); + gctl_ro_param(req, "object", -1, argv[..]); + gctl_ro_param(req, "newname", -1, argv[..]); + gctl_issue(req); + ... error handling + gctl_free(req); + return; + Kernel ====== + +* Add hooks for 'rename', 'move' verbs in + sys/geom/vinum/geom_vinum.c:gv_config + +* Add 'rename' verb to VINUM GEOM class + - use 'object' and 'newname' as verb arguments + - int gv_rename(struct g_geom *, struct gctl_req *) + - Find object (drive, vol, plex, sd) [gv_object_type] + - Get {drive, volume, plex, sd} struct pointer + - Change name by twiddling ->name + - Fix up references in other structures + - for gv_drive: FOREACH subdisks, fix ->drive + - for gv_plex: FOREACH subsdisks, fix ->plex + - Commit to disk + +* Add 'move' verb to VINUM GEOM class + + - int gv_move(struct g_geom *, struct gctl_req *)