Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1563994
| From | James Simmons <jsimmons@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] staging: lustre: use i_blocksize() |
| Date | 2017-01-21 00:40 +0100 |
| Message-ID | <t1QWK-5eo-15@gated-at.bofh.it> (permalink) |
| References | <t1Iwa-8q4-19@gated-at.bofh.it> <t1Iwa-8q4-33@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> Since i_blocksize() helper has been defined in fs.h, use it instead
> of open-coding.
The i_blocksize() work hasn't landed to the staging-next tree
so this can't land just yet.
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>
> ---
> drivers/staging/lustre/lustre/llite/file.c | 2 +-
> drivers/staging/lustre/lustre/obdclass/obdo.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c
> index d93f06a..3ee546f 100644
> --- a/drivers/staging/lustre/lustre/llite/file.c
> +++ b/drivers/staging/lustre/lustre/llite/file.c
> @@ -2967,7 +2967,7 @@ int ll_getattr(struct vfsmount *mnt, struct dentry *de, struct kstat *stat)
> stat->atime = inode->i_atime;
> stat->mtime = inode->i_mtime;
> stat->ctime = inode->i_ctime;
> - stat->blksize = 1 << inode->i_blkbits;
> + stat->blksize = i_blocksize(inode);
>
> stat->nlink = inode->i_nlink;
> stat->size = i_size_read(inode);
> diff --git a/drivers/staging/lustre/lustre/obdclass/obdo.c b/drivers/staging/lustre/lustre/obdclass/obdo.c
> index b1dfa16..b9be7db 100644
> --- a/drivers/staging/lustre/lustre/obdclass/obdo.c
> +++ b/drivers/staging/lustre/lustre/obdclass/obdo.c
> @@ -84,7 +84,7 @@ void obdo_from_inode(struct obdo *dst, struct inode *src, u32 valid)
> newvalid |= OBD_MD_FLBLOCKS;
> }
> if (valid & OBD_MD_FLBLKSZ) { /* optimal block size */
> - dst->o_blksize = 1 << src->i_blkbits;
> + dst->o_blksize = i_blocksize(src);
> newvalid |= OBD_MD_FLBLKSZ;
> }
> if (valid & OBD_MD_FLTYPE) {
> --
> 2.9.3
>
>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] staging: lustre: use i_blocksize() Geliang Tang <geliangtang@gmail.com> - 2017-01-20 15:40 +0100 Re: [PATCH] staging: lustre: use i_blocksize() James Simmons <jsimmons@infradead.org> - 2017-01-21 00:40 +0100
csiph-web