From patchwork Fri Jan 24 09:32:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 233107 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=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable 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 8AC9CC32771 for ; Fri, 24 Jan 2020 10:08:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 578C324686 for ; Fri, 24 Jan 2020 10:08:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579860505; bh=XXPCI+Js3489VVSMt3F3iWQj9EBL1r7i9D023TuHid8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=e5rLPwEYQpX0I1YM31qqnhjSOYf0MxJSxDF1EaO5j80UkyWxwImzOISnM+0KVYI+g O3Sk0m62WRAkO3J4HAIVqTOGEF7yrJY3e5n2w3zz6vhG8Z/hvL1oGM9Z9AhQy/fnX6 +67/MPzK4rmPOatnkb4VVAp9/nzheacQL5S3YtR0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389321AbgAXKIW (ORCPT ); Fri, 24 Jan 2020 05:08:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:45146 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388724AbgAXKIV (ORCPT ); Fri, 24 Jan 2020 05:08:21 -0500 Received: from localhost (unknown [145.15.244.15]) (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 5350A2087E; Fri, 24 Jan 2020 10:08:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579860500; bh=XXPCI+Js3489VVSMt3F3iWQj9EBL1r7i9D023TuHid8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0ORaG7pz2TW6dBoINUW3M8ilHm0PydgNx3AOKpbMvHn+qMvESH7psiI1W/ifXcvv6 Ncs5QnLU7CzfD2TjNmkM9/YOds7YJiGw9OSAqkqgON7quhSLqazU6GMrJSYCd+84+b 2gw2+opC+RbHrpdlDM3jPSA7fpkdd34Qul8x1xwY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marc Dionne , David Howells , Linus Torvalds , Sasha Levin Subject: [PATCH 4.14 330/343] afs: Fix large file support Date: Fri, 24 Jan 2020 10:32:28 +0100 Message-Id: <20200124093003.188619321@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200124092919.490687572@linuxfoundation.org> References: <20200124092919.490687572@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Marc Dionne [ Upstream commit b485275f1aca8a9da37fd35e4fad673935e827da ] By default s_maxbytes is set to MAX_NON_LFS, which limits the usable file size to 2GB, enforced by the vfs. Commit b9b1f8d5930a ("AFS: write support fixes") added support for the 64-bit fetch and store server operations, but did not change this value. As a result, attempts to write past the 2G mark result in EFBIG errors: $ dd if=/dev/zero of=foo bs=1M count=1 seek=2048 dd: error writing 'foo': File too large Set s_maxbytes to MAX_LFS_FILESIZE. Fixes: b9b1f8d5930a ("AFS: write support fixes") Signed-off-by: Marc Dionne Signed-off-by: David Howells Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- fs/afs/super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/afs/super.c b/fs/afs/super.c index 689173c0a682f..f8529ddbd587f 100644 --- a/fs/afs/super.c +++ b/fs/afs/super.c @@ -359,6 +359,7 @@ static int afs_fill_super(struct super_block *sb, /* fill in the superblock */ sb->s_blocksize = PAGE_SIZE; sb->s_blocksize_bits = PAGE_SHIFT; + sb->s_maxbytes = MAX_LFS_FILESIZE; sb->s_magic = AFS_FS_MAGIC; sb->s_op = &afs_super_ops; sb->s_xattr = afs_xattr_handlers;