|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 27/29] tools/xenstored: add helpers for filename handling
Hi Juergen, On 14/11/2023 09:26, Juergen Gross wrote: On 14.11.23 10:10, Julien Grall wrote:Hi Juergen, On 14/11/2023 06:45, Juergen Gross wrote:On 13.11.23 23:25, Julien Grall wrote:Hi Juergen, On 10/11/2023 16:08, Juergen Gross wrote:Add some helpers for handling filenames which might need different implementations between stubdom and daemon environments: - expansion of relative filenames (those are not really defined today, just expand them to be relative to /var/lib/xen/xenstore)- expansion of xenstore_daemon_rundir() (used e.g. for saving the statefile in case of live update - needs to be unchanged in the daemon case, but should result in /var/lib/xen/xenstore for stubdom) Signed-off-by: Juergen Gross <jgross@xxxxxxxx> Reviewed-by: Jason Andryuk <jandryuk@xxxxxxxxx> --- tools/xenstored/core.c | 9 ++++++++- tools/xenstored/core.h | 3 +++ tools/xenstored/lu_daemon.c | 4 ++-- tools/xenstored/minios.c | 5 +++++ tools/xenstored/posix.c | 5 +++++ 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/tools/xenstored/core.c b/tools/xenstored/core.c index 4a9d874f17..77befd24c9 100644 --- a/tools/xenstored/core.c +++ b/tools/xenstored/core.c@@ -158,6 +158,13 @@ void trace_destroy(const void *data, const char *type) Would you be able to explain why we can only give access to a single directory? Is this because of the 9pfs protocol? I /could/ give it access to "/", but do we really want that? I don't think we want to give access to "/". We can't get rid of the /var/run/xen access in xenstored, as it is used forlive update, so the old and the new xenstored need to agree on the location ofthe state file. Well, Xenstored Live-Update is technically a tech preview feature. So we *could* break it and allow the state file to be specified on the command line. Anyway, I am ok if you want them to have the live-update state in a separate however... And we can't drop the possibility of specifying absolute pathsfor e.g. trace files, as those might be in use by users already.Also, regarding the background of my question. You are introducing a function call absolute_filename(). From the name, there is nothing indicating that this should only be used for trace files. If this is only indented for tracefile, then I think this should be renamed to something like absolute_tracefile(...).After the last patch of this series "xenstore-control memreport <file>" will useit, too. ... this doesn't change my point here. The function name doesn't *tell* me why it can't be used for live-update files. If this can't be clarified in the name, then it should be clarified in a comment. Maybe one top of the Live-Update code. Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |