From owner-freebsd-fs@FreeBSD.ORG Mon Apr 29 08:21:46 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 31E51E4C for ; Mon, 29 Apr 2013 08:21:46 +0000 (UTC) (envelope-from prvs=1831672f64=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id CC2851E1A for ; Mon, 29 Apr 2013 08:21:45 +0000 (UTC) Received: from r2d2 ([46.65.172.4]) by mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (MDaemon PRO v10.0.4) with ESMTP id md50003533867.msg for ; Mon, 29 Apr 2013 09:21:36 +0100 X-Spam-Processed: mail1.multiplay.co.uk, Mon, 29 Apr 2013 09:21:36 +0100 (not processed: message from valid local sender) X-MDDKIM-Result: neutral (mail1.multiplay.co.uk) X-MDRemoteIP: 46.65.172.4 X-Return-Path: prvs=1831672f64=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-fs@freebsd.org Message-ID: <60316751643743738AB83DABC6A5934B@multiplay.co.uk> From: "Steven Hartland" To: "Ajit Jain" , References: Subject: Re: seeing data corruption with zfs trim functionality Date: Mon, 29 Apr 2013 09:22:06 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Apr 2013 08:21:46 -0000 ----- Original Message ----- From: "Ajit Jain" > I am running zfs with trim functionality (ported from head). Seeing data > corruption when running iotest* with multiple threads (never saw data > corruption with single thread). > > The patches merged to add trim support are as follows: > 1. 240868 (zfs trim patch) > 2. 230053 and 245252 (block device driver trim support) > 3. 239655 (fix an issue in patch 230053) > > I am "NOT" seeing data corruption in the following cases: > 1. Running iotest with single thread (Trim is enabled at entire io stack). > 2. Trim is enabled at zfs layer but disable at driver layer i.e. delete > method is set to NONE (even with multiple threads). > > > Since patch 240868 alone was not working as I pulled in additional zfs trim > patches 244155, 244187, 244188, 248572 (however I am not using separate > L2arc device), 248573, 248574, 248575 and 248576. Still I am seeing the > same issue. > > Issue: After some time running with multiple thread write system call > return sometimes with EIO or 122 (checksum error) error code. > > I looked at GEOM code a bit I think it already has the trim (DELETE) > command support. Still I am doubtful if I have pulled in all required > patches in the entire I/O stack. > > I am using a LSI SAS HBA card to connect to the SSD, firmware seems to > claim the support for trim. > > *iotest: non standard freebsd FreeBSD utility, which creates files and does > I/O on the files and can be invoked in single/multithread mode to do the > I/O. What version are you porting the changes to? What SSD are you using? What LSI controller are you using? Regards Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk.