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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to