Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1570461

[PATCH v3] DM: dm-inplace-compress: inplace compressed DM target

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Ram Pai <linuxram@us.ibm.com>
Newsgroups linux.kernel
Subject [PATCH v3] DM: dm-inplace-compress: inplace compressed DM target
Date Tue, 31 Jan 2017 08:50:02 +0100
Message-ID <t5Bmp-6om-3@gated-at.bofh.it> (permalink)
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=Sguk7GuzibVpTVpBEyoDJLnRhllW+9AiNYI1syomYb8=; b=IQ834rJeYUr4QA+4h28qCq5qLcyFr+C7jgE9uS0yJ8jTXhRf5uyeHXHWVaTvvQ42la BOw6c9wZG/jFabCmkB74trtC/tZpIeHpx7+mi6mvRERACXtd9YmQ6X7O18y/AN3sw3ol YvudZYY5Pjm4wIkKwMi8GFmCDmLDY1lhTvPQa2k7oBgwznIG+/Jt1xMkCndqoEewib5O nuM9f14TMQTe8YKFG1F0v/G1c18keV+gcbbSWBEhUkT2joBURWxY4K8wVLIFReOVDOSy myaou1qOAPcAhLYJOG3u06EklXX6NcS97icG22NLTC0I7Yjg20v4O2Q4c8utjKc9jHMi japA==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=Sguk7GuzibVpTVpBEyoDJLnRhllW+9AiNYI1syomYb8=; b=t7o3LtKly77IfA0rWJkoBLk3tMuqRbtfE7oHi4WC6FQpysLwFxXF6JIC6siGvGKVcT K53qDz6Hp/2nRSVEm/fXpdN6NPcE25OpS+wtLLC1uHK+3+yYd3EojKNAF7VwG4Og09ef GQiZyFZfbvHCCgSoj7ffvKzH1P4gsB/hg77d6Uy5u0Bg7PgaZXHgY1DsPGEFIQHUQlq5 YluH9OB0tdK32l102rdGIaV5AotqE+f4mMdnTX+BszaZfQn4z4FtgTY+L5I5pvtAsu2H JHjntnsrRhxbaQ0jdxOdDRdCL3iPMFW0x7qGcumPZEj8DkYEJyJN6zM1MqE2+PMNTnOV Q8TA==
X-Gm-Message-State AIkVDXK6SpkEaJmi6MY+jbnuBfIKnBoGoAyxZmC/dFR9T6H4IdCqR3axP2k0HOjn5+4W4Q==
X-Received by 10.55.124.7 with SMTP id x7mr25609883qkc.149.1485848551638; Mon, 30 Jan 2017 23:42:31 -0800 (PST)
X-Mailer git-send-email 1.7.1
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 54
Organization linux.* mail to news gateway
X-Original-Cc agk@redhat.com, snitzer@redhat.com, corbet@lwn.net, shli@kernel.org, hbabu@us.ibm.com
X-Original-Date Mon, 30 Jan 2017 23:42:12 -0800
X-Original-Message-ID <1485848533-27778-1-git-send-email-linuxram@us.ibm.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1570461

Show key headers only | View raw


This  patch   provides   a   generic     device-mapper   compression  device.
Originally written by Shaohua Li.
https://www.redhat.com/archives/dm-devel/2013-December/msg00143.html

I have optimized and hardened the code.

Testing:
-------
This compression block device  is  tested in the following scenarios
a) backing a ext4 filesystem 
b) backing swap
Its stress tested on PPC64 and x86 system.

Version v1:
	Comments from Alasdair have been incorporated.
	https://www.redhat.com/archives/dm-devel/2013-December/msg00144.html

Version v2:
	All patches are merged into a single patch.
	Major code re-arrangement.
	Data and metablocks allocated based on the length of the device
	map rather than the size of the backing device.
        Size   of   each entry   in  the bitmap array is explicitly set
	 to 32bits.
	Attempt  to  reuse  the  provided  bio  buffer  space   instead
	 of allocating a new one.

Version v3:
	Fixed  sector  alignment  bugs  exposed  while   testing on x86.
	Explicitly set the maximum request size  to 128K.  Without which
	range  locking  failed,  causing  I/Os  to  stamp   each  other.
	Fixed an occasional data corruption  caused by wrong size of the
	compression buffer.
	Added  a   parameter   while  creation  of  the   block  device, 
	to  not  sleep   during  memory  allocations. This can be useful
       	if the device is used as a swap device.

Your comments to improve the code is very much appreciated.

Ram Pai (1):
  From: Shaohua Li <shli@kernel.org>

 .../device-mapper/dm-inplace-compress.txt          |  155 ++
 drivers/md/Kconfig                                 |    6 +
 drivers/md/Makefile                                |    2 +
 drivers/md/dm-inplace-compress.c                   | 2214 ++++++++++++++++++++
 drivers/md/dm-inplace-compress.h                   |  187 ++
 5 files changed, 2564 insertions(+)
 create mode 100644 Documentation/device-mapper/dm-inplace-compress.txt
 create mode 100644 drivers/md/dm-inplace-compress.c
 create mode 100644 drivers/md/dm-inplace-compress.h

-- 
1.8.3.1

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH v3] DM: dm-inplace-compress: inplace compressed DM target Ram Pai <linuxram@us.ibm.com> - 2017-01-31 08:50 +0100

csiph-web