From patchwork Mon May 27 07:54:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bert De Jonghe X-Patchwork-Id: 246543 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 685D12C0089 for ; Mon, 27 May 2013 17:54:21 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756706Ab3E0HyU (ORCPT ); Mon, 27 May 2013 03:54:20 -0400 Received: from mail-we0-f181.google.com ([74.125.82.181]:39825 "EHLO mail-we0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756676Ab3E0HyU (ORCPT ); Mon, 27 May 2013 03:54:20 -0400 Received: by mail-we0-f181.google.com with SMTP id u57so4244691wes.40 for ; Mon, 27 May 2013 00:54:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-forwarded-message-id:content-type :x-gm-message-state; bh=tBDOeEY4VO9zwvDQOTNcZnuMBkAUiJx1pthWwTZ0egg=; b=iE4ORmT5ia2v23iQ6QuHup6Gkg3XBoPq1l8xLkzr7jUk2J7PBdGUmXGn1GzRFdGeF1 qWyUkZNbdbDDdipX1Yj/pqpkly7WiVTzPKlQtBeaA5iWE7gVVVDa3Aa4QJ0GUu50UuBN /iEq6aynFVIZbxigj78WHBW4QTqPRNVcviIBNDj3GjGiIppOLmS9cOU2mwgtIIWoz/jn fuucp9g1asfuKDUSjxqwu5S9EnNCwguqC5N1x3kWhMM3LqIaRIOkWucGySA4pHGReQDK 3zn5zbCaEqZ77LvhEP8w5G4OHkD7nzPtBtZJmy8lvH85l12Zrd3cJIeu4vi4RcinutiA RD/Q== X-Received: by 10.194.77.15 with SMTP id o15mr7802721wjw.27.1369641259208; Mon, 27 May 2013 00:54:19 -0700 (PDT) Received: from [192.168.12.177] ([85.255.197.126]) by mx.google.com with ESMTPSA id fu14sm15447685wic.8.2013.05.27.00.54.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 May 2013 00:54:17 -0700 (PDT) Message-ID: <51A31125.1070100@amplidata.com> Date: Mon, 27 May 2013 09:54:13 +0200 From: Bert De Jonghe User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: linux-ext4@vger.kernel.org CC: Bastiaan Stougie Subject: delayed allocation blocks not flushed? References: <51A31052.4030507@amplidata.com> In-Reply-To: <51A31052.4030507@amplidata.com> X-Forwarded-Message-Id: <51A31052.4030507@amplidata.com> X-Gm-Message-State: ALoCoQnjtit0QLjiaOXYjN0DAY4h8gQK/tY8t7YJMmYefQ+dS6CfOJSSVN3sHWEwQ3TsEq1z3lhX Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Hi, On an otherwise idle system, create an ext4 filesystem on /dev/sdi, mount it and wait more than dirty_writeback_centisecs. Then create a small file (echo something > file); wait (dirty_expire_centisecs x 2), expect delayed_allocation_blocks to fall to zero but it remains at 2 over here. Create another small file (echo something_else > file2); again wait (dirty_expire_centisecs x 2); check delayed_allocation_blocks which is now at 4. Wait a weekend more: # date; cat /sys/fs/ext4/sdi/delayed_allocation_blocks Fri May 24 15:33:21 UTC 2013 4 # date; cat /sys/fs/ext4/sdi/delayed_allocation_blocks Mon May 27 07:14:30 UTC 2013 4 Doing a manual sync flushes out all blocks, also adding a sync after mounting solves the not flushing behaviour (possible patch attached). Has anyone noticed this before and is this expected behaviour? It looks like these blocks are not flushed out to disk thus remain in memory and will be lost upon power failure? Please Cc on reply as we're not on the list. Many thanks & best regards, Bert. --- fs/super.c.org 2013-05-22 09:45:55.061590168 +0200 +++ fs/super.c 2013-05-22 09:46:03.933589947 +0200 @@ -993,6 +993,7 @@ bdev->bd_super = s; } + sync_filesystem(s); return dget(s->s_root); error_s: