All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ram Pai <linuxram@us.ibm.com>
To: LKML <linux-kernel@vger.kernel.org>,
	linux-raid@vger.kernel.org, dm-devel@redhat.com,
	linux-doc@vger.kernel.org
Cc: shli@kernel.org, snitzer@redhat.com, agk@redhat.com, corbet@lwn.net
Subject: [RFC PATCH 05/16] DM: allocation/free helper routines.
Date: Mon, 15 Aug 2016 10:36:42 -0700	[thread overview]
Message-ID: <1471282613-31006-6-git-send-email-linuxram@us.ibm.com> (raw)
In-Reply-To: <1471282613-31006-1-git-send-email-linuxram@us.ibm.com>

Helper functions to allocate/reallocate and free memory.

Signed-off-by: Ram Pai <linuxram@us.ibm.com>
---
 drivers/md/dm-inplace-compress.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/drivers/md/dm-inplace-compress.c b/drivers/md/dm-inplace-compress.c
index bf18028..c11567c 100644
--- a/drivers/md/dm-inplace-compress.c
+++ b/drivers/md/dm-inplace-compress.c
@@ -774,6 +774,23 @@ static void dm_icomp_get_req(struct dm_icomp_req *req)
 	atomic_inc(&req->io_pending);
 }
 
+static void *dm_icomp_kmalloc(size_t size, gfp_t flags)
+{
+	return  kmalloc(size, flags);
+}
+
+static void *dm_icomp_krealloc(void *addr, size_t size,
+		 size_t orig_size, gfp_t flags)
+{
+	return krealloc(addr, size, flags);
+}
+
+static void dm_icomp_kfree(void *addr, unsigned int size)
+{
+	kfree(addr);
+}
+
+
 static void dm_icomp_free_io_range(struct dm_icomp_io_range *io)
 {
 	kfree(io->decomp_data);
-- 
1.7.1

WARNING: multiple messages have this Message-ID (diff)
From: Ram Pai <linuxram@us.ibm.com>
To: LKML <linux-kernel@vger.kernel.org>,
	linux-raid@vger.kernel.org, dm-devel@redhat.com,
	linux-doc@vger.kernel.org
Cc: shli@kernel.org, agk@redhat.com, snitzer@redhat.com,
	corbet@lwn.net, Ram Pai <linuxram@us.ibm.com>
Subject: [RFC PATCH 05/16] DM: allocation/free helper routines.
Date: Mon, 15 Aug 2016 10:36:42 -0700	[thread overview]
Message-ID: <1471282613-31006-6-git-send-email-linuxram@us.ibm.com> (raw)
In-Reply-To: <1471282613-31006-1-git-send-email-linuxram@us.ibm.com>

Helper functions to allocate/reallocate and free memory.

Signed-off-by: Ram Pai <linuxram@us.ibm.com>
---
 drivers/md/dm-inplace-compress.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/drivers/md/dm-inplace-compress.c b/drivers/md/dm-inplace-compress.c
index bf18028..c11567c 100644
--- a/drivers/md/dm-inplace-compress.c
+++ b/drivers/md/dm-inplace-compress.c
@@ -774,6 +774,23 @@ static void dm_icomp_get_req(struct dm_icomp_req *req)
 	atomic_inc(&req->io_pending);
 }
 
+static void *dm_icomp_kmalloc(size_t size, gfp_t flags)
+{
+	return  kmalloc(size, flags);
+}
+
+static void *dm_icomp_krealloc(void *addr, size_t size,
+		 size_t orig_size, gfp_t flags)
+{
+	return krealloc(addr, size, flags);
+}
+
+static void dm_icomp_kfree(void *addr, unsigned int size)
+{
+	kfree(addr);
+}
+
+
 static void dm_icomp_free_io_range(struct dm_icomp_io_range *io)
 {
 	kfree(io->decomp_data);
-- 
1.7.1

  parent reply	other threads:[~2016-08-15 17:36 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-15 17:36 [RFC PATCH 00/16] dm-inplace-compression block device Ram Pai
2016-08-15 17:36 ` [RFC PATCH 01/16] DM: dm-inplace-compress: an inplace compressed DM target Ram Pai
2016-08-15 17:36   ` Ram Pai
2016-08-15 17:36 ` [RFC PATCH 02/16] DM: Ability to choose the compressor Ram Pai
2016-08-15 17:36 ` [RFC PATCH 03/16] DM: Error if enough space is not available Ram Pai
2016-08-15 17:36 ` [RFC PATCH 04/16] DM: Ensure that the read request is within the device range Ram Pai
2016-08-15 17:36   ` Ram Pai
2016-08-15 17:36 ` Ram Pai [this message]
2016-08-15 17:36   ` [RFC PATCH 05/16] DM: allocation/free helper routines Ram Pai
2016-08-15 17:36 ` [RFC PATCH 06/16] DM: separate out compression and decompression routines Ram Pai
2016-08-15 17:36 ` [RFC PATCH 07/16] DM: Optimize memory allocated to hold compressed buffer Ram Pai
2016-08-15 17:36   ` Ram Pai
2016-08-15 17:36 ` [RFC PATCH 08/16] DM: Tag a magicmarker at the end of each compressed segment Ram Pai
2016-08-15 17:36   ` Ram Pai
2016-08-15 17:36 ` [RFC PATCH 09/16] DM: Delay allocation of decompression buffer during read Ram Pai
2016-08-15 17:36 ` [RFC PATCH 10/16] DM: Try to use the bio buffer for decompression instead of allocating one Ram Pai
2016-08-15 17:36   ` Ram Pai
2016-08-15 17:36 ` [RFC PATCH 11/16] DM: Try to avoid temporary buffer allocation to hold compressed data Ram Pai
2016-08-15 17:36 ` [RFC PATCH 12/16] DM: release unneeded buffer as soon as possible Ram Pai
2016-08-15 17:36 ` [RFC PATCH 13/16] DM: macros to set and get the state of the request Ram Pai
2016-08-15 17:36 ` [RFC PATCH 14/16] DM: Wasted bio copy Ram Pai
2016-08-15 17:36 ` [RFC PATCH 15/16] DM: Add sysfs parameters to track total memory saved and allocated Ram Pai
2016-08-15 17:36 ` [RFC PATCH 16/16] DM: add documentation for dm-inplace-compress Ram Pai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1471282613-31006-6-git-send-email-linuxram@us.ibm.com \
    --to=linuxram@us.ibm.com \
    --cc=agk@redhat.com \
    --cc=corbet@lwn.net \
    --cc=dm-devel@redhat.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=shli@kernel.org \
    --cc=snitzer@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.