Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2981218imu; Sun, 9 Dec 2018 14:13:04 -0800 (PST) X-Google-Smtp-Source: AFSGD/XfS+QYm7s5PL0XQcQuqG4G3ZSzS+gzj5dCdXRWDeGfYw8Z2wryTd4q6Q0y6UZdjQaEQlH7 X-Received: by 2002:a17:902:2:: with SMTP id 2mr10158445pla.228.1544393584248; Sun, 09 Dec 2018 14:13:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544393584; cv=none; d=google.com; s=arc-20160816; b=l/Qhivhlpg2hX2XChNkoe/m7nw7y8nvFOE7qKyooQDDXFk3tIAg/KLwwPB9u+xXcTg 9Kpv60HJgEkNT2stx/VAc4PnRu1vcrDfX6UCQa5mkRXug4HgyFgrNQ315neq5m7kdH73 0lJxvRIiVgVdaiBqfSRpnpSu0COZ9DNHP72coaCu6RnL5a+P4MWkcWroUO+76k+np2ij yQf6yCb26XnzpvOvP/7TglP+1wWpSoRuF7AQKO34FBhCU3R33CNNf25+UD3eGumh36mh QkFzVi8PBPlyTY+5Z5Ho6Yw225wm5C7ufrn7Qiq9NWdcrhJJoEfa3yAfepa/Oi/YxXNb zvhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=to6BuY8wHl73LMGONRRmdpxjdou6kha7dPbBzZ/juC0=; b=xit5L/R3XQ73lM6XchFgEAUZ4hvMEIe7YQogLWKQlyxqH25C2Avuw7Qds3DboWwdMT 9pBdc0A5vnRRbg8J5KLmkyBfztY6EJjUjNBKpwDfTthnybzPI2qkArEpP+LKtvPS16Km C4GSurvFdECxQB8WebL9dESAkGlLjG37FN486TkOJ7EhaIo7caCSLtoyeE4Ued4TsS2A pnzyQiS3KwIdEICUWdqUrtFUcd+3NHSgn8sP0S826q6+MgeM1w1b9Gu49mjYHDFJKkxs HqQpwKN0nVwDcoBXA8czhGZXns1KVPe1tagdQ4wuHENzIlcWi6xDiBzafhqGl+k+R4wu e7EQ== ARC-Authentication-Results: i=1; mx.google.com; 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 j20si7342129pgg.162.2018.12.09.14.12.49; Sun, 09 Dec 2018 14:13:04 -0800 (PST) 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; 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 S1727983AbeLIWK0 (ORCPT + 99 others); Sun, 9 Dec 2018 17:10:26 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:37548 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727125AbeLIWKX (ORCPT ); Sun, 9 Dec 2018 17:10:23 -0500 Received: from pub.yeoldevic.com ([81.174.156.145] helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gW738-0002iY-8g; Sun, 09 Dec 2018 21:55:42 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gW72f-0003TT-JN; Sun, 09 Dec 2018 21:55:13 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Theodore Ts'o" Date: Sun, 09 Dec 2018 21:50:33 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 189/328] ext4: fix online resizing for bigalloc file systems with a 1k block size In-Reply-To: X-SA-Exim-Connect-IP: 81.174.156.145 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.62-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Theodore Ts'o commit 5f8c10936fab2b69a487400f2872902e597dd320 upstream. An online resize of a file system with the bigalloc feature enabled and a 1k block size would be refused since ext4_resize_begin() did not understand s_first_data_block is 0 for all bigalloc file systems, even when the block size is 1k. Signed-off-by: Theodore Ts'o Signed-off-by: Ben Hutchings --- fs/ext4/resize.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c @@ -18,6 +18,7 @@ int ext4_resize_begin(struct super_block *sb) { + struct ext4_sb_info *sbi = EXT4_SB(sb); int ret = 0; if (!capable(CAP_SYS_RESOURCE)) @@ -28,7 +29,7 @@ int ext4_resize_begin(struct super_block * because the user tools have no way of handling this. Probably a * bad time to do it anyways. */ - if (EXT4_SB(sb)->s_sbh->b_blocknr != + if (EXT4_B2C(sbi, sbi->s_sbh->b_blocknr) != le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block)) { ext4_warning(sb, "won't resize using backup superblock at %llu", (unsigned long long)EXT4_SB(sb)->s_sbh->b_blocknr);