From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752016AbbIZIHx (ORCPT ); Sat, 26 Sep 2015 04:07:53 -0400 Received: from mail-la0-f47.google.com ([209.85.215.47]:33244 "EHLO mail-la0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751564AbbIZIHt (ORCPT ); Sat, 26 Sep 2015 04:07:49 -0400 Date: Sat, 26 Sep 2015 10:07:38 +0200 From: Vitaly Wool To: ddstreet@ieee.org, akpm@linux-foundation.org, Seth Jennings Cc: Minchan Kim , Sergey Senozhatsky , linux-kernel , Linux-MM Subject: [PATCHv2 2/3] zbud: add compaction callbacks Message-Id: <20150926100738.9dc61efc39d39533b02b8f5a@gmail.com> In-Reply-To: <20150926100401.96a36c7cd3c913b063887466@gmail.com> References: <20150926100401.96a36c7cd3c913b063887466@gmail.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add no-op compaction callbacks to zbud. Signed-off-by: Vitaly Wool --- 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