Date: Wed, 27 Nov 2002 18:17:41 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: Hiten Pandya <hiten@angelica.unixdaemons.com> Cc: "Vladimir B. Grebenschikov" <vova@sw.ru>, "current@freebsd.org" <current@FreeBSD.ORG> Subject: Re: MD broken in current Message-ID: <20021127181557.V6874-100000@gamplex.bde.org> In-Reply-To: <20021126181618.GA96598@angelica.unixdaemons.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021127181557.V6874-100000>