Re: [PATCH] block: bio_check_eod() needs to consider partition

2018-03-08 Thread Jiufei Xue
hole disk after remap which is add in the commit 5ddfe9691c91 ("md: check bio address after mapping through partitions"). Thanks, Jiufei > Based on an earlier patch from Jiufei Xue. > > Fixes: 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and > partitions

Re: [PATCH 2/4] block: bio_check_eod() needs to consider partition

2018-02-28 Thread Jiufei Xue
Hi Christoph, thanks for your quick reply. On 2018/3/1 上午1:48, Christoph Hellwig wrote: > Hmm. I'd rather just kill off bio_check_eod and move the check > to blk_partition_remap so that we only have to check once. > I think the check should be done twice if the bi_partno is not zero, one for

[PATCH 2/4] block: bio_check_eod() needs to consider partition

2018-02-27 Thread Jiufei Xue
bio_check_eod() should check partiton size not the whole disk if bio->bi_partno is not zero. Fixes: 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and partitions index") Signed-off-by: Jiufei Xue <jiufei@linux.alibaba.com> --- bl

[PATCH 3/4] block: display the correct diskname for bio

2018-02-27 Thread Jiufei Xue
bio_devname use __bdevname to display the device name, and can only show the major and minor of the part0, Fix this by using disk_name to display the correct name. Fixes: 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and partitions index") Signed-off-by: Jiufei X

[PATCH 4/4] block: fix a typo

2018-02-27 Thread Jiufei Xue
Fix a typo in pkt_start_recovery. Fixes: 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and partitions index") Signed-off-by: Jiufei Xue <jiufei@linux.alibaba.com> --- drivers/block/pktcdvd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 1/4] block: fix the count of PGPGOUT for WRITE_SAME

2018-02-27 Thread Jiufei Xue
wig <h...@lst.de> Signed-off-by: Jiufei Xue <jiufei@linux.alibaba.com> --- block/blk-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-core.c b/block/blk-core.c index 2d1a7bb..6d82c4f 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -2434,7 +2

[PATCH V2 0/4] fix a few problems in block layer

2018-02-27 Thread Jiufei Xue
s not zero to avoid another partition lookup. Jiufei Xue (4) block: fix the count of PGPGOUT for WRITE_SAME block: bio_check_eod() needs to consider partition block: display the correct disk name for bio block: fix a typo and modify the documentation for bio block/blk-core.c

Re: [PATCH 2/4] block: bio_check_eod() needs to consider partition

2018-02-26 Thread Jiufei Xue
On 2018/2/27 上午8:11, Christoph Hellwig wrote: > The issue looks real, but please try to do this without another > partition lookup. > Yes, I think the partition size test can be moved to blk_partition_remap(). I will send version 2 later.

[PATCH 2/4] block: bio_check_eod() needs to consider partition

2018-02-26 Thread Jiufei Xue
bio_check_eod() should get the capacity of partiton, not the whole disk. Signed-off-by: Jiufei Xue <jiufei@linux.alibaba.com> --- block/blk-core.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 6d82c4f..e

[PATCH 1/4] block: fix the count of PGPGOUT for WRITE_SAME

2018-02-26 Thread Jiufei Xue
The vm counters is counted in sectors, so we should do the conversation in submit_bio. Fixes: 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and partitions index") Signed-off-by: Jiufei Xue <jiufei@linux.alibaba.com> --- block/blk-core.c | 2 +- 1 file chan

[PATCH 4/4] block: fix a typo

2018-02-26 Thread Jiufei Xue
Signed-off-by: Jiufei Xue <jiufei@linux.alibaba.com> --- drivers/block/pktcdvd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 531a091..c61d20c 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pkt

[PATCH 3/4] block: display the correct diskname for bio

2018-02-26 Thread Jiufei Xue
bio_devname use __bdevname to display the device name, and can only show the major and minor of the part0. Fix this by using disk_name to display the correct name. Signed-off-by: Jiufei Xue <jiufei@linux.alibaba.com> --- block/partition-generic.c | 6 ++ include/linux/bio.h

[PATCH 0/4] fix a few problems in block layer

2018-02-26 Thread Jiufei Xue
I have found a few problems while reviewing the patch 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and partitions index"), So fix them. Jiufei Xue (4) block: fix the count of PGPGOUT for WRITE_SAME block: bio_check_eod() needs to consider partition block: display the co