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:23 PM
Mike Snitzer
 
Default dm: introduce num_discard_requests in dm_target structure

A target with num_discard_requests > 0 supports discard requests.
The configured number of discard requests will be submitted to the
target.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
---
drivers/md/dm-linear.c | 1 +
include/linux/device-mapper.h | 6 ++++++
2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c
index 7071f17..8e925fa 100644
--- a/drivers/md/dm-linear.c
+++ b/drivers/md/dm-linear.c
@@ -53,6 +53,7 @@ static int linear_ctr(struct dm_target *ti, unsigned int argc, char **argv)
}

ti->num_flush_requests = 1;
+ ti->num_discard_requests = 1;
ti->private = lc;
return 0;

diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index 87beab7..0fe597d 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -181,6 +181,12 @@ struct dm_target {
*/
unsigned num_flush_requests;

+ /*
+ * The number of discard requests that will be submitted to the
+ * target. map_info->request_nr is used just like num_flush_requests.
+ */
+ unsigned num_discard_requests;
+
/* target specific data */
void *private;

--
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: introduce num_discard_requests in dm_target structure

A target with num_discard_requests > 0 supports discard requests.
The configured number of discard requests will be submitted to the
target.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
---
drivers/md/dm-linear.c | 1 +
include/linux/device-mapper.h | 6 ++++++
2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c
index 7071f17..8e925fa 100644
--- a/drivers/md/dm-linear.c
+++ b/drivers/md/dm-linear.c
@@ -53,6 +53,7 @@ static int linear_ctr(struct dm_target *ti, unsigned int argc, char **argv)
}

ti->num_flush_requests = 1;
+ ti->num_discard_requests = 1;
ti->private = lc;
return 0;

diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index 87beab7..0fe597d 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -181,6 +181,12 @@ struct dm_target {
*/
unsigned num_flush_requests;

+ /*
+ * The number of discard requests that will be submitted to the
+ * target. map_info->request_nr is used just like num_flush_requests.
+ */
+ unsigned num_discard_requests;
+
/* target specific data */
void *private;

--
1.6.6.1

--
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 01:19 AM.

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