From patchwork Thu Dec 13 01:24:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10727473 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3AD0114BD for ; Thu, 13 Dec 2018 01:24:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2AFFB29A4B for ; Thu, 13 Dec 2018 01:24:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1EEF82A300; Thu, 13 Dec 2018 01:24:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2EE829A4B for ; Thu, 13 Dec 2018 01:24:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726396AbeLMBYu (ORCPT ); Wed, 12 Dec 2018 20:24:50 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:50018 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726337AbeLMBYu (ORCPT ); Wed, 12 Dec 2018 20:24:50 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wBD1OmYS097704 for ; Thu, 13 Dec 2018 01:24:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : subject : message-id : mime-version : content-type; s=corp-2018-07-02; bh=T4L+ZwCG4UScAuTd8H/skTwC6TJ1JCmYoDBvTBPjAjM=; b=s7l9JsJ0CDUtdlRMIWGt2EhQ2WttiivrlMdDIL3O8Ks5mZGD4uPW8vPuS/+06R83dvZ0 bkY1Q5Zp7fMt3QEBiUZm4ARiTYGT+EYc7a7/4iSI34Pky6z627uXllXkyv4KZde61TMk gCxS5AyIpITniIp9mlAtM3gMXn6aBY9SJ9wS+rhijuKhvIg2JWT8CW5nShqjd88vKFog +hP9AxGSqwuQ6oqniQVAWOB+MTeE/r9OsA0sJjbZcpk4iq2BTUNZAAiZC5ay705cwRTK tLR8PT4Y2d5f8lIW3vnIDdFO09HTImsoiaRdkExycXZZnQPCvdjoGCDIU/qH5WwS81+3 DQ== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2pb3n731v2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 13 Dec 2018 01:24:48 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id wBD1Og8G000398 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 13 Dec 2018 01:24:42 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id wBD1OgrQ008450 for ; Thu, 13 Dec 2018 01:24:42 GMT Received: from localhost (/10.159.153.103) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 12 Dec 2018 17:24:42 -0800 Date: Wed, 12 Dec 2018 17:24:36 -0800 From: "Darrick J. Wong" To: xfs Subject: [PATCH] xfs: don't skip rtmount when there's a realtime device Message-ID: <20181213012436.GB24487@magnolia> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9105 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=937 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812130011 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Don't ever skip the realtime bitmap / summary inode initialization if there's a realtime device attached, because we'd rather fail the mount if iget declines to retrieve a NULL inode pointer. Right now, if someone sets rbmino to NULLFSINO on a rt-capable filesystem, mounts it, and writes a file to the rt device, we'll blow up. Signed-off-by: Darrick J. Wong Reviewed-by: Bill O'Donnell --- fs/xfs/xfs_rtalloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index aefd63d46397..18ad31ded0bf 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -1206,7 +1206,8 @@ xfs_rtmount_inodes( xfs_sb_t *sbp; sbp = &mp->m_sb; - if (sbp->sb_rbmino == NULLFSINO) + if (!xfs_sb_version_hasrealtime(&mp->m_sb) && + sbp->sb_rbmino == NULLFSINO) return 0; error = xfs_iget(mp, NULL, sbp->sb_rbmino, 0, 0, &mp->m_rbmip); if (error)