2016-09-08 14:18:08 +02:00
|
|
|
#ifndef _LINUX_SWAP_H
|
|
|
|
#define _LINUX_SWAP_H
|
|
|
|
|
|
|
|
#include <linux/spinlock.h>
|
2017-07-27 12:22:14 +02:00
|
|
|
#include <linux/list.h>
|
|
|
|
#include <linux/fs.h>
|
|
|
|
#include <linux/atomic.h>
|
2016-09-08 14:18:08 +02:00
|
|
|
|
|
|
|
struct notifier_block;
|
|
|
|
|
|
|
|
struct bio;
|
|
|
|
|
|
|
|
#define SWAP_FLAG_PREFER 0x8000 /* set if swap priority specified */
|
|
|
|
#define SWAP_FLAG_PRIO_MASK 0x7fff
|
|
|
|
#define SWAP_FLAG_PRIO_SHIFT 0
|
|
|
|
#define SWAP_FLAG_DISCARD 0x10000 /* enable discard for swap */
|
|
|
|
#define SWAP_FLAG_DISCARD_ONCE 0x20000 /* discard swap area at swapon-time */
|
|
|
|
#define SWAP_FLAG_DISCARD_PAGES 0x40000 /* discard page-clusters after use */
|
|
|
|
|
|
|
|
#define SWAP_FLAGS_VALID (SWAP_FLAG_PRIO_MASK | SWAP_FLAG_PREFER | \
|
|
|
|
SWAP_FLAG_DISCARD | SWAP_FLAG_DISCARD_ONCE | \
|
|
|
|
SWAP_FLAG_DISCARD_PAGES)
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* _LINUX_SWAP_H */
|