Date: Fri, 11 Dec 2009 18:33:48 +0200 From: Alexander Motin <mav@FreeBSD.org> To: Andriy Gapon <avg@icyb.net.ua> Cc: Grzegorz Bernacki <gjb@semihalf.com>, freebsd-current@freebsd.org Subject: Re: Possible bug in ata-disk.c Message-ID: <4B22746C.3030709@FreeBSD.org> In-Reply-To: <4B225F05.20004@icyb.net.ua> References: <4B2252BE.8080806@semihalf.com> <4B225F05.20004@icyb.net.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B22746C.3030709>