From: Andrew Morton <akpm@osdl.org>
To: cmm@us.ibm.com
Cc: linux-kernel@vger.kernel.org, ext2-devel@lists.sourceforge.net,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 3/9] support >32 bit ext4 filesystem block type in kernel
Date: Wed, 9 Aug 2006 23:40:33 -0700 [thread overview]
Message-ID: <20060809234033.4681017b.akpm@osdl.org> (raw)
In-Reply-To: <1155172860.3161.82.camel@localhost.localdomain>
On Wed, 09 Aug 2006 18:21:00 -0700
Mingming Cao <cmm@us.ibm.com> wrote:
>
> Redefine ext4 in-kernel filesystem block type (ext4_fsblk_t) from unsigned
> long to sector_t, to allow kernel to handle >32 bit ext4 blocks.
>
I don't get it.
Randomly-chosen snippet:
> @@ -274,7 +274,8 @@ static int find_group_orlov(struct super
> freei = percpu_counter_read_positive(&sbi->s_freeinodes_counter);
> avefreei = freei / ngroups;
> freeb = percpu_counter_read_positive(&sbi->s_freeblocks_counter);
> - avefreeb = freeb / ngroups;
> + avefreeb = freeb;
> + sector_div(avefreeb, ngroups);
> ndirs = percpu_counter_read_positive(&sbi->s_dirs_counter);
>
> if ((parent == sb->s_root->d_inode) ||
Here, `avefreeb' is still a 32-bit type. Why feed it into sector_div()?
> @@ -303,13 +304,15 @@ static int find_group_orlov(struct super
> goto fallback;
> }
>
> - blocks_per_dir = (le32_to_cpu(es->s_blocks_count) - freeb) / ndirs;
> + blocks_per_dir = le32_to_cpu(es->s_blocks_count) - freeb;
> + sector_div(blocks_per_dir, ndirs);
And here le32_to_cpu() is very much a 32-bit type. Why sector_div()?
And I agree with me: we want to get all the sector_t's out of this
filesystem. unsigned long long, do_div()?
next prev parent reply other threads:[~2006-08-10 6:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-10 1:21 [PATCH 3/9] support >32 bit ext4 filesystem block type in kernel Mingming Cao
2006-08-10 6:40 ` Andrew Morton [this message]
2006-08-10 17:19 ` Mingming Cao
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=20060809234033.4681017b.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=cmm@us.ibm.com \
--cc=ext2-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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