From owner-freebsd-fs@FreeBSD.ORG Mon Apr 29 06:44:40 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7034EA9E for ; Mon, 29 Apr 2013 06:44:40 +0000 (UTC) (envelope-from ajit.jain@cloudbyte.com) Received: from mail-ob0-x22d.google.com (mail-ob0-x22d.google.com [IPv6:2607:f8b0:4003:c01::22d]) by mx1.freebsd.org (Postfix) with ESMTP id 412981A48 for ; Mon, 29 Apr 2013 06:44:40 +0000 (UTC) Received: by mail-ob0-f173.google.com with SMTP id xn12so5194206obc.18 for ; Sun, 28 Apr 2013 23:44:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:from:date:message-id:subject:to :content-type:x-gm-message-state; bh=PxIU+q320BmilJlbgPZK4WI7F9O/7l99BvGrI+F5glo=; b=XocrqeY/9nkw6ssT4JmKNxrtaqV9nQydYRKRH+amaNf9GXFfNggMD+t+F/9CVOH9EM HGo0d5Ai9TBY+GMqI1jv0G81iVFb6GvUkEmuh5amUJmobl+636BU1mpQJ5lfDV1OIvh9 qPWNGrt3eHtw8EZbWpxmuvRZCjpyXriGixYlt9LeL0IpUmYay+kAHocHwZoGFgbASz10 6W430YoBnvWP8EbJgoTSrxZ8igqrbFpBa/By9qHu6jipyx1nn7XCPxn3hBo2GeGTof4f Vq9WG3qpehLSMdwHalVb12zH3MNw1WO1ys++EKnAtHTh9lewBQSzX+ESR9ORf3zdMilr UOow== X-Received: by 10.60.173.196 with SMTP id bm4mr12253459oec.108.1367217879786; Sun, 28 Apr 2013 23:44:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.142.106 with HTTP; Sun, 28 Apr 2013 23:44:19 -0700 (PDT) From: Ajit Jain Date: Mon, 29 Apr 2013 12:14:19 +0530 Message-ID: Subject: seeing data corruption with zfs trim functionality To: freebsd-fs@freebsd.org, Ajit Jain X-Gm-Message-State: ALoCoQnF1JXb0mGiO1l9eoCroGbLMmgMcLkdbC2q9CIPd1R4hPt1XCGY2O+qLBV4z91IV7+gqSuo Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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 06:44:40 -0000 Hi, 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. Thanks. ajit