lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090106093219.GC10705@duck.suse.cz>
Date:	Tue, 6 Jan 2009 10:32:19 +0100
From:	Jan Kara <jack@...e.cz>
To:	Mingming Cao <cmm@...ibm.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>, Jan Kara <jack@...e.cz>,
	tytso <tytso@....edu>, linux-ext4 <linux-ext4@...r.kernel.org>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH V5  4/5] QUOTA cleanup: Use inode->i_blkbits to get
	block bits

On Mon 05-01-09 20:41:14, Mingming Cao wrote:
> quota: Use inode->i_blkbits to get block bits
> 
> From: Mingming Cao <cmm@...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@...ibm.com>
  Thanks. The patch is fine. You can add "Acked-by: Jan Kara <jack@...e.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@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ