X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lib%2Fringbuffer%2Fvfs.h;h=2061156dd1b19aba0ebab7cf01815ab4e7645f78;hb=c245d0d3253680f0f8caf751ae99d10bd74034bf;hp=b2e5b1c84810a606b4368a84673bc8dca410ccb6;hpb=c6f05468ac90af73c0077095f5e57f287197e9d8;p=lttng-modules.git diff --git a/lib/ringbuffer/vfs.h b/lib/ringbuffer/vfs.h index b2e5b1c8..2061156d 100644 --- a/lib/ringbuffer/vfs.h +++ b/lib/ringbuffer/vfs.h @@ -1,31 +1,15 @@ -#ifndef _LIB_RING_BUFFER_VFS_H -#define _LIB_RING_BUFFER_VFS_H - -/* +/* SPDX-License-Identifier: (GPL-2.0 OR LGPL-2.1) + * * lib/ringbuffer/vfs.h * * Wait-free ring buffer VFS file operations. * * Copyright (C) 2005-2012 Mathieu Desnoyers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; only - * version 2.1 of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Author: - * Mathieu Desnoyers */ +#ifndef _LIB_RING_BUFFER_VFS_H +#define _LIB_RING_BUFFER_VFS_H + #include #include @@ -123,6 +107,13 @@ ssize_t vfs_lib_ring_buffer_splice_read(struct file *in, loff_t *ppos, #define RING_BUFFER_SNAPSHOT_SAMPLE_POSITIONS _IO(0xF6, 0x0E) /* Flush the current sub-buffer, even if empty. */ #define RING_BUFFER_FLUSH_EMPTY _IO(0xF6, 0x0F) +/* + * Reset the position of what has been consumed from the metadata cache to 0 + * so it can be read again. + */ +#define RING_BUFFER_METADATA_CACHE_DUMP _IO(0xF6, 0x10) +/* Clear ring buffer content. */ +#define RING_BUFFER_CLEAR _IO(0xF6, 0x11) #ifdef CONFIG_COMPAT /* Get a snapshot of the current ring buffer producer and consumer positions */ @@ -167,6 +158,9 @@ ssize_t vfs_lib_ring_buffer_splice_read(struct file *in, loff_t *ppos, /* Flush the current sub-buffer, even if empty. */ #define RING_BUFFER_COMPAT_FLUSH_EMPTY \ RING_BUFFER_FLUSH_EMPTY +/* Clear ring buffer content. */ +#define RING_BUFFER_COMPAT_CLEAR \ + RING_BUFFER_CLEAR #endif /* CONFIG_COMPAT */ #endif /* _LIB_RING_BUFFER_VFS_H */