From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,T_DKIMWL_WL_HIGH,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8EAEDC28EBD for ; Sun, 9 Jun 2019 16:59:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5E891207E0 for ; Sun, 9 Jun 2019 16:59:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560099591; bh=7Esh4oeX0EMZLNaEobKY6c794fjJiXeFFcEkatPLJHY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=sqRSl53ZlC7UdYMPvuxLRtAnh5zRpFh/I2up0XYVkZo4vwMKvDG+VzlstMkJEAWET +GXraG7sGBlbLbQiKWF3xr2yLI1xR0nY0TAw9R7h7D7IqiIrxIX+ZADP8/CI9tFnwp TgqjuzeeDr+oRMmsY+pCW9r5tzNRGj+agXpancOI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387739AbfFIQ7u (ORCPT ); Sun, 9 Jun 2019 12:59:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:35796 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733212AbfFIQ7q (ORCPT ); Sun, 9 Jun 2019 12:59:46 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 86939206C3; Sun, 9 Jun 2019 16:59:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560099586; bh=7Esh4oeX0EMZLNaEobKY6c794fjJiXeFFcEkatPLJHY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=miw5ocPpPTf1/Dc/UjcsB6NWDcGMw0oZwKajppPejAciy3elWeGDxHXeHTl7Y5Zk9 WJuhhyVs02SXRxBi2CFi9mFaCaE6S/q9ppsQIF6IAFX3uMGj6hzDzV8Afk+h4+C4+T YFElckTLDKtT6zO3S9EwD+fmzBomh06tRgCkjWrA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jeff Layton , "Yan, Zheng" , Ilya Dryomov Subject: [PATCH 4.4 048/241] ceph: flush dirty inodes before proceeding with remount Date: Sun, 9 Jun 2019 18:39:50 +0200 Message-Id: <20190609164149.158198098@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190609164147.729157653@linuxfoundation.org> References: <20190609164147.729157653@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jeff Layton commit 00abf69dd24f4444d185982379c5cc3bb7b6d1fc upstream. xfstest generic/452 was triggering a "Busy inodes after umount" warning. ceph was allowing the mount to go read-only without first flushing out dirty inodes in the cache. Ensure we sync out the filesystem before allowing a remount to proceed. Cc: stable@vger.kernel.org Link: http://tracker.ceph.com/issues/39571 Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov Signed-off-by: Greg Kroah-Hartman --- fs/ceph/super.c | 7 +++++++ 1 file changed, 7 insertions(+) --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -712,6 +712,12 @@ static void ceph_umount_begin(struct sup return; } +static int ceph_remount(struct super_block *sb, int *flags, char *data) +{ + sync_filesystem(sb); + return 0; +} + static const struct super_operations ceph_super_ops = { .alloc_inode = ceph_alloc_inode, .destroy_inode = ceph_destroy_inode, @@ -719,6 +725,7 @@ static const struct super_operations cep .drop_inode = ceph_drop_inode, .sync_fs = ceph_sync_fs, .put_super = ceph_put_super, + .remount_fs = ceph_remount, .show_options = ceph_show_options, .statfs = ceph_statfs, .umount_begin = ceph_umount_begin,