* [PATCH] md/bitmap: use i_blocksize()
[not found] <0a58b38c7ddfbbc8f56cb8d815114bd4357a6016.1484895399.git.geliangtang@gmail.com>
@ 2017-01-20 14:29 ` Geliang Tang
2017-01-20 15:00 ` Coly Li
2017-01-21 18:13 ` Shaohua Li
0 siblings, 2 replies; 5+ messages in thread
From: Geliang Tang @ 2017-01-20 14:29 UTC (permalink / raw)
To: Shaohua Li; +Cc: Geliang Tang, linux-raid, linux-kernel
Since i_blocksize() helper has been defined in fs.h, use it instead
of open-coding.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
drivers/md/bitmap.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index 9fb2cca..30b1b89 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -367,7 +367,7 @@ static int read_page(struct file *file, unsigned long index,
pr_debug("read bitmap file (%dB @ %llu)\n", (int)PAGE_SIZE,
(unsigned long long)index << PAGE_SHIFT);
- bh = alloc_page_buffers(page, 1<<inode->i_blkbits, 0);
+ bh = alloc_page_buffers(page, i_blocksize(inode), 0);
if (!bh) {
ret = -ENOMEM;
goto out;
@@ -385,10 +385,10 @@ static int read_page(struct file *file, unsigned long index,
goto out;
}
bh->b_bdev = inode->i_sb->s_bdev;
- if (count < (1<<inode->i_blkbits))
+ if (count < i_blocksize(inode))
count = 0;
else
- count -= (1<<inode->i_blkbits);
+ count -= i_blocksize(inode);
bh->b_end_io = end_bitmap_write;
bh->b_private = bitmap;
--
2.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] md/bitmap: use i_blocksize()
2017-01-20 14:29 ` [PATCH] md/bitmap: use i_blocksize() Geliang Tang
@ 2017-01-20 15:00 ` Coly Li
2017-01-21 18:13 ` Shaohua Li
1 sibling, 0 replies; 5+ messages in thread
From: Coly Li @ 2017-01-20 15:00 UTC (permalink / raw)
To: Geliang Tang, Shaohua Li; +Cc: linux-raid, linux-kernel
On 2017/1/20 下午10:29, Geliang Tang wrote:
> Since i_blocksize() helper has been defined in fs.h, use it instead
> of open-coding.
>
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>
> ---
> drivers/md/bitmap.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
> index 9fb2cca..30b1b89 100644
> --- a/drivers/md/bitmap.c
> +++ b/drivers/md/bitmap.c
> @@ -367,7 +367,7 @@ static int read_page(struct file *file, unsigned long index,
> pr_debug("read bitmap file (%dB @ %llu)\n", (int)PAGE_SIZE,
> (unsigned long long)index << PAGE_SHIFT);
>
> - bh = alloc_page_buffers(page, 1<<inode->i_blkbits, 0);
> + bh = alloc_page_buffers(page, i_blocksize(inode), 0);
> if (!bh) {
> ret = -ENOMEM;
> goto out;
> @@ -385,10 +385,10 @@ static int read_page(struct file *file, unsigned long index,
> goto out;
> }
> bh->b_bdev = inode->i_sb->s_bdev;
> - if (count < (1<<inode->i_blkbits))
> + if (count < i_blocksize(inode))
> count = 0;
> else
> - count -= (1<<inode->i_blkbits);
> + count -= i_blocksize(inode);
>
> bh->b_end_io = end_bitmap_write;
> bh->b_private = bitmap;
>
Acked-by: Coly Li <colyli@suse.de>
I agree with this. Thanks.
Coly
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] md/bitmap: use i_blocksize()
2017-01-20 14:29 ` [PATCH] md/bitmap: use i_blocksize() Geliang Tang
2017-01-20 15:00 ` Coly Li
@ 2017-01-21 18:13 ` Shaohua Li
2017-01-22 1:50 ` Geliang Tang
1 sibling, 1 reply; 5+ messages in thread
From: Shaohua Li @ 2017-01-21 18:13 UTC (permalink / raw)
To: Geliang Tang; +Cc: linux-raid, linux-kernel
On Fri, Jan 20, 2017 at 10:29:52PM +0800, Geliang Tang wrote:
> Since i_blocksize() helper has been defined in fs.h, use it instead
> of open-coding.
which tree is this patch applied to? I can't find it in Linus's tree
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>
> ---
> drivers/md/bitmap.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
> index 9fb2cca..30b1b89 100644
> --- a/drivers/md/bitmap.c
> +++ b/drivers/md/bitmap.c
> @@ -367,7 +367,7 @@ static int read_page(struct file *file, unsigned long index,
> pr_debug("read bitmap file (%dB @ %llu)\n", (int)PAGE_SIZE,
> (unsigned long long)index << PAGE_SHIFT);
>
> - bh = alloc_page_buffers(page, 1<<inode->i_blkbits, 0);
> + bh = alloc_page_buffers(page, i_blocksize(inode), 0);
> if (!bh) {
> ret = -ENOMEM;
> goto out;
> @@ -385,10 +385,10 @@ static int read_page(struct file *file, unsigned long index,
> goto out;
> }
> bh->b_bdev = inode->i_sb->s_bdev;
> - if (count < (1<<inode->i_blkbits))
> + if (count < i_blocksize(inode))
> count = 0;
> else
> - count -= (1<<inode->i_blkbits);
> + count -= i_blocksize(inode);
>
> bh->b_end_io = end_bitmap_write;
> bh->b_private = bitmap;
> --
> 2.9.3
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] md/bitmap: use i_blocksize()
2017-01-21 18:13 ` Shaohua Li
@ 2017-01-22 1:50 ` Geliang Tang
2017-05-02 14:33 ` Geliang Tang
0 siblings, 1 reply; 5+ messages in thread
From: Geliang Tang @ 2017-01-22 1:50 UTC (permalink / raw)
To: Shaohua Li; +Cc: Coly Li, linux-raid, linux-kernel
On Sat, Jan 21, 2017 at 10:13:07AM -0800, Shaohua Li wrote:
> On Fri, Jan 20, 2017 at 10:29:52PM +0800, Geliang Tang wrote:
> > Since i_blocksize() helper has been defined in fs.h, use it instead
> > of open-coding.
>
> which tree is this patch applied to? I can't find it in Linus's tree
>
This patch is against the last linux-next tree, next-20170120. It
depends on the patch '2651ed7 fs: add i_blocksize()' which isn't merged
into Linus's tree yet.
-Geliang
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] md/bitmap: use i_blocksize()
2017-01-22 1:50 ` Geliang Tang
@ 2017-05-02 14:33 ` Geliang Tang
0 siblings, 0 replies; 5+ messages in thread
From: Geliang Tang @ 2017-05-02 14:33 UTC (permalink / raw)
To: Shaohua Li; +Cc: linux-raid, linux-kernel, Coly Li
On Sun, Jan 22, 2017 at 09:50:30AM +0800, Geliang Tang wrote:
> On Sat, Jan 21, 2017 at 10:13:07AM -0800, Shaohua Li wrote:
> > On Fri, Jan 20, 2017 at 10:29:52PM +0800, Geliang Tang wrote:
> > > Since i_blocksize() helper has been defined in fs.h, use it instead
> > > of open-coding.
> >
> > which tree is this patch applied to? I can't find it in Linus's tree
> >
>
> This patch is against the last linux-next tree, next-20170120. It
> depends on the patch '2651ed7 fs: add i_blocksize()' which isn't merged
> into Linus's tree yet.
>
> -Geliang
Hi Shaohua,
The i_blocksize() helper has been merged into Linus's tree already, and
this patch is still valid. Could you please reconsider it if this patch
can be applied?
Thanks.
-Geliang
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-05-02 14:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <0a58b38c7ddfbbc8f56cb8d815114bd4357a6016.1484895399.git.geliangtang@gmail.com>
2017-01-20 14:29 ` [PATCH] md/bitmap: use i_blocksize() Geliang Tang
2017-01-20 15:00 ` Coly Li
2017-01-21 18:13 ` Shaohua Li
2017-01-22 1:50 ` Geliang Tang
2017-05-02 14:33 ` Geliang Tang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox