From owner-freebsd-current Tue Nov 26 23: 4:25 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B47A037B401 for ; Tue, 26 Nov 2002 23:04:23 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7FC4643EA9 for ; Tue, 26 Nov 2002 23:04:22 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id SAA05948; Wed, 27 Nov 2002 18:04:05 +1100 Date: Wed, 27 Nov 2002 18:17:41 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Hiten Pandya Cc: "Vladimir B. Grebenschikov" , "current@freebsd.org" Subject: Re: MD broken in current In-Reply-To: <20021126181618.GA96598@angelica.unixdaemons.com> Message-ID: <20021127181557.V6874-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 26 Nov 2002, Hiten Pandya wrote: > There is also a problem, when the md(4) driver is passed a 0 byte file, > i.e. mdconfig -a -t -vnode -f /tmp/mdimage.zero. It simply hangs the > process in the `mddestroy' state, making it unkillable. > > David Wolfskill tested a patch, which I made. It could be a _possible_ > fix to the problem. When a 0 byte file is found, by mdcreate_vnode() > it passes up an EINVAL. > > I used the stat structure, and the vn_stat() routine to get the information, > although I am not sure if that is the best/sane way of doing it. The URL for > the patch is: http://www.unixdaemons.com/~hiten/work/diffs/md.c.patch > I used the stat structure, and the vn_stat() routine to get the information, > although I am not sure if that is the best/sane way of doing it. The URL for > the patch is: http://www.unixdaemons.com/~hiten/work/diffs/md.c.patch This patch has too many bugs to list (mainly a vnode reference leak). Better fix mddestroy(). I don't know why it hangs ... I guess it is because it is called before initialization is completed in mdinit(), and there aren't enough state checks in mddestroy(). Bruc To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message