From: Jan Kara <jack@suse.cz>
To: Mingming Cao <cmm@us.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Jan Kara <jack@suse.cz>, tytso <tytso@mit.edu>,
linux-ext4 <linux-ext4@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH V5 4/5] QUOTA cleanup: Use inode->i_blkbits to get block bits
Date: Tue, 6 Jan 2009 10:32:19 +0100 [thread overview]
Message-ID: <20090106093219.GC10705@duck.suse.cz> (raw)
In-Reply-To: <1231216874.9267.29.camel@mingming-laptop>
On Mon 05-01-09 20:41:14, Mingming Cao wrote:
> quota: Use inode->i_blkbits to get block bits
>
> From: Mingming Cao <cmm@us.ibm.com>
>
> Andrew has suggested to use inode->i_blkbits to get the block bits info,
> rather than use super block's blockbits. That should be faster and emit
> less code.
>
> Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Thanks. The patch is fine. You can add "Acked-by: Jan Kara <jack@suse.cz>"
Honza
> ---
> include/linux/quotaops.h | 23 ++++++++---------------
> 1 file changed, 8 insertions(+), 15 deletions(-)
>
> Index: linux-2.6.28-git7/include/linux/quotaops.h
> ===================================================================
> --- linux-2.6.28-git7.orig/include/linux/quotaops.h 2009-01-05 20:06:37.000000000 -0800
> +++ linux-2.6.28-git7/include/linux/quotaops.h 2009-01-05 20:06:52.000000000 -0800
> @@ -412,39 +412,32 @@ static inline void vfs_dq_free_space(str
>
> static inline int vfs_dq_prealloc_block_nodirty(struct inode *inode, qsize_t nr)
> {
> - return vfs_dq_prealloc_space_nodirty(inode,
> - nr << inode->i_sb->s_blocksize_bits);
> + return vfs_dq_prealloc_space_nodirty(inode, nr << inode->i_blkbits);
> }
>
> static inline int vfs_dq_prealloc_block(struct inode *inode, qsize_t nr)
> {
> - return vfs_dq_prealloc_space(inode,
> - nr << inode->i_sb->s_blocksize_bits);
> + return vfs_dq_prealloc_space(inode, nr << inode->i_blkbits);
> }
>
> static inline int vfs_dq_alloc_block_nodirty(struct inode *inode, qsize_t nr)
> {
> - return vfs_dq_alloc_space_nodirty(inode,
> - nr << inode->i_sb->s_blocksize_bits);
> + return vfs_dq_alloc_space_nodirty(inode, nr << inode->i_blkbits);
> }
>
> -
> static inline int vfs_dq_alloc_block(struct inode *inode, qsize_t nr)
> {
> - return vfs_dq_alloc_space(inode,
> - nr << inode->i_sb->s_blocksize_bits);
> + return vfs_dq_alloc_space(inode, nr << inode->i_blkbits);
> }
>
> static inline int vfs_dq_reserve_block(struct inode *inode, qsize_t nr)
> {
> - return vfs_dq_reserve_space(inode,
> - nr << inode->i_blkbits);
> + return vfs_dq_reserve_space(inode, nr << inode->i_blkbits);
> }
>
> static inline int vfs_dq_claim_block(struct inode *inode, qsize_t nr)
> {
> - return vfs_dq_claim_space(inode,
> - nr << inode->i_blkbits);
> + return vfs_dq_claim_space(inode, nr << inode->i_blkbits);
> }
>
> static inline
> @@ -455,12 +448,12 @@ void vfs_dq_release_reservation_block(st
>
> static inline void vfs_dq_free_block_nodirty(struct inode *inode, qsize_t nr)
> {
> - vfs_dq_free_space_nodirty(inode, nr << inode->i_sb->s_blocksize_bits);
> + vfs_dq_free_space_nodirty(inode, nr << inode->i_blkbits);
> }
>
> static inline void vfs_dq_free_block(struct inode *inode, qsize_t nr)
> {
> - vfs_dq_free_space(inode, nr << inode->i_sb->s_blocksize_bits);
> + vfs_dq_free_space(inode, nr << inode->i_blkbits);
> }
>
> /*
>
>
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
prev parent reply other threads:[~2009-01-06 9:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-06 4:41 [PATCH V5 4/5] QUOTA cleanup: Use inode->i_blkbits to get block bits Mingming Cao
2009-01-06 9:32 ` Jan Kara [this message]
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=20090106093219.GC10705@duck.suse.cz \
--to=jack@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=cmm@us.ibm.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=tytso@mit.edu \
/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