Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp2152808ybm; Thu, 23 May 2019 12:13:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqx/3ovrNbJGCROVdXHXpqy3pai8aAs/8GDuNlDW6plXO/NGUjSVQxLusy8w2mERYqY88aKG X-Received: by 2002:a17:902:8303:: with SMTP id bd3mr52258219plb.240.1558638825150; Thu, 23 May 2019 12:13:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558638825; cv=none; d=google.com; s=arc-20160816; b=iEOs5eJvUrkVUKMWFl2czlfJrpwkgFvaAdeaDZUa5cDANTcYFy9JsGpU2jDh8xM9/H W5XGxU4UBsMb4qlK813/DD6QoHtbAhmTl/H0EBT/gJSy961GumO7vYx3k75vHsbUiFOc Xlogg0z1MBZPm4b+HAUnpGePJ2FTjq5rMHTkvuWXsBdBVyZN/4QHLdmBLZG5Q8+KGt46 L5q+Ep2FaGp0UNCCGAn06TyCLFhW51erDw4ZMvXdDbrYlzvrnfazFtVPGeX6ZVQ5HL4d IMrEB8uUAjUGVNVevqdPxyGrT1LoUx+CqKZ+p0JC4U0cYRjJq9AfCucbLJLfzygdkuNB sLig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=T3NUz+picLlc25HBZDOyjSez/f0EOh/GvXwtegNnYAA=; b=XBNiP6lRRSvBKyDkB79yMDFrxfsov+LvDPVZHyMoN6oIOfoOPPnd3dq9UN6uuoCHBb RORvV50YsRkDM5LQpjcXGWKsfrWKnyqsw+IDJSV3sEONB/AAygMp+9xmcA5FB7Sj5sdp 2exlq96+tuMF/XcJJvEBTG6aKXbBdmrklrft6O1p0VIHWkR2f6Wh8r1W4kQneppaxMx4 gXbu+O+rHRDLrIIgnPhHH6KcNQGHiMDW45aNNVTwzdW8zBcDyhjPgJnBAFJ+u/oRzpMa 9RAENxAx9NJzQgRmodEGFXoj8bfh5D0w11AV2Q9RyBgavyizNypCDlGvqHLUsWZkiKLt CvVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="e/x1vDMZ"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m7si527297plt.392.2019.05.23.12.13.30; Thu, 23 May 2019 12:13:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="e/x1vDMZ"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388242AbfEWTLl (ORCPT + 99 others); Thu, 23 May 2019 15:11:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:45036 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387552AbfEWTLh (ORCPT ); Thu, 23 May 2019 15:11:37 -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 5CEB7217F9; Thu, 23 May 2019 19:11:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558638696; bh=7/LfuKugaEIw8/6/NwDjKjfYoXPuvCZiob7fBgaTIWQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e/x1vDMZMosjIjcGkiR38NbAEn+xyJZyljGEdIRVaC5B8jVJma0YSioZ7HJ7iYGB6 U95gshgy0j5LU/da2qaalt9KmWMDkrJaee1baP5NsESqc9Df6M5UJn4y+svnRkO+9w PTBBHr0tvCJStU4L8SdJfhxQCxTfwZ+yPx1hvhe0= 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.14 31/77] ceph: flush dirty inodes before proceeding with remount Date: Thu, 23 May 2019 21:05:49 +0200 Message-Id: <20190523181724.506434015@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190523181719.982121681@linuxfoundation.org> References: <20190523181719.982121681@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 @@ -768,6 +768,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, @@ -775,6 +781,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,