From owner-freebsd-geom@FreeBSD.ORG Mon Nov 13 11:08:15 2006 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 0288C16A541 for ; Mon, 13 Nov 2006 11:08:15 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C3B8C43D67 for ; Mon, 13 Nov 2006 11:08:14 +0000 (GMT) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id kADB8EHx091416 for ; Mon, 13 Nov 2006 11:08:14 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id kADB8BIR091412 for freebsd-geom@FreeBSD.org; Mon, 13 Nov 2006 11:08:11 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 13 Nov 2006 11:08:11 GMT Message-Id: <200611131108.kADB8BIR091412@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: linimon set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-geom@FreeBSD.org Cc: Subject: Current problem reports assigned to you 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: Mon, 13 Nov 2006 11:08:15 -0000 Current FreeBSD problem reports Critical problems Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/73177 geom kldload geom_* causes panic due to memory exhaustion o kern/76538 geom [gbde] nfs-write on gbde partition stalls and continue o kern/83464 geom [geom] [patch] Unhandled malloc failures within libgeo o kern/84556 geom [geom] GBDE-encrypted swap causes panic at shutdown o kern/87544 geom [gbde] mmaping large files on a gbde filesystem deadlo o kern/89102 geom [geom_vfs] [panic] panic when forced unmount FS from u o bin/90093 geom fdisk(8) incapable of altering in-core geometry o kern/90582 geom [geom_mirror] [panic] Restore cause panic string (ffs_ o kern/98034 geom [geom] dereference of NULL pointer in acd_geom_detach o kern/104389 geom [geom] [patch] sys/geom/geom_dump.c doesn't encode XML 10 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o bin/78131 geom gbde "destroy" not working. o kern/79251 geom [2TB] newfs fails on 2.6TB gbde device o kern/94632 geom [geom] Kernel output resets input while GELI asks for 3 problems total. From owner-freebsd-geom@FreeBSD.ORG Tue Nov 14 16:36:33 2006 Return-Path: X-Original-To: freebsd-geom@hub.freebsd.org Delivered-To: freebsd-geom@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1A6F116A403; Tue, 14 Nov 2006 16:36:33 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C61D43D6B; Tue, 14 Nov 2006 16:36:32 +0000 (GMT) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id kAEGaWTm074198; Tue, 14 Nov 2006 16:36:32 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id kAEGaWsD074194; Tue, 14 Nov 2006 16:36:32 GMT (envelope-from linimon) Date: Tue, 14 Nov 2006 16:36:32 GMT From: Mark Linimon Message-Id: <200611141636.kAEGaWsD074194@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-geom@FreeBSD.org Cc: Subject: Re: kern/105390: [geli] filesystem on a md backed by sparse file with softupdates enabled leads to wdrain livelock. 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: Tue, 14 Nov 2006 16:36:33 -0000 Synopsis: [geli] filesystem on a md backed by sparse file with softupdates enabled leads to wdrain livelock. Responsible-Changed-From-To: freebsd-bugs->freebsd-geom Responsible-Changed-By: linimon Responsible-Changed-When: Tue Nov 14 16:36:25 UTC 2006 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=105390 From owner-freebsd-geom@FreeBSD.ORG Tue Nov 14 23:00:33 2006 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 6B6F516A492 for ; Tue, 14 Nov 2006 23:00:33 +0000 (UTC) (envelope-from adamsch1@yahoo.com) Received: from web31801.mail.mud.yahoo.com (web31801.mail.mud.yahoo.com [68.142.207.64]) by mx1.FreeBSD.org (Postfix) with SMTP id EFBA043D58 for ; Tue, 14 Nov 2006 23:00:32 +0000 (GMT) (envelope-from adamsch1@yahoo.com) Received: (qmail 45379 invoked by uid 60001); 14 Nov 2006 23:00:32 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=CSROwfLI9i/4rXzs7b1i+1pHR7jJ7BXsMyNklf5hhCXlsZ7uXYS7YPCnT50mMMSzSbcueQImmv7mtVLfHnDOgIW4zr/XK1NTECM3DNo+9x36iLy6pvehMmuRFn0FJ948sdnZ5du5kWs7U0InSgDEMn6x3iVJ592yy/030fCdzMo= ; Message-ID: <20061114230032.45377.qmail@web31801.mail.mud.yahoo.com> Received: from [207.126.230.225] by web31801.mail.mud.yahoo.com via HTTP; Tue, 14 Nov 2006 15:00:32 PST Date: Tue, 14 Nov 2006 15:00:32 -0800 (PST) From: Shane Adams To: freebsd-geom@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Tue, 14 Nov 2006 23:37:51 +0000 Subject: g_access questions (Out on a limb here) 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: Tue, 14 Nov 2006 23:00:33 -0000 Hello,=0A=0AI have a question regarding g_access. I'm mounting a custom fi= lesytem twice against the same device. The first time I'm mounting it with= read/write access, I then mount the same device to a different mount point= . After I do this, the first mount starts getting write errors, so somehow= the second mount is screwing up access rights to the device. For what its= worth, I'm mounting a ram backed mdconfig device.=0A=0AI'm not sure if thi= s is a geom related issue, or related to the fact that you cannot mount a d= evice more than twice in vfs?=0A=0AAnyway - the first time I mount (R/W) I = do:=0A=0Ag_access(cp, 1,1, 0)=0A=0AI then mount the device again as read on= ly to a different mount point with =0A=0Ag_access(cp,1,0,0)=0A=0AThe code I= used is taken from g_vfs_open with wr flag set depending if write access i= s required:=0A=0A pp =3D g_dev_getprovider(vp->v_rdev);=0A if (pp = =3D=3D NULL)=0A return (ENOENT);=0A gp =3D g_new_geom= f(&g_vfs_class2, "%s.%s", fsname, pp->name);=0A cp =3D g_new_consume= r(gp);=0A g_attach(cp, pp);=0A error =3D g_access(cp, 1, wr, = 0);=0A if (error) {=0A g_wither_geom(gp, ENXIO);=0A = return (error);=0A }=0A=0ACheers,=0A Shane=0A=0A=0A= =0A=0A =0A_________________________________________________________________= ___________________=0AWant to start your own business?=0ALearn how on Yahoo= ! Small Business.=0Ahttp://smallbusiness.yahoo.com/r-index From owner-freebsd-geom@FreeBSD.ORG Wed Nov 15 10:30:20 2006 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 2B9C316A412 for ; Wed, 15 Nov 2006 10:30:20 +0000 (UTC) (envelope-from matthew_buckland@wordbank.com) Received: from mail.wordbank.com (mail.wordbank.com [213.86.82.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 33C9843D5E for ; Wed, 15 Nov 2006 10:30:16 +0000 (GMT) (envelope-from matthew_buckland@wordbank.com) Received: from 10.1.1.227 by mail.wordbank.com ([10.1.1.10]) with ESMTP for ; Wed, 15 Nov 2006 10:29:26 -0000 Received: by mcmatt (Postfix, from userid 1000) id 5A7B062AE8; Wed, 15 Nov 2006 10:29:52 +0000 (GMT) Date: Wed, 15 Nov 2006 10:29:52 +0000 To: freebsd-geom@freebsd.org Message-ID: <20061115102951.GA14794@wordbank.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.12-2006-07-14 From: matthew_buckland@wordbank.com(Matt Buckland) X-Authenticated-Sender: matthew_buckland X-Server: VPOP3 V1.5.4 - Registered Subject: gconcat, convert manual to automatic 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, 15 Nov 2006 10:30:20 -0000 Hello there Geom list! Forgive me if I sound stupid, I am quite new to geom, but have searched the archives and could not find an answer to my question. I have created a volume using the following command: gconcat create big0 /dev/ad4 /dev/ad6 /dev/ad10 I then created a filesystem: newfs /dev/concat/big0 I then added a disk and recreated the volume: gconcat create big0 /dev/ad4 /dev/ad6 /dev/ad10 /dev/ad8 and grew the filesystem growfs /dev/concat/big0 Everything is fine when I manually create the volume, I can mount it and fsck it, but when I try: gconcat label big0 /dev/ad4 /dev/ad6 /dev/ad10 /dev/ad8 I cannot mount or fsck it, fsck gives me the following output: ** /dev/concat/big0 BAD SUPER BLOCK: VALUES IN SUPER BLOCK DISAGREE WITH THOSE IN FIRST ALTERNATE ioctl (GCINFO): Inappropriate ioctl for device fsck_4.2bsd: /dev/concat/big0: can't read disk label I have also noticed a difference in the position of one of the providers, which is presumably causing the problem and is presumably because the metadata has been written and is taking up the space. The two listed outputs look like this: Geom name: big0 State: UP Status: Total=4, Online=4 Type: MANUAL ID: 1212663410 Providers: 1. Name: concat/big0 Mediasize: 1200273629184 (1.1T) Sectorsize: 512 Mode: r0w0e0 Consumers: 1. Name: ad4 Mediasize: 300001443840 (279G) Sectorsize: 512 Mode: r0w0e0 Start: 0 End: 300001443840 2. Name: ad6 Mediasize: 300090728448 (279G) Sectorsize: 512 Mode: r0w0e0 Start: 300001443840 End: 600092172288 3. Name: ad10 Mediasize: 300090728448 (279G) Sectorsize: 512 Mode: r0w0e0 Start: 600092172288 End: 900182900736 4. Name: ad8 Mediasize: 300090728448 (279G) Sectorsize: 512 Mode: r0w0e0 Start: 900182900736 End: 1200273629184 and this: Geom name: big0 State: UP Status: Total=4, Online=4 Type: AUTOMATIC ID: 2839129485 Providers: 1. Name: concat/big0 Mediasize: 1200273627136 (1.1T) Sectorsize: 512 Mode: r0w0e0 Consumers: 1. Name: ad4 Mediasize: 300001443840 (279G) Sectorsize: 512 Mode: r0w0e0 Start: 0 End: 300001443328 2. Name: ad6 Mediasize: 300090728448 (279G) Sectorsize: 512 Mode: r0w0e0 Start: 300001443328 End: 600092171264 3. Name: ad10 Mediasize: 300090728448 (279G) Sectorsize: 512 Mode: r0w0e0 Start: 600092171264 End: 900182899200 4. Name: ad8 Mediasize: 300090728448 (279G) Sectorsize: 512 Mode: r0w0e0 Start: 900182899200 End: 1200273627136 So, eventually, my question is: is it possible to have this volume automatically created on loading of the kermel module, or must I dump and restore the filesystem? Would it have made a difference if I had made the filesystem within a partition, rather than directly onto the disk? Thankyou very much for any input on this. Matt -- Matthew Buckland, Network / Support Analyst Wordbank Limited 33 Charlotte Street, London W1T 1RR Direct line: +44 (0) 20 7903 8847 Fax: +44 (0) 20 7903 8888 From owner-freebsd-geom@FreeBSD.ORG Wed Nov 15 14:05:15 2006 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 9FAA916A407 for ; Wed, 15 Nov 2006 14:05:15 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh1.centtech.com (moat3.centtech.com [64.129.166.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id B79BA43E15 for ; Wed, 15 Nov 2006 14:03:32 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh1.centtech.com (8.13.8/8.13.8) with ESMTP id kAFE3US6016211; Wed, 15 Nov 2006 08:03:31 -0600 (CST) (envelope-from anderson@centtech.com) Message-ID: <455B1E37.3000201@centtech.com> Date: Wed, 15 Nov 2006 08:03:35 -0600 From: Eric Anderson User-Agent: Thunderbird 1.5.0.7 (X11/20061015) MIME-Version: 1.0 To: Shane Adams References: <20061114230032.45377.qmail@web31801.mail.mud.yahoo.com> In-Reply-To: <20061114230032.45377.qmail@web31801.mail.mud.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88.4/2195/Tue Nov 14 13:53:04 2006 on mh1.centtech.com X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=8.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.6 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on mh1.centtech.com Cc: freebsd-geom@freebsd.org Subject: Re: g_access questions (Out on a limb here) 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, 15 Nov 2006 14:05:15 -0000 On 11/14/06 17:00, Shane Adams wrote: > Hello, > > I have a question regarding g_access. I'm mounting a custom filesytem twice against the same device. The first time I'm mounting it with read/write access, I then mount the same device to a different mount point. After I do this, the first mount starts getting write errors, so somehow the second mount is screwing up access rights to the device. For what its worth, I'm mounting a ram backed mdconfig device. > > I'm not sure if this is a geom related issue, or related to the fact that you cannot mount a device more than twice in vfs? > > Anyway - the first time I mount (R/W) I do: > > g_access(cp, 1,1, 0) > > I then mount the device again as read only to a different mount point with > > g_access(cp,1,0,0) > > The code I used is taken from g_vfs_open with wr flag set depending if write access is required: > > pp = g_dev_getprovider(vp->v_rdev); > if (pp == NULL) > return (ENOENT); > gp = g_new_geomf(&g_vfs_class2, "%s.%s", fsname, pp->name); > cp = g_new_consumer(gp); > g_attach(cp, pp); > error = g_access(cp, 1, wr, 0); > if (error) { > g_wither_geom(gp, ENXIO); > return (error); > } Interesting.. I'm mounting a custom file system also, and I'm doing it much differently: [...] struct vnode *devvp; /* vnode of the mount device */ struct g_consumer *cp; [...] DROP_GIANT(); g_topology_lock(); error = g_vfs_open(devvp, &cp, "tarfs", 0); g_topology_unlock(); PICKUP_GIANT(); VOP_UNLOCK(devvp, 0, td); [...] Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-geom@FreeBSD.ORG Wed Nov 15 18:09:57 2006 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 8CC1E16A40F for ; Wed, 15 Nov 2006 18:09:57 +0000 (UTC) (envelope-from adamsch1@yahoo.com) Received: from web31809.mail.mud.yahoo.com (web31809.mail.mud.yahoo.com [68.142.207.72]) by mx1.FreeBSD.org (Postfix) with SMTP id 2F2A243D46 for ; Wed, 15 Nov 2006 18:09:57 +0000 (GMT) (envelope-from adamsch1@yahoo.com) Received: (qmail 68292 invoked by uid 60001); 15 Nov 2006 18:09:56 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=5iCm28G/A1/Hf5kJ7VLhPrRDH543bB8zsGk6hoTjJBUR6riybBUcECMCUXRQ2b+WTFoiMVronde+QXODayDZ8TdDdUgsuwpQWXdUdck1quwmtWVZDdC21oHCR0XZ2SCI7GowP+6v7Yby0Jw5u4744H5dj1fMy7tN9H+iOFvWBuI= ; Message-ID: <20061115180956.68290.qmail@web31809.mail.mud.yahoo.com> Received: from [68.142.200.245] by web31809.mail.mud.yahoo.com via HTTP; Wed, 15 Nov 2006 10:09:56 PST Date: Wed, 15 Nov 2006 10:09:56 -0800 (PST) From: Shane Adams To: Eric Anderson MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Content-Transfer-Encoding: quoted-printable Cc: freebsd-geom@freebsd.org Subject: Re: g_access questions (Out on a limb here) 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, 15 Nov 2006 18:09:57 -0000 Thanks for the reply,=0A=0ACan you mount the same device/file more than onc= e at a time?=0A=0AShane=0A=0A=0A----- Original Message ----=0AFrom: Eric An= derson =0ATo: Shane Adams =0ACc:= freebsd-geom@freebsd.org=0ASent: Wednesday, November 15, 2006 6:03:35 AM= =0ASubject: Re: g_access questions (Out on a limb here)=0A=0AOn 11/14/06 17= :00, Shane Adams wrote:=0A> Hello,=0A> =0A> I have a question regarding g_a= ccess. I'm mounting a custom filesytem twice against the same device. The= first time I'm mounting it with read/write access, I then mount the same d= evice to a different mount point. After I do this, the first mount starts = getting write errors, so somehow the second mount is screwing up access rig= hts to the device. For what its worth, I'm mounting a ram backed mdconfig = device.=0A> =0A> I'm not sure if this is a geom related issue, or related t= o the fact that you cannot mount a device more than twice in vfs?=0A> =0A> = Anyway - the first time I mount (R/W) I do:=0A> =0A> g_access(cp, 1,1, 0)= =0A> =0A> I then mount the device again as read only to a different mount p= oint with =0A> =0A> g_access(cp,1,0,0)=0A> =0A> The code I used is taken fr= om g_vfs_open with wr flag set depending if write access is required:=0A> = =0A> pp =3D g_dev_getprovider(vp->v_rdev);=0A> if (pp =3D=3D NUL= L)=0A> return (ENOENT);=0A> gp =3D g_new_geomf(&g_v= fs_class2, "%s.%s", fsname, pp->name);=0A> cp =3D g_new_consumer(gp= );=0A> g_attach(cp, pp);=0A> error =3D g_access(cp, 1, wr, = 0);=0A> if (error) {=0A> g_wither_geom(gp, ENXIO);= =0A> return (error);=0A> }=0A=0A=0AInteresting.. I'= m mounting a custom file system also, and I'm doing it =0Amuch differently:= =0A=0A[...]=0A struct vnode *devvp; /* vnode of the mount device */= =0A struct g_consumer *cp;=0A[...]=0A DROP_GIANT();=0A g_topology_= lock();=0A error =3D g_vfs_open(devvp, &cp, "tarfs", 0);=0A g_topolog= y_unlock();=0A PICKUP_GIANT();=0A VOP_UNLOCK(devvp, 0, td);=0A[...]= =0A=0A=0AEric=0A=0A=0A=0A-- =0A--------------------------------------------= ----------------------------=0AEric Anderson Sr. Systems Administrat= or Centaur Technology=0AAnything that works is better than anything = that doesn't.=0A-----------------------------------------------------------= -------------=0A_______________________________________________=0Afreebsd-g= eom@freebsd.org mailing list=0Ahttp://lists.freebsd.org/mailman/listinfo/fr= eebsd-geom=0ATo unsubscribe, send any mail to "freebsd-geom-unsubscribe@fre= ebsd.org"=0A=0A=0A=0A=0A=0A =0A____________________________________________= ________________________________________=0ASponsored Link=0A=0A$420k for $1= ,399/mo. =0AThink You Pay Too Much For Your Mortgage? =0AFind Out! www.Lowe= rMyBills.com/lre From owner-freebsd-geom@FreeBSD.ORG Wed Nov 15 18:57:49 2006 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 CAAA416A417 for ; Wed, 15 Nov 2006 18:57:49 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh1.centtech.com (moat3.centtech.com [64.129.166.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id F37FE43D69 for ; Wed, 15 Nov 2006 18:57:46 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh1.centtech.com (8.13.8/8.13.8) with ESMTP id kAFIvff3069496; Wed, 15 Nov 2006 12:57:41 -0600 (CST) (envelope-from anderson@centtech.com) Message-ID: <455B6329.60404@centtech.com> Date: Wed, 15 Nov 2006 12:57:45 -0600 From: Eric Anderson User-Agent: Thunderbird 1.5.0.7 (X11/20061015) MIME-Version: 1.0 To: Shane Adams References: <20061115180956.68290.qmail@web31809.mail.mud.yahoo.com> In-Reply-To: <20061115180956.68290.qmail@web31809.mail.mud.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88.4/2196/Wed Nov 15 08:16:17 2006 on mh1.centtech.com X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=8.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.6 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on mh1.centtech.com Cc: freebsd-geom@freebsd.org Subject: Re: g_access questions (Out on a limb here) 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, 15 Nov 2006 18:57:49 -0000 On 11/15/06 12:09, Shane Adams wrote: > Thanks for the reply, > > Can you mount the same device/file more than once at a time? > > Shane Yes, which screws up my testing sometimes. :) Eric > ----- Original Message ---- > From: Eric Anderson > To: Shane Adams > Cc: freebsd-geom@freebsd.org > Sent: Wednesday, November 15, 2006 6:03:35 AM > Subject: Re: g_access questions (Out on a limb here) > > On 11/14/06 17:00, Shane Adams wrote: >> Hello, >> >> I have a question regarding g_access. I'm mounting a custom filesytem twice against the same device. The first time I'm mounting it with read/write access, I then mount the same device to a different mount point. After I do this, the first mount starts getting write errors, so somehow the second mount is screwing up access rights to the device. For what its worth, I'm mounting a ram backed mdconfig device. >> >> I'm not sure if this is a geom related issue, or related to the fact that you cannot mount a device more than twice in vfs? >> >> Anyway - the first time I mount (R/W) I do: >> >> g_access(cp, 1,1, 0) >> >> I then mount the device again as read only to a different mount point with >> >> g_access(cp,1,0,0) >> >> The code I used is taken from g_vfs_open with wr flag set depending if write access is required: >> >> pp = g_dev_getprovider(vp->v_rdev); >> if (pp == NULL) >> return (ENOENT); >> gp = g_new_geomf(&g_vfs_class2, "%s.%s", fsname, pp->name); >> cp = g_new_consumer(gp); >> g_attach(cp, pp); >> error = g_access(cp, 1, wr, 0); >> if (error) { >> g_wither_geom(gp, ENXIO); >> return (error); >> } > > > Interesting.. I'm mounting a custom file system also, and I'm doing it > much differently: > > [...] > struct vnode *devvp; /* vnode of the mount device */ > struct g_consumer *cp; > [...] > DROP_GIANT(); > g_topology_lock(); > error = g_vfs_open(devvp, &cp, "tarfs", 0); > g_topology_unlock(); > PICKUP_GIANT(); > VOP_UNLOCK(devvp, 0, td); > [...] > > > Eric > > > -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------