From: "Michael L. Semon" <mlsemon35@gmail.com>
To: Jeff Liu <jeff.liu@oracle.com>
Cc: "xfs@oss.sgi.com" <xfs@oss.sgi.com>
Subject: Re: [PATCH] xfs: fix s_max_bytes to MAX_LFS_FILESIZE if needed
Date: Fri, 12 Apr 2013 11:20:30 -0400 [thread overview]
Message-ID: <5168263E.40208@gmail.com> (raw)
In-Reply-To: <5167E160.3020800@oracle.com>
I'll try this patch tonight. Thanks!
BTW, after failures with CONFIG_LBDAF=n in previous xfstests, my kernels
should have CONFIG_LBDAF=y, but I could be wrong. I'll check this when
I get back to my test PC and test your patch with both settings.
Michael
On 04/12/2013 06:26 AM, Jeff Liu wrote:
> From: Jie Liu <jeff.liu@oracle.com>
>
> This patch fix the s_max_bytes to MAX_LFS_FILESIZE if the pre-calculated value is greater
> than it.
>
> Reported-by: Michael L. Semon <mlsemon35@gmail.com>
> Signed-off-by: Jie Liu <jeff.liu@oracle.com>
>
> ---
> fs/xfs/xfs_super.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
> index ea341ce..0644d61 100644
> --- a/fs/xfs/xfs_super.c
> +++ b/fs/xfs/xfs_super.c
> @@ -585,6 +585,7 @@ xfs_max_file_offset(
> {
> unsigned int pagefactor = 1;
> unsigned int bitshift = BITS_PER_LONG - 1;
> + __uint64_t offset;
>
> /* Figure out maximum filesize, on Linux this can depend on
> * the filesystem blocksize (on 32 bit platforms).
> @@ -610,7 +611,10 @@ xfs_max_file_offset(
> # endif
> #endif
>
> - return (((__uint64_t)pagefactor) << bitshift) - 1;
> + offset = (((__uint64_t)pagefactor) << bitshift) - 1;
> +
> + /* Check against VM & VFS exposed limits */
> + return (offset > MAX_LFS_FILESIZE) ? MAX_LFS_FILESIZE : offset;
> }
>
> xfs_agnumber_t
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-04-12 15:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-12 10:26 [PATCH] xfs: fix s_max_bytes to MAX_LFS_FILESIZE if needed Jeff Liu
2013-04-12 15:20 ` Michael L. Semon [this message]
2013-04-13 5:03 ` Michael L. Semon
2013-04-13 21:20 ` Michael L. Semon
2013-04-16 5:40 ` Jeff Liu
2013-04-16 5:55 ` Michael L. Semon
2013-07-10 6:28 ` Jeff Liu
2013-07-10 6:48 ` Dave Chinner
2013-07-10 13:14 ` Jeff Liu
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=5168263E.40208@gmail.com \
--to=mlsemon35@gmail.com \
--cc=jeff.liu@oracle.com \
--cc=xfs@oss.sgi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.