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 --- block/blk-core.c | 79

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.

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

2018-02-26 Thread Omar Sandoval
On Mon, Feb 26, 2018 at 08:04:38PM +0800, Jiufei Xue wrote: > bio_check_eod() should get the capacity of partiton, not the whole > disk. > > Signed-off-by: Jiufei Xue > --- > block/blk-core.c | 16 > 1 file changed, 12 insertions(+), 4 deletions(-)

[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 --- 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..ef6677d