From: Andrew Morton <akpm@linux-foundation.org>
To: Jan Kara <jack@suse.cz>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 12/14] quota: Split off quota tree handling into a separate file
Date: Mon, 27 Oct 2008 22:52:42 -0700 [thread overview]
Message-ID: <20081027225242.cad4ee18.akpm@linux-foundation.org> (raw)
In-Reply-To: <12251095133700-git-send-email-jack@suse.cz>
On Mon, 27 Oct 2008 13:11:50 +0100 Jan Kara <jack@suse.cz> wrote:
> There is going to be a new version of quota format having 64-bit
> quota limits and a new quota format for OCFS2. They are both
> going to use the same tree structure as VFSv0 quota format. So
> split out tree handling into a separate file and make size of
> leaf blocks, amount of space usable in each block (needed for
> checksumming) and structures contained in them configurable
> so that the code can be shared.
>
>
> ...
>
> +
> +typedef char *dqbuf_t;
This thing is fairly unpleasant. It would have been better to have
open-coded `char *' everywhere - the typedef just obscures what's going
on. Or void*.
Also, in most cases the return value of getdqbuf() is cast to a `struct
qt_disk_dqdbheader *', so why not make getdqbuf() return a pointer of
that type?
Anyway, that's all old code and this patch just moves it around.
Please sometime take a look at whether this code is as tip-top,
super-duper as we'd like?
> +static inline ssize_t read_blk(struct qtree_mem_dqinfo *info, uint blk, dqbuf_t buf)
> +{
> + struct super_block *sb = info->dqi_sb;
> +
> + memset(buf, 0, info->dqi_usable_bs);
> + return sb->s_op->quota_read(sb, info->dqi_type, (char *)buf,
> + info->dqi_usable_bs, blk << info->dqi_blocksize_bits);
> +}
> +
> +static inline ssize_t write_blk(struct qtree_mem_dqinfo *info, uint blk, dqbuf_t buf)
> +{
> + struct super_block *sb = info->dqi_sb;
> +
> + return sb->s_op->quota_write(sb, info->dqi_type, (char *)buf,
> + info->dqi_usable_bs, blk << info->dqi_blocksize_bits);
> +}
I expect you'll get some nice code-size and cache-footprint
improvements by uninlining these.
next prev parent reply other threads:[~2008-10-28 5:53 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-27 12:11 [PATCH 00/14] 64-bit quotas and preparations for OCFS2 quotas Jan Kara
2008-10-27 12:11 ` [PATCH 01/14] quota: Add callbacks for allocating and destroying dquot structures Jan Kara
2008-10-27 12:11 ` [PATCH 02/14] quota: Increase size of variables for limits and inode usage Jan Kara
2008-10-27 12:11 ` [PATCH 03/14] quota: Remove bogus 'optimization' in check_idq() and check_bdq() Jan Kara
2008-10-27 12:11 ` [PATCH 04/14] quota: Make _SUSPENDED just a flag Jan Kara
2008-10-27 12:11 ` [PATCH 05/14] quota: Allow to separately enable quota accounting and enforcing limits Jan Kara
2008-10-27 12:11 ` [PATCH 06/14] ext3: Use sb_any_quota_loaded() instead of sb_any_quota_enabled() Jan Kara
2008-10-27 12:11 ` [PATCH 07/14] ext4: " Jan Kara
2008-10-27 12:11 ` [PATCH 08/14] reiserfs: " Jan Kara
2008-10-27 12:11 ` [PATCH 09/14] quota: Remove compatibility function sb_any_quota_enabled() Jan Kara
2008-10-27 12:11 ` [PATCH 10/14] quota: Introduce DQUOT_QUOTA_SYS_FILE flag Jan Kara
2008-10-27 12:11 ` [PATCH 11/14] quota: Move quotaio_v[12].h from include/linux/ to fs/ Jan Kara
2008-10-27 12:11 ` [PATCH 12/14] quota: Split off quota tree handling into a separate file Jan Kara
2008-10-27 12:11 ` [PATCH 13/14] quota: Convert union in mem_dqinfo to a pointer Jan Kara
2008-10-27 12:11 ` [PATCH 14/14] quota: Support 64-bit quota format Jan Kara
2008-10-28 5:29 ` Andrew Morton
2008-10-29 2:39 ` Jan Kara
2008-10-29 0:41 ` Mingming Cao
2008-10-29 1:02 ` Andrew Morton
2008-10-29 21:31 ` Mingming Cao
2008-10-28 5:55 ` [PATCH 13/14] quota: Convert union in mem_dqinfo to a pointer Andrew Morton
2008-10-29 2:40 ` Jan Kara
2008-10-28 5:52 ` Andrew Morton [this message]
2008-10-29 2:43 ` [PATCH 12/14] quota: Split off quota tree handling into a separate file Jan Kara
2008-10-28 22:32 ` [PATCH 11/14] quota: Move quotaio_v[12].h from include/linux/ to fs/ Andrew Morton
2008-10-29 3:21 ` Jan Kara
2008-10-28 5:44 ` [PATCH 10/14] quota: Introduce DQUOT_QUOTA_SYS_FILE flag Andrew Morton
2008-10-28 17:51 ` Joel Becker
2008-10-28 5:40 ` [PATCH 02/14] quota: Increase size of variables for limits and inode usage Andrew Morton
2008-10-28 9:11 ` Boaz Harrosh
2008-10-29 3:01 ` Jan Kara
2008-10-28 5:33 ` [PATCH 01/14] quota: Add callbacks for allocating and destroying dquot structures Andrew Morton
2008-10-29 3:05 ` Jan Kara
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=20081027225242.cad4ee18.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@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;
as well as URLs for NNTP newsgroup(s).