From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759721AbaGCVxp (ORCPT ); Thu, 3 Jul 2014 17:53:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15031 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752852AbaGCVxk (ORCPT ); Thu, 3 Jul 2014 17:53:40 -0400 From: Naoya Horiguchi To: Andrew Morton Cc: Konstantin Khlebnikov , Wu Fengguang , Arnaldo Carvalho de Melo , Borislav Petkov , "Kirill A. Shutemov" , Johannes Weiner , Rusty Russell , David Miller , Andres Freund , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Dave Hansen , Christoph Hellwig , Michael Kerrisk , Linux API , Naoya Horiguchi Subject: [PATCH v2 1/4] define PAGECACHE_TAG_* as enumeration under include/uapi Date: Thu, 3 Jul 2014 17:52:12 -0400 Message-Id: <1404424335-30128-2-git-send-email-n-horiguchi@ah.jp.nec.com> In-Reply-To: <1404424335-30128-1-git-send-email-n-horiguchi@ah.jp.nec.com> References: <1404424335-30128-1-git-send-email-n-horiguchi@ah.jp.nec.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We need the pagecache tags to be exported to userspace later in this series for fincore(2), so this patch moves the definition to the new include file for preparation. We also use the number of pagecache tags, so this patch also adds it. Signed-off-by: Naoya Horiguchi --- include/linux/fs.h | 9 +-------- include/uapi/linux/pagecache.h | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 include/uapi/linux/pagecache.h diff --git v3.16-rc3.orig/include/linux/fs.h v3.16-rc3/include/linux/fs.h index e11d60cc867b..ae4a953bd5f3 100644 --- v3.16-rc3.orig/include/linux/fs.h +++ v3.16-rc3/include/linux/fs.h @@ -32,6 +32,7 @@ #include #include +#include struct export_operations; struct hd_geometry; @@ -446,14 +447,6 @@ struct block_device { struct mutex bd_fsfreeze_mutex; }; -/* - * Radix-tree tags, for tagging dirty and writeback pages within the pagecache - * radix trees - */ -#define PAGECACHE_TAG_DIRTY 0 -#define PAGECACHE_TAG_WRITEBACK 1 -#define PAGECACHE_TAG_TOWRITE 2 - int mapping_tagged(struct address_space *mapping, int tag); /* diff --git v3.16-rc3.orig/include/uapi/linux/pagecache.h v3.16-rc3/include/uapi/linux/pagecache.h new file mode 100644 index 000000000000..15e879f7395f --- /dev/null +++ v3.16-rc3/include/uapi/linux/pagecache.h @@ -0,0 +1,17 @@ +#ifndef _UAPI_LINUX_PAGECACHE_H +#define _UAPI_LINUX_PAGECACHE_H + +/* + * Radix-tree tags, for tagging dirty and writeback pages within the pagecache + * radix trees. + */ +enum { + PAGECACHE_TAG_DIRTY, + PAGECACHE_TAG_WRITEBACK, + PAGECACHE_TAG_TOWRITE, + __NR_PAGECACHE_TAGS, +}; + +#define PAGECACHE_TAG_MASK ((1UL << __NR_PAGECACHE_TAGS) - 1) + +#endif /* _UAPI_LINUX_PAGECACHE_H */ -- 1.9.3 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Naoya Horiguchi Subject: [PATCH v2 1/4] define PAGECACHE_TAG_* as enumeration under include/uapi Date: Thu, 3 Jul 2014 17:52:12 -0400 Message-ID: <1404424335-30128-2-git-send-email-n-horiguchi@ah.jp.nec.com> References: <1404424335-30128-1-git-send-email-n-horiguchi@ah.jp.nec.com> Return-path: In-Reply-To: <1404424335-30128-1-git-send-email-n-horiguchi@ah.jp.nec.com> Sender: owner-linux-mm@kvack.org To: Andrew Morton Cc: Konstantin Khlebnikov , Wu Fengguang , Arnaldo Carvalho de Melo , Borislav Petkov , "Kirill A. Shutemov" , Johannes Weiner , Rusty Russell , David Miller , Andres Freund , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Dave Hansen , Christoph Hellwig , Michael Kerrisk , Linux API , Naoya Horiguchi List-Id: linux-api@vger.kernel.org We need the pagecache tags to be exported to userspace later in this series for fincore(2), so this patch moves the definition to the new include file for preparation. We also use the number of pagecache tags, so this patch also adds it. Signed-off-by: Naoya Horiguchi --- include/linux/fs.h | 9 +-------- include/uapi/linux/pagecache.h | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 include/uapi/linux/pagecache.h diff --git v3.16-rc3.orig/include/linux/fs.h v3.16-rc3/include/linux/fs.h index e11d60cc867b..ae4a953bd5f3 100644 --- v3.16-rc3.orig/include/linux/fs.h +++ v3.16-rc3/include/linux/fs.h @@ -32,6 +32,7 @@ #include #include +#include struct export_operations; struct hd_geometry; @@ -446,14 +447,6 @@ struct block_device { struct mutex bd_fsfreeze_mutex; }; -/* - * Radix-tree tags, for tagging dirty and writeback pages within the pagecache - * radix trees - */ -#define PAGECACHE_TAG_DIRTY 0 -#define PAGECACHE_TAG_WRITEBACK 1 -#define PAGECACHE_TAG_TOWRITE 2 - int mapping_tagged(struct address_space *mapping, int tag); /* diff --git v3.16-rc3.orig/include/uapi/linux/pagecache.h v3.16-rc3/include/uapi/linux/pagecache.h new file mode 100644 index 000000000000..15e879f7395f --- /dev/null +++ v3.16-rc3/include/uapi/linux/pagecache.h @@ -0,0 +1,17 @@ +#ifndef _UAPI_LINUX_PAGECACHE_H +#define _UAPI_LINUX_PAGECACHE_H + +/* + * Radix-tree tags, for tagging dirty and writeback pages within the pagecache + * radix trees. + */ +enum { + PAGECACHE_TAG_DIRTY, + PAGECACHE_TAG_WRITEBACK, + PAGECACHE_TAG_TOWRITE, + __NR_PAGECACHE_TAGS, +}; + +#define PAGECACHE_TAG_MASK ((1UL << __NR_PAGECACHE_TAGS) - 1) + +#endif /* _UAPI_LINUX_PAGECACHE_H */ -- 1.9.3 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org