lkml.org 
[lkml]   [2015]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCHv2 2/3] zbud: add compaction callbacks
Add no-op compaction callbacks to zbud.

Signed-off-by: Vitaly Wool <vitalywool@gmail.com>
---
mm/zbud.c | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/mm/zbud.c b/mm/zbud.c
index fa48bcdf..d67c0aa 100644
--- a/mm/zbud.c
+++ b/mm/zbud.c
@@ -195,6 +195,16 @@ static void zbud_zpool_unmap(void *pool, unsigned long handle)
zbud_unmap(pool, handle);
}

+static unsigned long zbud_zpool_compact(void *pool)
+{
+ return 0;
+}
+
+static unsigned long zbud_zpool_get_compacted(void *pool)
+{
+ return 0;
+}
+
static u64 zbud_zpool_total_size(void *pool)
{
return zbud_get_pool_size(pool) * PAGE_SIZE;
@@ -210,6 +220,8 @@ static struct zpool_driver zbud_zpool_driver = {
.shrink = zbud_zpool_shrink,
.map = zbud_zpool_map,
.unmap = zbud_zpool_unmap,
+ .compact = zbud_zpool_compact,
+ .get_num_compacted = zbud_zpool_get_compacted,
.total_size = zbud_zpool_total_size,
};

--
1.9.1

\
 
 \ /
  Last update: 2015-09-26 10:41    [W:0.054 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site