From patchwork Tue Jan 28 14:06:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 232644 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=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 1B279C2D0DB for ; Tue, 28 Jan 2020 14:23:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E63B924688 for ; Tue, 28 Jan 2020 14:23:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580221433; bh=sGnxMuTgy7DgmZdvueqtU+n/1YlCWn9mXKr9FGAKLkw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ykIwUs9wEVjV/zrzjWguEV+FKSA8MWVJO4U+4loo6aRMFiF2PsTC6RqxQ2W60NSqE QiCZBDce/b835GJ8vOQPQ0qO18ny+I8ClfZE4OR5mDvEDC9ErpnWm7DDG50goEMsS5 MV92M28G0tl4gSQI6IpjDcZy9Lmi6SXD3+HNUdwk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732427AbgA1OXv (ORCPT ); Tue, 28 Jan 2020 09:23:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:50222 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732417AbgA1OXv (ORCPT ); Tue, 28 Jan 2020 09:23:51 -0500 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 0BE0A2071E; Tue, 28 Jan 2020 14:23:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580221430; bh=sGnxMuTgy7DgmZdvueqtU+n/1YlCWn9mXKr9FGAKLkw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=px69NmyvpNCeFGPXKl0R6lX/D+1ksB0ARXs9FPdOmACQmBhcceV36Qi3W0jhvbvtr KjVvEJ4scdOfb8o1HgU3hrWUHPYx2xduPbA8FTkAb5tcUria2220WaDmUajvF4XJg5 rULHqUImTixS5YWbnRntEkbdn1h84D9TH3aZP8TA= 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.9 220/271] afs: Fix large file support Date: Tue, 28 Jan 2020 15:06:09 +0100 Message-Id: <20200128135908.922984771@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135852.449088278@linuxfoundation.org> References: <20200128135852.449088278@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 fbdb022b75a27..65389394e2028 100644 --- a/fs/afs/super.c +++ b/fs/afs/super.c @@ -317,6 +317,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_bdi = &as->volume->bdi;