Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 169623
Collapse All | Expand All

(-)evms-2.5.5/plugins/swap/swapfs.c (-2 / +1 lines)
Lines 27-33 Link Here
27
#include <plugin.h>
27
#include <plugin.h>
28
#include <fcntl.h>
28
#include <fcntl.h>
29
#include <sys/wait.h>
29
#include <sys/wait.h>
30
#include <asm/page.h> /* to get PAGE_SIZE */
31
#include <sys/swap.h>
30
#include <sys/swap.h>
32
31
33
#include "swapfs.h"
32
#include "swapfs.h"
Lines 341-347 static int swap_get_fs_limits(logical_vo Link Here
341
340
342
	*max_volume_size = (sector_count_t)-1;	/* No limit. */
341
	*max_volume_size = (sector_count_t)-1;	/* No limit. */
343
	*max_object_size = (sector_count_t)-1;	/* No limit. */
342
	*max_object_size = (sector_count_t)-1;	/* No limit. */
344
	*min_size = (sector_count_t)(PAGE_SIZE * 10);	/* 10 page minimum. */
343
	*min_size = (sector_count_t)(sysconf(_SC_PAGESIZE) * 10);	/* 10 page minimum. */
345
344
346
	LOG_EXTRA("Volume: %s, min: %"PRIu64", max: %"PRIu64"\n",
345
	LOG_EXTRA("Volume: %s, min: %"PRIu64", max: %"PRIu64"\n",
347
		  volume->name, *min_size, *max_volume_size);
346
		  volume->name, *min_size, *max_volume_size);
(-)evms-2.5.5/plugins/swap/swapfs.h (-2 / +2 lines)
Lines 47-54 extern engine_functions_t *EngFncs; Link Here
47
#define PUT 1
47
#define PUT 1
48
#define SWAPFS_MAGIC_STRING	"SWAP_SPACE"
48
#define SWAPFS_MAGIC_STRING	"SWAP_SPACE"
49
#define SWAPFS_MAGIC_STRING2	"SWAPSPACE2"
49
#define SWAPFS_MAGIC_STRING2	"SWAPSPACE2"
50
#define SWAPFS_MIN_SIZE		(PAGE_SIZE / EVMS_VSECTOR_SIZE * 10)
50
#define SWAPFS_MIN_SIZE		(sysconf(_SC_PAGESIZE) / EVMS_VSECTOR_SIZE * 10)
51
#define SWAP_MAGIC_OFFSET_IN_BYTES	(PAGE_SIZE - 10) /* last 10 bytes of first page */
51
#define SWAP_MAGIC_OFFSET_IN_BYTES	(sysconf(_SC_PAGESIZE) - 10) /* last 10 bytes of first page */
52
52
53
#define EVMS_Task_swapon	EVMS_Task_Plugin_Function + 1
53
#define EVMS_Task_swapon	EVMS_Task_Plugin_Function + 1
54
#define EVMS_Task_swapoff	EVMS_Task_Plugin_Function + 2
54
#define EVMS_Task_swapoff	EVMS_Task_Plugin_Function + 2
(-)evms-2.5.5/plugins/xfs/fsimxfs.h (-2 / +2 lines)
Lines 19-25 Link Here
19
 */
19
 */
20
20
21
#include <uuid/uuid.h>
21
#include <uuid/uuid.h>
22
#include <asm/page.h>
22
#include <unistd.h>
23
23
24
extern plugin_record_t xfs_plugin_record;
24
extern plugin_record_t xfs_plugin_record;
25
extern plugin_record_t * my_plugin_record;
25
extern plugin_record_t * my_plugin_record;
Lines 165-171 typedef struct xfs_volume { Link Here
165
 * superblock.  This is not the same as the superblock structure, since all of
165
 * superblock.  This is not the same as the superblock structure, since all of
166
 * this space is not currently being used.
166
 * this space is not currently being used.
167
 */
167
 */
168
#define SIZE_OF_SUPER		PAGE_SIZE
168
#define SIZE_OF_SUPER		sysconf(_SC_PAGESIZE)
169
169
170
/* Fixed byte offset of primary superblock */
170
/* Fixed byte offset of primary superblock */
171
#define XFS_SUPER1_OFF		0x00
171
#define XFS_SUPER1_OFF		0x00

Return to bug 169623