Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751725AbdHaWif (ORCPT ); Thu, 31 Aug 2017 18:38:35 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:33518 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751285AbdHaWid (ORCPT ); Thu, 31 Aug 2017 18:38:33 -0400 X-Google-Smtp-Source: ADKCNb5kuU3pleVLBe3WK/T/2FcJF8WrWdmYgnwTu7TujBhQl3VUfuMflrEODm8KgZaUZaYSGZgkxw== From: Andreas Dilger Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_366886CD-077E-43C0-81C1-967635A06C91"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [PATCH] jfs should use MAX_LFS_FILESIZE when calculating s_maxbytes Date: Thu, 31 Aug 2017 16:38:26 -0600 In-Reply-To: <624533ff-38bf-943b-4535-792fa0a3e93c@oracle.com> Cc: Linus Torvalds , Doug Nazar , Al Viro , Linux Kernel Mailing List , Wei Fang , linux-fsdevel , Mark Fasheh , Joel Becker , jfs-discussion@lists.sourceforge.net To: Dave Kleikamp References: <624533ff-38bf-943b-4535-792fa0a3e93c@oracle.com> X-Mailer: Apple Mail (2.3273) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2268 Lines: 85 --Apple-Mail=_366886CD-077E-43C0-81C1-967635A06C91 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Aug 31, 2017, at 3:46 PM, Dave Kleikamp = wrote: >=20 > jfs had previously avoided the use of MAX_LFS_FILESIZE because it = hadn't > accounted for the whole 32-bit index range on 32-bit systems. That has > been fixed, so we can simplify the code now. >=20 > Suggested by Andreas Dilger. >=20 > Signed-off-by: Dave Kleikamp > Cc: Andreas Dilger Reviewed-by: Andreas Dilger > Cc: jfs-discussion@lists.sourceforge.net > --- > Linus, > If you don't want to pick this up now, I'll push it in the next merge > window. >=20 > fs/jfs/super.c | 12 +++--------- > 1 file changed, 3 insertions(+), 9 deletions(-) >=20 > diff --git a/fs/jfs/super.c b/fs/jfs/super.c > index 78b41e1d5c67..60726ae7cf26 100644 > --- a/fs/jfs/super.c > +++ b/fs/jfs/super.c > @@ -619,16 +619,10 @@ static int jfs_fill_super(struct super_block = *sb, void *data, int silent) > if (!sb->s_root) > goto out_no_root; >=20 > - /* logical blocks are represented by 40 bits in pxd_t, etc. */ > - sb->s_maxbytes =3D ((u64) sb->s_blocksize) << 40; > -#if BITS_PER_LONG =3D=3D 32 > - /* > - * Page cache is indexed by long. > - * I would use MAX_LFS_FILESIZE, but it's only half as big > + /* logical blocks are represented by 40 bits in pxd_t, etc. > + * and page cache is indexed by long > */ > - sb->s_maxbytes =3D min(((u64) PAGE_SIZE << 32) - 1, > - (u64)sb->s_maxbytes); > -#endif > + sb->s_maxbytes =3D min(((loff_t)sb->s_blocksize) << 40, = MAX_LFS_FILESIZE); > sb->s_time_gran =3D 1; > return 0; >=20 > -- > 2.14.1 >=20 Cheers, Andreas --Apple-Mail=_366886CD-077E-43C0-81C1-967635A06C91 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iD8DBQFZqI/jpIg59Q01vtYRAkF3AKDv8yge5XJsoWOI6s4COujSByIGiACfV6qM fEI3PS5sPb/ppqZQBVwF65w= =WZ1Z -----END PGP SIGNATURE----- --Apple-Mail=_366886CD-077E-43C0-81C1-967635A06C91--