FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 07-23-2010, 11:24 PM
Mike Snitzer
 
Default dm mpath: enable discard support

Enable discard support in the DM multipath target.

This discard support depends on a few discard-specific fixes to the
block layer's request stacking driver methods.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: Kiyoshi Ueda <k-ueda@ct.jp.nec.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 826bce7..ec2b43e 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -892,6 +892,7 @@ static int multipath_ctr(struct dm_target *ti, unsigned int argc,
}

ti->num_flush_requests = 1;
+ ti->num_discard_requests = 1;

return 0;

--
1.6.6.1

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 07-24-2010, 04:09 PM
Mike Snitzer
 
Default dm mpath: enable discard support

Enable discard support in the DM multipath target.

This discard support depends on a few discard-specific fixes to the
block layer's request stacking driver methods.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
---
drivers/md/dm-mpath.c | 1 +
1 file changed, 1 insertion(+)

Index: linux-2.6-block/drivers/md/dm-mpath.c
================================================== =================
--- linux-2.6-block.orig/drivers/md/dm-mpath.c
+++ linux-2.6-block/drivers/md/dm-mpath.c
@@ -893,6 +893,7 @@ static int multipath_ctr(struct dm_targe
}

ti->num_flush_requests = 1;
+ ti->num_discard_requests = 1;

return 0;


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 07-26-2010, 08:41 PM
Mike Snitzer
 
Default dm mpath: enable discard support

Enable discard support in the DM multipath target.

This discard support depends on a few discard-specific fixes to the
block layer's request stacking driver methods.

Discard requests are optional so don't allow a failed discard to trigger
path failures. If there is a real problem with a given path the
barriers associated with the discard (either before or after the
discard) will cause path failure. That said, unconditionally passing
discard failures up the stack is not ideal. This must be fixed once DM
has more information about the nature of the underlying storage failure.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
---
drivers/md/dm-mpath.c | 10 ++++++++++
1 file changed, 10 insertions(+)

Index: linux-2.6-block/drivers/md/dm-mpath.c
================================================== =================
--- linux-2.6-block.orig/drivers/md/dm-mpath.c
+++ linux-2.6-block/drivers/md/dm-mpath.c
@@ -893,6 +893,7 @@ static int multipath_ctr(struct dm_targe
}

ti->num_flush_requests = 1;
+ ti->num_discard_requests = 1;

return 0;

@@ -1272,6 +1273,15 @@ static int do_end_io(struct multipath *m
if (error == -EOPNOTSUPP)
return error;

+ if (clone->cmd_flags & REQ_DISCARD)
+ /*
+ * Pass all discard request failures up.
+ * FIXME: only fail_path if the discard failed due to a
+ * transport problem. This requires precise understanding
+ * of the underlying failure (e.g. the SCSI sense).
+ */
+ return error;
+
if (mpio->pgpath)
fail_path(mpio->pgpath);


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

Thread Tools




All times are GMT. The time now is 02:37 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org