From: yangerkun <yangerkun@huawei.com>
To: <jack@suse.cz>
Cc: <miaoxie@huawei.com>, <yi.zhang@huawei.com>, <houtao1@huawei.com>,
<yangerkun@huawei.com>, <linux-ext4@vger.kernel.org>
Subject: [PATCH 0/2] fix a bug in ext2_max_size
Date: Wed, 23 Jan 2019 21:14:07 +0800 [thread overview]
Message-ID: <20190123131409.126156-1-yangerkun@huawei.com> (raw)
When mkfs.ext2 with '-b 65536' and mount(arm 64KB page size),
function mount_fs will trigger WARNNING since ext2_max_size will
return value less than 0. Also, we cannot write any file in this
fs since the sb->maxbytes is less than 0.
Fix it by get the exact max file size.
yangerkun (2):
ext2: remove static of ext2_block_to_path
ext2: get the exact max filesize in ext2_max_size
fs/ext2/ext2.h | 1 +
fs/ext2/inode.c | 16 ++++----
fs/ext2/super.c | 115 ++++++++++++++++++++++++++++++++++++++++++++------------
3 files changed, 101 insertions(+), 31 deletions(-)
--
2.9.5
next reply other threads:[~2019-01-23 13:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-23 13:14 yangerkun [this message]
2019-01-23 13:14 ` [PATCH 1/2] ext2: remove static of ext2_block_to_path yangerkun
2019-01-23 13:14 ` [PATCH 2/2] ext2: get the exact max filesize in ext2_max_size yangerkun
2019-01-29 16:42 ` Jan Kara
2019-01-31 11:42 ` yangerkun
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=20190123131409.126156-1-yangerkun@huawei.com \
--to=yangerkun@huawei.com \
--cc=houtao1@huawei.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=miaoxie@huawei.com \
--cc=yi.zhang@huawei.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).