From patchwork Thu Feb 20 16:48:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Maggard X-Patchwork-Id: 3688901 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4CAAB9F2EC for ; Thu, 20 Feb 2014 16:48:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7C8922015A for ; Thu, 20 Feb 2014 16:48:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A84AB20122 for ; Thu, 20 Feb 2014 16:48:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754799AbaBTQsS (ORCPT ); Thu, 20 Feb 2014 11:48:18 -0500 Received: from mail-pa0-f48.google.com ([209.85.220.48]:61758 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753907AbaBTQsR (ORCPT ); Thu, 20 Feb 2014 11:48:17 -0500 Received: by mail-pa0-f48.google.com with SMTP id kx10so2135403pab.35 for ; Thu, 20 Feb 2014 08:48:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=agvxSWnxj+ln+H0khm9PoAK3vAxhUwlE7g+J/RKCWqM=; b=O0Ul8dfGZuXX3qwpmYO/H5QKyjkIDfeDtv0jug7Sq38Z4EJzLjrf+l1mwrnSzAVQmf X3C37/GpV4x/SH/bVjACrsLLB45DDmQAILP+xqhbQTyhzSArstlWcGathoIE4EtwtB1b 5IVx8YwvE6RKCd+z3uEE5wYo+0MDOZvAZpb04knlhLp9Bcuoy9v4l9ca2WlT4Mx/qVHF Hw6B5FdX0kBGzaAKb3+FuaTcUvoNefJjyeon2YOwOfVFN5wtfu8YNdF5j5pWwzRU/Oop 0TWzXzEryq4dIlr5sot2BnpN2HJk4mSn+6NmoDPtTPWWcqywgoqRPhkHhay8R8WW5aIG Ya3w== X-Received: by 10.66.121.164 with SMTP id ll4mr3070304pab.129.1392914895954; Thu, 20 Feb 2014 08:48:15 -0800 (PST) Received: from jmaggard-ThinkPad-W520.infrant-6.com ([209.249.181.1]) by mx.google.com with ESMTPSA id c7sm12865763pbt.0.2014.02.20.08.48.13 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 08:48:14 -0800 (PST) From: Justin Maggard To: linux-btrfs@vger.kernel.org Cc: Justin Maggard Subject: [PATCH] btrfs: wake up transaction thread upon remount Date: Thu, 20 Feb 2014 08:48:07 -0800 Message-Id: <1392914887-5270-1-git-send-email-jmaggard10@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Now that we can adjust the commit interval with a remount, we need to wake up the transaction thread or else he will continue to sleep until the previous transaction interval has elapsed before waking up. So, if we go from a large commit interval to something smaller, the transaction thread will not wake up until the large interval has expired. This also causes the cleaner thread to stay sleeping, since it gets woken up by the transaction thread. Fix it by simply waking up the transaction thread during a remount. Signed-off-by: Justin Maggard --- fs/btrfs/super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index d04db81..426b7c6 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -1479,6 +1479,7 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data) sb->s_flags &= ~MS_RDONLY; } out: + wake_up_process(fs_info->transaction_kthread); btrfs_remount_cleanup(fs_info, old_opts); return 0;