Re: [PATCH] dm table: fix logic bug in dm_table_supports_write_same [was: Re: BLKZEROOUT on dm devices]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 30, 2013 at 10:02 PM, Mike Snitzer <snitzer@xxxxxxxxxx> wrote:
> On Tue, Apr 30 2013 at 12:07am -0400,
> Bharata B Rao <bharata.rao@xxxxxxxxx> wrote:
>
>>
>> # lsblk
>> NAME                             MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
>> sda                                8:0    0    50G  0 disk
>> └─mpathb (dm-12)                 252:12   0    50G  0 mpath
>>   └─ws_vg-lvol0 (dm-11)          252:11   0     1G  0 lvm
>> sde                                8:64   0    50G  0 disk
>> └─mpathb (dm-12)                 252:12   0    50G  0 mpath
>>   └─ws_vg-lvol0 (dm-11)          252:11   0     1G  0 lvm
>>
>
>
> Anyway, this patch fixes things for me:

Thanks, this fixes the issue for me too. However if LV/VG/PV are
created on multipath device, then WRITE SAME still doesn't get
advertised for the LV. I had to disable multipath and re-create
LV/VG/PV on a normal device (/dev/sda as against /dev/mapper/mapathb)
to get BLKZEROUT working on LV.

>
> From: Mike Snitzer <snitzer@xxxxxxxxxx>
> Date: Tue, 30 Apr 2013 12:24:58 -0400
> Subject: [PATCH] dm table: fix logic bug in dm_table_supports_write_same
>
> If device_not_write_same_capable() returns true then the iterate_devices
> loop in dm_table_supports_write_same() should return false.
>
> Reported-by: Bharata B Rao <bharata.rao@xxxxxxxxx>
> Signed-off-by: Mike Snitzer <snitzer@xxxxxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx # v3.8+
> ---
>  drivers/md/dm-table.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
> index 3fe797f..d801682 100644
> --- a/drivers/md/dm-table.c
> +++ b/drivers/md/dm-table.c
> @@ -1445,7 +1445,7 @@ static bool dm_table_supports_write_same(struct dm_table *t)
>                         return false;
>
>                 if (!ti->type->iterate_devices ||
> -                   !ti->type->iterate_devices(ti, device_not_write_same_capable, NULL))
> +                   ti->type->iterate_devices(ti, device_not_write_same_capable, NULL))
>                         return false;
>         }
>
> --
> 1.7.1
>



-- 
http://raobharata.wordpress.com/

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel





[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux