Path: csiph.com!goblin3!goblin.stu.neva.ru!news-1.dfn.de!news.dfn.de!storethat.news.telefonica.de!telefonica.de!news.panservice.it!bofh.it!news.nic.it!robomod From: tip-bot for Arnaldo Carvalho de Melo Newsgroups: linux.kernel Subject: [tip:perf/core] tools: Update include/uapi/linux/fcntl.h copy from the kernel Date: Thu, 20 Jul 2017 10:50:03 +0200 Message-ID: Reply-To: adrian.hunter@intel.com, jolsa@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, axboe@kernel.dk, mingo@kernel.org, wangnan0@huawei.com, hpa@zytor.com, dsahern@gmail.com, acme@redhat.com, martin.petersen@oracle.com, namhyung@kernel.org Git-Commit-ID: ca3cf049d2430ac83eff5c32af7b86bb2d1285bf X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: robomod@news.nic.it List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Approved: robomod@news.nic.it Lines: 68 Organization: linux.* mail to news gateway X-Original-Cc: jolsa@kernel.org, adrian.hunter@intel.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, axboe@kernel.dk, mingo@kernel.org, wangnan0@huawei.com, hpa@zytor.com, dsahern@gmail.com, acme@redhat.com, martin.petersen@oracle.com, namhyung@kernel.org X-Original-Date: Thu, 20 Jul 2017 01:38:04 -0700 X-Original-Message-ID: X-Original-Sender: linux-kernel-owner@vger.kernel.org Xref: csiph.com linux.kernel:1692590 Commit-ID: ca3cf049d2430ac83eff5c32af7b86bb2d1285bf Gitweb: http://git.kernel.org/tip/ca3cf049d2430ac83eff5c32af7b86bb2d1285bf Author: Arnaldo Carvalho de Melo AuthorDate: Thu, 13 Jul 2017 17:15:24 -0300 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 18 Jul 2017 23:13:50 -0300 tools: Update include/uapi/linux/fcntl.h copy from the kernel To get the changes in the commit c75b1d9421f8 ("fs: add fcntl() interface for setting/getting write life time hints"). Silencing this perf build warning: Warning: include/uapi/linux/fcntl.h differs from kernel We already beautify the fcntl cmd argument, so an upcoming cset will update the 'cmd' strarray to cover these new commands. The hints are in the 3rd arg, a pointer, so not yet supported in 'perf trace', for that we need to copy it somehow, probably using eBPF, a new attempt at doing that is planned. Cc: Adrian Hunter Cc: David Ahern Cc: Jens Axboe Cc: Jiri Olsa Cc: Martin K. Petersen Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-al471wzs3x48alql0tm3mnfa@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/include/uapi/linux/fcntl.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tools/include/uapi/linux/fcntl.h b/tools/include/uapi/linux/fcntl.h index 813afd6..ec69d55 100644 --- a/tools/include/uapi/linux/fcntl.h +++ b/tools/include/uapi/linux/fcntl.h @@ -43,6 +43,27 @@ /* (1U << 31) is reserved for signed error codes */ /* + * Set/Get write life time hints. {GET,SET}_RW_HINT operate on the + * underlying inode, while {GET,SET}_FILE_RW_HINT operate only on + * the specific file. + */ +#define F_GET_RW_HINT (F_LINUX_SPECIFIC_BASE + 11) +#define F_SET_RW_HINT (F_LINUX_SPECIFIC_BASE + 12) +#define F_GET_FILE_RW_HINT (F_LINUX_SPECIFIC_BASE + 13) +#define F_SET_FILE_RW_HINT (F_LINUX_SPECIFIC_BASE + 14) + +/* + * Valid hint values for F_{GET,SET}_RW_HINT. 0 is "not set", or can be + * used to clear any hints previously set. + */ +#define RWF_WRITE_LIFE_NOT_SET 0 +#define RWH_WRITE_LIFE_NONE 1 +#define RWH_WRITE_LIFE_SHORT 2 +#define RWH_WRITE_LIFE_MEDIUM 3 +#define RWH_WRITE_LIFE_LONG 4 +#define RWH_WRITE_LIFE_EXTREME 5 + +/* * Types of directory notifications that may be requested. */ #define DN_ACCESS 0x00000001 /* File accessed */