From owner-freebsd-fs@freebsd.org Wed Sep 9 09:20:44 2015 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5755F9CCA8B for ; Wed, 9 Sep 2015 09:20:44 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EA9371E1F for ; Wed, 9 Sep 2015 09:20:43 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: by wicgb1 with SMTP id gb1so108279452wic.1 for ; Wed, 09 Sep 2015 02:20:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=3xpcomy5Y2uk9lxX9uDnzH67zgwUyaqmM030NFkKUJY=; b=Gmjo9X9kmIAEMaRCw4BVA9S+0fq+rbeZrl4oElNoogQDiaXujmkK7V+mbj3ErDxGLm 0GmEVQq2pyrHYW93TQolLrfDbypwCn1EGqAjb5tYVE/Tb1Hl8x4AKrRHkIWCicMh/n2M 9TsnJc0IZrOqFJlvteH8XlppuJydYeFAAaVOUpdtrKIjJTyNtRt/JCugkvbTrqdWu1Ua YeSP0sm3F3GSQPwIKVIbO94Jz0geA56ASYOuVrblUUh5Ap0ILXjgZKh/UYryvH3H5Qfe iI+DlXeODLyIaVQ8NoYdGubx8bowQ4yCwB7V7h9z1lGl6/065lz/0YMIXBk8MJHQWB14 7iqA== X-Gm-Message-State: ALoCoQkYnBcW3PK9sULXmffIYzqFfhqtBXSMSBAqBKSfldni0t+EDkrohQZI1PnMrE5u4bRVQH+n X-Received: by 10.194.239.167 with SMTP id vt7mr58889480wjc.5.1441790441790; Wed, 09 Sep 2015 02:20:41 -0700 (PDT) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by smtp.gmail.com with ESMTPSA id bi6sm9185020wjc.25.2015.09.09.02.20.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Sep 2015 02:20:40 -0700 (PDT) Subject: Re: TRIM support (same bug as linux?) To: freebsd-fs@freebsd.org References: <55EF7265.2050309@multiplay.co.uk> <1BCC8B97-6C79-4864-8405-BA687577808A@longcount.org> <20150908214221.7a1702e0@kan> <55EFF739.5020608@digiware.nl> From: Steven Hartland Message-ID: <55EFF9DF.2020201@multiplay.co.uk> Date: Wed, 9 Sep 2015 10:20:31 +0100 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <55EFF739.5020608@digiware.nl> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Sep 2015 09:20:44 -0000 That was the original theory wasn't that in the end On 09/09/2015 10:09, Willem Jan Withagen wrote: > On 9-9-2015 03:42, Alexander Kabaev wrote: >> On Tue, 8 Sep 2015 21:28:01 -0400 >> Tom Curry wrote: >> >>> I'm no expert but if memory serves the issue had to do with concurrent >>> and/or queued trim which is not implemented in FreeBSD. >>> >>> On Tue, Sep 8, 2015 at 9:11 PM, Mark Saad >>> wrote: >>> >>>> >>>> >>>>> On Sep 8, 2015, at 7:42 PM, Steven Hartland >>>>> >>>> wrote: >>>>> >>>>> Nope FreeBSD is not affected by this. >>>>> >>>>>> On 09/09/2015 00:15, FF wrote: >>>>>> I'm asking a pretty vague question and I apologize in advance, >>>>>> not >>>> trying >>>>>> to troll. >>>>>> >>>>>> The question has to do with whether FreeBSD is using TRIM the >>>>>> same way >>>> as >>>>>> recent Linux kernels. >>>>>> >>>>>> https://blog.algolia.com/when-solid-state-drives-are-not-that-solid/ >>>> seems >>>>>> to imply that there are instabilities that can occur. Trying to >>>>>> avoid duplicating effort if this has already been addressed or >>>>>> if its a >>>> complete >>>>>> dead alley because there isn't a commonality. >>>>>> >>>>>> Thanks in advance! >>>>> >>>> >>>> It would be interesting if anyone could explain the reasons why >>>> ufs/ffs and zfs and FreeBSD are not effected by this issue . My >>>> rudimentary understanding of the issue was that it's wasn't just a >>>> software glitch in the ext filesystem and bad firmware but a >>>> combination of that and Linux poorly supporting a ata modes that >>>> are not supported at all on FreeBSD . Is that correct ? >>>> >>>> >>>> --- >>>> Mark Saad | nonesuch@longcount.org >> >> Wasn't the root cause the improper bio splitting code in md/raid0 code >> and nothing special in firmware? FreeBSD shares no such code and as >> such is not affected. > > More or less, > > What happened as a consequence of the split in the code is that there > was a possibility that 2 threads would run parallel: > one executing a trim > and a second one that already executed under the assumption that the > trim was completed. > > And what I believe to be the case is that due to not correct ordering > the second thread sometimes could write in space that was going to be > trimmed. And thus that data would be lost, causing corruption. > > Perhaps this typical code is not present in FreeBSD. But it is just a > matter of code enginering/refactoring/.... in complex code to make > these kind of mistakes happen. > Being careful, use may eyes on critial code, tools are all ways to > prevent this. But then still: code is written by humans. > > --WjW > > > _______________________________________________ > freebsd-fs@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"