Page MenuHomeFreeBSD

D46296.id149167.diff
No OneTemporary

D46296.id149167.diff

diff --git a/sys/fs/fuse/virtiofs_vfsops.c b/sys/fs/fuse/virtiofs_vfsops.c
--- a/sys/fs/fuse/virtiofs_vfsops.c
+++ b/sys/fs/fuse/virtiofs_vfsops.c
@@ -2,7 +2,6 @@
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2024, Emil Tsalapatis <emil@etsalapatis.com>
- * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -371,8 +370,10 @@
}
/* If the operation was successful, ensure the size is valid. */
- if (ohead->error == 0 && ohead->unique != 0)
+ if (ohead->error == 0 && ohead->unique != 0) {
err = fuse_body_audit(ftick, len - sizeof(*ohead));
+ fiov_adjust(fticket_resp(ftick), len - sizeof(*ohead));
+ }
done:
/*
@@ -396,7 +397,7 @@
struct fuse_data *data;
vtfs_instance vtfs;
uint32_t max_read;
- char *tag;
+ char *from;
int error;
opts = mp->mnt_optnew;
@@ -415,12 +416,12 @@
if (mp->mnt_flag & MNT_UPDATE)
return (EOPNOTSUPP);
- /* `from' contains the virtio tag; REQUIRED */
- tag = vfs_getopts(opts, "tag", &error);
- if (!tag)
+ /* `from' contains the virtio from; REQUIRED */
+ from = vfs_getopts(opts, "from", &error);
+ if (!from)
return (error);
- error = vtfs_find(tag, &vtfs);
+ error = vtfs_find(from, &vtfs);
if (error != 0)
return (error);
@@ -469,9 +470,9 @@
MNT_IUNLOCK(mp);
mp->mnt_stat.f_iosize = maxbcachebuf;
- strlcat(mp->mnt_stat.f_fstypename, ".virtiofs", MFSNAMELEN);
+ strlcat(mp->mnt_stat.f_fstypename, "", MFSNAMELEN);
memset(mp->mnt_stat.f_mntfromname, 0, MNAMELEN);
- strlcpy(mp->mnt_stat.f_mntfromname, tag, MNAMELEN);
+ strlcpy(mp->mnt_stat.f_mntfromname, from, MNAMELEN);
mp->mnt_iosize_max = maxphys;
error = taskqueue_start_threads(&data->vtfs_tq, VIRTIOFS_THREADS_TQ, PVFS, "virtiofs_tq");

File Metadata

Mime Type
text/plain
Expires
Wed, Sep 9, 1:53 AM (2 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38553944
Default Alt Text
D46296.id149167.diff (1 KB)

Event Timeline