Re: [PATCH] virtio-mem: Fix the bitmap index of the section offset

2022-12-19 Thread Michael S. Tsirkin
On Fri, Dec 16, 2022 at 02:22:31PM +0800, Chenyi Qiang wrote: > vmem->bitmap indexes the memory region of the virtio-mem backend at a > granularity of block_size. To calculate the index of target section offset, > the block_size should be divided instead of the bitmap_size. > > Fixes: 2044969f0b (

Re: [PATCH] virtio-mem: Fix the bitmap index of the section offset

2022-12-19 Thread David Hildenbrand
On 19.12.22 02:21, Chenyi Qiang wrote: On 12/16/2022 6:30 PM, David Hildenbrand wrote: On 16.12.22 09:52, David Hildenbrand wrote: On 16.12.22 07:22, Chenyi Qiang wrote: vmem->bitmap indexes the memory region of the virtio-mem backend at a granularity of block_size. To calculate the index of

Re: [PATCH] virtio-mem: Fix the bitmap index of the section offset

2022-12-18 Thread Chenyi Qiang
On 12/16/2022 6:30 PM, David Hildenbrand wrote: > On 16.12.22 09:52, David Hildenbrand wrote: >> On 16.12.22 07:22, Chenyi Qiang wrote: >>> vmem->bitmap indexes the memory region of the virtio-mem backend at a >>> granularity of block_size. To calculate the index of target section >>> offset, >>

Re: [PATCH] virtio-mem: Fix the bitmap index of the section offset

2022-12-16 Thread David Hildenbrand
On 16.12.22 09:52, David Hildenbrand wrote: On 16.12.22 07:22, Chenyi Qiang wrote: vmem->bitmap indexes the memory region of the virtio-mem backend at a granularity of block_size. To calculate the index of target section offset, the block_size should be divided instead of the bitmap_size. I'm

Re: [PATCH] virtio-mem: Fix the bitmap index of the section offset

2022-12-16 Thread David Hildenbrand
On 16.12.22 07:22, Chenyi Qiang wrote: vmem->bitmap indexes the memory region of the virtio-mem backend at a granularity of block_size. To calculate the index of target section offset, the block_size should be divided instead of the bitmap_size. I'm curious, what's the user-visible effect and h

[PATCH] virtio-mem: Fix the bitmap index of the section offset

2022-12-15 Thread Chenyi Qiang
vmem->bitmap indexes the memory region of the virtio-mem backend at a granularity of block_size. To calculate the index of target section offset, the block_size should be divided instead of the bitmap_size. Fixes: 2044969f0b ("virtio-mem: Implement RamDiscardManager interface") Signed-off-by: Chen