aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/zram/zram_ioctl.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-06 11:41:17 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-06 11:41:17 -0700
commitcc41f5cede3c63836d1c0958204630b07f5b5ee7 (patch)
treedfd94451c919b5185d8a01fd3e5a90244fb0de1c /drivers/staging/zram/zram_ioctl.h
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 (diff)
parentStaging: wlan-ng: Update prism2_set_tx_power() to use mBm (diff)
downloadlinux-dev-cc41f5cede3c63836d1c0958204630b07f5b5ee7.tar.xz
linux-dev-cc41f5cede3c63836d1c0958204630b07f5b5ee7.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (524 commits) Staging: wlan-ng: Update prism2_set_tx_power() to use mBm Staging: ti-st: update TODO Staging: wlags49_h2: use common PCI_VENDOR/DEVICE_ID name format Staging: comedi : fix brace coding style issue in wwrap.c Staging: quatech_usb2: remove unused qt2_box_flush function Staging: slicoss: Remove net_device_stats from the driver's private staging: rtl8192su: check whether requests succeeded staging: panel: fix error path staging: otus: check kmalloc() return value staging: octeon: check request_irq() return value Staging: wlan-ng: remove typedef in p80211hdr.h Staging: wlan-ng: fix checkpatch issues in headers. Staging: wlan-ng: remove typedef in p80211ioctl.h Staging: wlan-ng: fix style issues in p80211conv.h Staging: wlan-ng: fix style issues for p80211hdr.h staging: vt6656: removed NTSTATUS definition staging: vt6656: simplified tests involving both multi/broad-casts Staging: vt6655: replace BOOL with in kernel bool Staging: vt6655: replace FALSE with in kernel false Staging: vt6655: replace TRUE with in kernel true ...
Diffstat (limited to 'drivers/staging/zram/zram_ioctl.h')
-rw-r--r--drivers/staging/zram/zram_ioctl.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/drivers/staging/zram/zram_ioctl.h b/drivers/staging/zram/zram_ioctl.h
new file mode 100644
index 000000000000..5c415fa4f17b
--- /dev/null
+++ b/drivers/staging/zram/zram_ioctl.h
@@ -0,0 +1,41 @@
+/*
+ * Compressed RAM block device
+ *
+ * Copyright (C) 2008, 2009, 2010 Nitin Gupta
+ *
+ * This code is released using a dual license strategy: BSD/GPL
+ * You can choose the licence that better fits your requirements.
+ *
+ * Released under the terms of 3-clause BSD License
+ * Released under the terms of GNU General Public License Version 2.0
+ *
+ * Project home: http://compcache.googlecode.com
+ */
+
+#ifndef _ZRAM_IOCTL_H_
+#define _ZRAM_IOCTL_H_
+
+struct zram_ioctl_stats {
+ u64 disksize; /* disksize in bytes (user specifies in KB) */
+ u64 num_reads; /* failed + successful */
+ u64 num_writes; /* --do-- */
+ u64 failed_reads; /* should NEVER! happen */
+ u64 failed_writes; /* can happen when memory is too low */
+ u64 invalid_io; /* non-page-aligned I/O requests */
+ u64 notify_free; /* no. of swap slot free notifications */
+ u32 pages_zero; /* no. of zero filled pages */
+ u32 good_compress_pct; /* no. of pages with compression ratio<=50% */
+ u32 pages_expand_pct; /* no. of incompressible pages */
+ u32 pages_stored;
+ u32 pages_used;
+ u64 orig_data_size;
+ u64 compr_data_size;
+ u64 mem_used_total;
+} __attribute__ ((packed, aligned(4)));
+
+#define ZRAMIO_SET_DISKSIZE_KB _IOW('z', 0, size_t)
+#define ZRAMIO_GET_STATS _IOR('z', 1, struct zram_ioctl_stats)
+#define ZRAMIO_INIT _IO('z', 2)
+#define ZRAMIO_RESET _IO('z', 3)
+
+#endif