From owner-freebsd-current@FreeBSD.ORG Fri Dec 11 16:33:54 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 148D810656D9 for ; Fri, 11 Dec 2009 16:33:54 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.155]) by mx1.freebsd.org (Postfix) with ESMTP id 937288FC08 for ; Fri, 11 Dec 2009 16:33:53 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id 16so222374fgg.13 for ; Fri, 11 Dec 2009 08:33:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=MhPIEv2Efm8ta0EMt+SwlM+kj7ttpNYnVgmb2ICr0zg=; b=VvSpcn5barPk6WfEhoQIX2GSN6vfj8g56p17sinlONz3lGmdPzulgIFkDeL7FFbUZM BJCZ3KsbRS93e3IYe7lI69SatCmCZyUxd50tL54W3q44oU3DF7GgYbLX4HtuOuRkK1Lq XqIDE/BWOfKiuB0jABjW9MSARHEkEdD4vcn6c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=Jr+w8PDr12m6R/US0M1hHpB1YnxzRNPkDja7iBw5lNFiDWo1BKwh1dAhNVsf3UYErE eWmPUa+l1eJKyIj3dyx2ElX1jZ6sTNld0EFOTwwIeQO+wZuyoRMFZJJLKaTpw8pgA9aZ UwYjLqxDO1AtP+Gtkoi/d2kvzNsv7bqRk2vLQ= Received: by 10.87.66.32 with SMTP id t32mr2013529fgk.75.1260549232584; Fri, 11 Dec 2009 08:33:52 -0800 (PST) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 16sm751903fxm.12.2009.12.11.08.33.50 (version=SSLv3 cipher=RC4-MD5); Fri, 11 Dec 2009 08:33:51 -0800 (PST) Sender: Alexander Motin Message-ID: <4B22746C.3030709@FreeBSD.org> Date: Fri, 11 Dec 2009 18:33:48 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20090901) MIME-Version: 1.0 To: Andriy Gapon References: <4B2252BE.8080806@semihalf.com> <4B225F05.20004@icyb.net.ua> In-Reply-To: <4B225F05.20004@icyb.net.ua> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Grzegorz Bernacki , freebsd-current@freebsd.org Subject: Re: Possible bug in ata-disk.c X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2009 16:33:54 -0000 Andriy Gapon wrote: > on 11/12/2009 16:10 Grzegorz Bernacki said the following: >> Hi, >> >> I've looked over ATA code and I've noticed that setting >> DISKFLAG_CANDELETE big in disk->d_flags clears DISKFLAGS_CANFLUSHCAHCE >> bit if it was set. Below is the patch. >> >> --- a/sys/dev/ata/ata-disk.c >> +++ b/sys/dev/ata/ata-disk.c >> @@ -133,11 +133,11 @@ ad_attach(device_t dev) >> adp->disk->d_unit = device_get_unit(dev); >> if (atadev->param.support.command2 & ATA_SUPPORT_FLUSHCACHE) >> adp->disk->d_flags = DISKFLAG_CANFLUSHCACHE; >> if ((atadev->param.support.command2 & ATA_SUPPORT_CFA) || >> atadev->param.config == ATA_PROTO_CFA) >> - adp->disk->d_flags |= DISKFLAG_CANDELETE; >> + adp->disk->d_flags = DISKFLAG_CANDELETE; >> snprintf(adp->disk->d_ident, sizeof(adp->disk->d_ident), "ad:%s", >> atadev->param.serial); >> disk_create(adp->disk, DISK_VERSION); >> device_add_child(dev, "subdisk", device_get_unit(dev)); >> ad_firmware_geom_adjust(dev, adp->disk); > > It seems that you are correct. > The only confusing thing is that you supplied a reverse diff :) Thanks. Committed to HEAD. -- Alexander Motin