From: Jeff Layton <jlayton@redhat.com>
To: Steve French <smfrench@gmail.com>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: New sparse warning on setting s_maxbytes?
Date: Wed, 3 Oct 2012 15:49:59 -0400 [thread overview]
Message-ID: <20121003154959.06f51a7b@tlielax.poochiereds.net> (raw)
In-Reply-To: <CAH2r5mtOFSiu49a8vHPHC=J1QTX2_6wvAUZRKq5=HoWAXpJsOA@mail.gmail.com>
On Wed, 3 Oct 2012 14:07:55 -0500
Steve French <smfrench@gmail.com> wrote:
> I noticed this new sparse warning on setting s_maxbytes
> fs/cifs/cifsfs.c:109:34: warning: constant 0x7fffffffffffffff is so
> big it is long
>
> e.g. cifsfs.c, as do various other file systems, has
>
> sb->s_maxbytes = MAX_LFS_FILESIZE;
>
> fs.h defines it:
>
> /* Page cache limit. The filesystems should put that into their s_maxbytes
> limits, otherwise bad things can happen in VM. */
> #if BITS_PER_LONG==32
> #define MAX_LFS_FILESIZE (((loff_t)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1)
> #elif BITS_PER_LONG==64
> #define MAX_LFS_FILESIZE ((loff_t)0x7fffffffffffffff)
> #endif
>
> It looks like recent commit 2bd2c1941f141ad780135ccc1cd08ca71a24f10a
> ("MAX_LFS_FILESIZE should be a loff_t") causes the warning. Removes
> one warning but causes another.
>
That sounds like a sparse bug. loff_t is a "long long" AFAICT, which
should be fine to hold that large a value...
--
Jeff Layton <jlayton@redhat.com>
next prev parent reply other threads:[~2012-10-03 19:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-03 19:07 New sparse warning on setting s_maxbytes? Steve French
2012-10-03 19:49 ` Jeff Layton [this message]
2012-10-03 19:52 ` Al Viro
2012-10-03 20:08 ` Steve French
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121003154959.06f51a7b@tlielax.poochiereds.net \
--to=jlayton@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=smfrench@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).