Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Jul 2010 23:33:34 +0300
From:      Mikolaj Golub <to.my.trociny@gmail.com>
To:        Alexander Motin <mav@FreeBSD.org>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: ata-disk.c:ad_init(): max_iosize might be uninitialized?
Message-ID:  <86lj9gbftt.fsf@kopusha.home.net>
In-Reply-To: <4C3B75A1.4020905@FreeBSD.org> (Alexander Motin's message of "Mon, 12 Jul 2010 23:05:53 %2B0300")
References:  <mailpost.1278963760.4818474.103.mailing.freebsd.fs@FreeBSD.cs.nctu.edu.tw> <4C3B75A1.4020905@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help


On Mon, 12 Jul 2010 23:05:53 +0300 Alexander Motin wrote:

 AM> Hi.

 AM> Mikolaj Golub wrote:
 >> It might be a wrong list but I have not found freebsd-ata@ or freebsd-disk@
 >> list -).
 >> 
 >> I just have looked accidentally at ad_init() in dev/ata/ata-disk.c and it
 >> looks like there is at least theoretical possibility that atadev->max_iosize
 >> remains uninitialized (if ata_controlcmd(ATA_SET_MULTI) fails). Shouldn't be
 >> like in the patch below?

 AM> It is not very obvious, but it is initialized in ata_add_child().

Ah, I see. Thank you :-). But then "else atadev->max_iosize = DEV_BSIZE;" part
in ad_init() looks like unnecessary and rather confusing (it suggests that
max_iosize is initialized by this funtion.

-- 
Mikolaj Golub



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86lj9gbftt.fsf>