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

[dm-devel] [PATCH] dm mpath: enable WRITE SAME support



On Wed, May 01 2013 at  2:58am -0400,
Bharata B Rao <bharata rao gmail com> wrote:

> On Tue, Apr 30, 2013 at 10:02 PM, Mike Snitzer <snitzer redhat com> wrote:
> > On Tue, Apr 30 2013 at 12:07am -0400,
> > Bharata B Rao <bharata rao gmail com> 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.

The multipath target did not opt-in to supporting WRITE SAME.  Please
try this patch.

From: Mike Snitzer <snitzer redhat com>
Subject: [PATCH] dm mpath: enable WRITE SAME support

There is no reason to disallow WRITE SAME support.  As far as multipath
is concerned it is just another write request.

Signed-off-by: Mike Snitzer <snitzer redhat com>
---
 drivers/md/dm-mpath.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 51bb816..bdf26f5 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -907,6 +907,7 @@ static int multipath_ctr(struct dm_target *ti, unsigned int argc,
 
 	ti->num_flush_bios = 1;
 	ti->num_discard_bios = 1;
+	ti->num_write_same_bios = 1;
 
 	return 0;
 
-- 
1.7.1


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