]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/linux/mm.h
Merge branch 'for-4.2/writeback' of git://git.kernel.dk/linux-block
[karo-tx-linux.git] / include / linux / mm.h
index 4024543b4203eb86d29ef8b162289efd1a775f7a..99959a34f4f15e6d66b8a6681b256134634164ee 100644 (file)
@@ -500,7 +500,7 @@ static inline int page_count(struct page *page)
 
 static inline bool __compound_tail_refcounted(struct page *page)
 {
-       return !PageSlab(page) && !PageHeadHuge(page);
+       return PageAnon(page) && !PageSlab(page) && !PageHeadHuge(page);
 }
 
 /*
@@ -2150,12 +2150,47 @@ enum mf_flags {
 extern int memory_failure(unsigned long pfn, int trapno, int flags);
 extern void memory_failure_queue(unsigned long pfn, int trapno, int flags);
 extern int unpoison_memory(unsigned long pfn);
+extern int get_hwpoison_page(struct page *page);
 extern int sysctl_memory_failure_early_kill;
 extern int sysctl_memory_failure_recovery;
 extern void shake_page(struct page *p, int access);
 extern atomic_long_t num_poisoned_pages;
 extern int soft_offline_page(struct page *page, int flags);
 
+
+/*
+ * Error handlers for various types of pages.
+ */
+enum mf_result {
+       MF_IGNORED,     /* Error: cannot be handled */
+       MF_FAILED,      /* Error: handling failed */
+       MF_DELAYED,     /* Will be handled later */
+       MF_RECOVERED,   /* Successfully recovered */
+};
+
+enum mf_action_page_type {
+       MF_MSG_KERNEL,
+       MF_MSG_KERNEL_HIGH_ORDER,
+       MF_MSG_SLAB,
+       MF_MSG_DIFFERENT_COMPOUND,
+       MF_MSG_POISONED_HUGE,
+       MF_MSG_HUGE,
+       MF_MSG_FREE_HUGE,
+       MF_MSG_UNMAP_FAILED,
+       MF_MSG_DIRTY_SWAPCACHE,
+       MF_MSG_CLEAN_SWAPCACHE,
+       MF_MSG_DIRTY_MLOCKED_LRU,
+       MF_MSG_CLEAN_MLOCKED_LRU,
+       MF_MSG_DIRTY_UNEVICTABLE_LRU,
+       MF_MSG_CLEAN_UNEVICTABLE_LRU,
+       MF_MSG_DIRTY_LRU,
+       MF_MSG_CLEAN_LRU,
+       MF_MSG_TRUNCATED_LRU,
+       MF_MSG_BUDDY,
+       MF_MSG_BUDDY_2ND,
+       MF_MSG_UNKNOWN,
+};
+
 #if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_HUGETLBFS)
 extern void clear_huge_page(struct page *page,
                            unsigned long addr,