diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/fs.h | 2 | ||||
-rw-r--r-- | include/linux/migrate.h | 14 | ||||
-rw-r--r-- | include/linux/migrate_mode.h | 16 |
3 files changed, 18 insertions, 14 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 0244082d42c5..4b3a41fe22bf 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/ioctl.h> | 10 | #include <linux/ioctl.h> |
11 | #include <linux/blk_types.h> | 11 | #include <linux/blk_types.h> |
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/migrate_mode.h> | ||
13 | 14 | ||
14 | /* | 15 | /* |
15 | * It's silly to have NR_OPEN bigger than NR_FILE, but you can change | 16 | * It's silly to have NR_OPEN bigger than NR_FILE, but you can change |
@@ -526,7 +527,6 @@ enum positive_aop_returns { | |||
526 | struct page; | 527 | struct page; |
527 | struct address_space; | 528 | struct address_space; |
528 | struct writeback_control; | 529 | struct writeback_control; |
529 | enum migrate_mode; | ||
530 | 530 | ||
531 | struct iov_iter { | 531 | struct iov_iter { |
532 | const struct iovec *iov; | 532 | const struct iovec *iov; |
diff --git a/include/linux/migrate.h b/include/linux/migrate.h index eaf867412f7a..05ed2828a553 100644 --- a/include/linux/migrate.h +++ b/include/linux/migrate.h | |||
@@ -3,22 +3,10 @@ | |||
3 | 3 | ||
4 | #include <linux/mm.h> | 4 | #include <linux/mm.h> |
5 | #include <linux/mempolicy.h> | 5 | #include <linux/mempolicy.h> |
6 | #include <linux/migrate_mode.h> | ||
6 | 7 | ||
7 | typedef struct page *new_page_t(struct page *, unsigned long private, int **); | 8 | typedef struct page *new_page_t(struct page *, unsigned long private, int **); |
8 | 9 | ||
9 | /* | ||
10 | * MIGRATE_ASYNC means never block | ||
11 | * MIGRATE_SYNC_LIGHT in the current implementation means to allow blocking | ||
12 | * on most operations but not ->writepage as the potential stall time | ||
13 | * is too significant | ||
14 | * MIGRATE_SYNC will block when migrating pages | ||
15 | */ | ||
16 | enum migrate_mode { | ||
17 | MIGRATE_ASYNC, | ||
18 | MIGRATE_SYNC_LIGHT, | ||
19 | MIGRATE_SYNC, | ||
20 | }; | ||
21 | |||
22 | #ifdef CONFIG_MIGRATION | 10 | #ifdef CONFIG_MIGRATION |
23 | #define PAGE_MIGRATION 1 | 11 | #define PAGE_MIGRATION 1 |
24 | 12 | ||
diff --git a/include/linux/migrate_mode.h b/include/linux/migrate_mode.h new file mode 100644 index 000000000000..ebf3d89a3919 --- /dev/null +++ b/include/linux/migrate_mode.h | |||
@@ -0,0 +1,16 @@ | |||
1 | #ifndef MIGRATE_MODE_H_INCLUDED | ||
2 | #define MIGRATE_MODE_H_INCLUDED | ||
3 | /* | ||
4 | * MIGRATE_ASYNC means never block | ||
5 | * MIGRATE_SYNC_LIGHT in the current implementation means to allow blocking | ||
6 | * on most operations but not ->writepage as the potential stall time | ||
7 | * is too significant | ||
8 | * MIGRATE_SYNC will block when migrating pages | ||
9 | */ | ||
10 | enum migrate_mode { | ||
11 | MIGRATE_ASYNC, | ||
12 | MIGRATE_SYNC_LIGHT, | ||
13 | MIGRATE_SYNC, | ||
14 | }; | ||
15 | |||
16 | #endif /* MIGRATE_MODE_H_INCLUDED */ | ||