NetBSD Problem Report #45512

From www@NetBSD.org  Sat Oct 22 22:45:58 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id D5B1163D521
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 22 Oct 2011 22:45:57 +0000 (UTC)
Message-Id: <20111022224557.4950A63D49B@www.NetBSD.org>
Date: Sat, 22 Oct 2011 22:45:57 +0000 (UTC)
From: ppedaal@mail.ee
Reply-To: ppedaal@mail.ee
To: gnats-bugs@NetBSD.org
Subject: net/aoe-vblade is unable to use block devices
X-Send-Pr-Version: www-1.0

>Number:         45512
>Category:       pkg
>Synopsis:       net/aoe-vblade is unable to use block devices
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 22 22:50:00 +0000 2011
>Originator:     Mihkel Ader
>Release:        NetBSD-current
>Organization:
>Environment:
NetBSD ubin 5.99.56 NetBSD 5.99.56 (MYGENERIC) #0: Thu Oct 20 19:07:41 UTC 2011  root@ubin:/usr/src/sys/arch/macppc/compile/MYGENERIC macppc

>Description:
When trying to serve a block device using vblade(d), the disk size is reported as 0 and the AoE device cannot be used. Also, larger devices cause the disk size calculation to overflow.

PS
The errors have also been reported to the aoetools-discuss mailing list
>How-To-Repeat:
vblade 0 0 gem0 /dev/wd0c
>Fix:
There's a (de)referencing error in the freebsd.c file. The easiest fix is to write the ioctl call as "ioctl(fd, DIOCGDINFO, &lab)" instead of "ioctl(fd, DIOCGDINFO, lab)"

In the same file, we need a cast to prevent an overflow:
"size = (vlong)lab.d_secsize * lab.d_secperunit"

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.