X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Ffd-tracker%2Finode.h;h=7e95c0726efc9057f67b8457569067f0118c0770;hp=d3c0ed2bf2239ecb889e5cd186c9bd71c01e72d2;hb=640b9481e1805d314256361ed49d55dcc35d6172;hpb=f7c3ffd79ddcece895eb0de616001d549aced5fc diff --git a/src/common/fd-tracker/inode.h b/src/common/fd-tracker/inode.h index d3c0ed2bf..7e95c0726 100644 --- a/src/common/fd-tracker/inode.h +++ b/src/common/fd-tracker/inode.h @@ -1,18 +1,8 @@ /* - * Copyright (C) 2020 - Jérémie Galarneau + * Copyright (C) 2020 Jérémie Galarneau * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License, version 2 only, as - * published by the Free Software Foundation. + * SPDX-License-Identifier: GPL-2.0-only * - * This program 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 General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 51 - * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef FD_TRACKER_INODE_H @@ -24,6 +14,7 @@ struct lttng_inode; struct lttng_inode_registry; struct lttng_unlinked_file_directory; +struct lttng_directory_handle; /* * The unlinked file pool is protected by the fd-tracker's lock. @@ -51,10 +42,14 @@ struct lttng_inode *lttng_inode_registry_get_inode( void lttng_inode_registry_destroy(struct lttng_inode_registry *registry); -void lttng_inode_get_location(struct lttng_inode *inode, +void lttng_inode_borrow_location(struct lttng_inode *inode, const struct lttng_directory_handle **out_directory_handle, const char **out_path); +/* Returns a new reference to the inode's location directory handle. */ +struct lttng_directory_handle *lttng_inode_get_location_directory_handle( + struct lttng_inode *inode); + int lttng_inode_rename(struct lttng_inode *inode, struct lttng_directory_handle *old_directory_handle, const char *old_path,