From patchwork Mon Dec 28 05:01:58 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yan, Zheng" X-Patchwork-Id: 69924 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBS525mV028221 for ; Mon, 28 Dec 2009 05:02:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750921AbZL1FCA (ORCPT ); Mon, 28 Dec 2009 00:02:00 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750818AbZL1FCA (ORCPT ); Mon, 28 Dec 2009 00:02:00 -0500 Received: from mail-pw0-f42.google.com ([209.85.160.42]:38262 "EHLO mail-pw0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750810AbZL1FB7 convert rfc822-to-8bit (ORCPT ); Mon, 28 Dec 2009 00:01:59 -0500 Received: by pwj9 with SMTP id 9so6102998pwj.21 for ; Sun, 27 Dec 2009 21:01:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=DH97IxOpJ1Pg+kYeBY6DezEj6wlIPiLmbxVvHujvRww=; b=TeIZ1M0SZxKF+AY27whMdyN9gKISvWnodGcCTO7trm1lp+gXeD74SLe+f1ARmFx+Ne rP06W7CfNTJxSR8HSSKVLWknNDtxtGRNyMMHZVPVutFuFWJOqZWhwugHxd49ZOTiMkjw NRlfFz5OHT1e7jFSBtO80ApmvlaiEbd2/Z8DY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=VGqCFNh+sjavHNpXfTcZFDy+lC5l0iTdPuziQykj/eGjntf/vaTMI1buT3U/QC7FFy ar2VZeqYtOq2x1IFOIXg1t18tNo8Up4B2n+RJWHzjccYS5eSR10OqvqvYPcPAQIwTYCR NLPpSNtcdmUgyXjnOtR+sqS9pZ0fcvO+WBZCg= MIME-Version: 1.0 Received: by 10.115.102.9 with SMTP id e9mr10325953wam.199.1261976518789; Sun, 27 Dec 2009 21:01:58 -0800 (PST) In-Reply-To: References: Date: Mon, 28 Dec 2009 13:01:58 +0800 X-Google-Sender-Auth: a1f005ae568fe425 Message-ID: <3d0408630912272101j71c60ea0t5862ea5da09e7e15@mail.gmail.com> Subject: Re: Btrfs fails randomly From: "Yan, Zheng " To: Lex x-demon Rivera Cc: linux-btrfs@vger.kernel.org Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org diff -urp 1/fs/btrfs/ordered-data.c 2/fs/btrfs/ordered-data.c --- 1/fs/btrfs/ordered-data.c 2009-12-28 12:23:42.088546898 +0800 +++ 2/fs/btrfs/ordered-data.c 2009-12-28 12:57:24.250542741 +0800 @@ -626,6 +626,8 @@ int btrfs_ordered_update_i_size(struct i if (ordered) offset = entry_end(ordered); + else + offset = ALIGN(offset, BTRFS_I(inode)->root->sectorsize); mutex_lock(&tree->mutex); disk_i_size = BTRFS_I(inode)->disk_i_size;