mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
virtiofs: rename member to 'openfiles' for clarity
New element 'openfiles' had confusing name. Since the patch with this new element wasn't propagate yet, old name ('rlimit_nofile') was changed. ... <binary> <openfiles max='122333'/> </binary> ... Signed-off-by: Adam Julis <ajulis@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
ce9c9e315f
commit
b53e9f834b
@ -3734,10 +3734,10 @@ A directory on the host that can be accessed directly from the guest.
|
|||||||
The thread pool helps increase the number of requests in flight when used with
|
The thread pool helps increase the number of requests in flight when used with
|
||||||
storage that has a higher latency. However, it has an overhead, and so for
|
storage that has a higher latency. However, it has an overhead, and so for
|
||||||
fast, low latency filesystems, it may be best to turn it off. ( :since:`Since 8.5.0` )
|
fast, low latency filesystems, it may be best to turn it off. ( :since:`Since 8.5.0` )
|
||||||
Element ``rlimit_profile`` accepts one attribute ``size`` which defines the
|
Element ``openfiles`` accepts one attribute ``max`` which defines the
|
||||||
maximum number of file descriptors. Non-positive values are forbidden.
|
maximum number of file descriptors. Non-positive values are forbidden.
|
||||||
Although numbers greater than 1M are allowed, the virtiofsd documentation
|
The upper bound on the number of open files is implementation defined.
|
||||||
states that in this case its set by virtiofsd to the 1M. ( :since:`Since 10.6.0` )
|
( :since:`Since 10.6.0` )
|
||||||
``source``
|
``source``
|
||||||
The resource on the host that is being accessed in the guest. The ``name``
|
The resource on the host that is being accessed in the guest. The ``name``
|
||||||
attribute must be used with ``type='template'``, and the ``dir`` attribute
|
attribute must be used with ``type='template'``, and the ``dir`` attribute
|
||||||
|
@ -8868,7 +8868,7 @@ virDomainFSDefParseXML(virDomainXMLOption *xmlopt,
|
|||||||
g_autofree char *queue_size = virXPathString("string(./driver/@queue)", ctxt);
|
g_autofree char *queue_size = virXPathString("string(./driver/@queue)", ctxt);
|
||||||
g_autofree char *binary = virXPathString("string(./binary/@path)", ctxt);
|
g_autofree char *binary = virXPathString("string(./binary/@path)", ctxt);
|
||||||
g_autofree char *thread_pool_size = virXPathString("string(./binary/thread_pool/@size)", ctxt);
|
g_autofree char *thread_pool_size = virXPathString("string(./binary/thread_pool/@size)", ctxt);
|
||||||
g_autofree char *rlimit_nofile = virXPathString("string(./binary/rlimit_nofile/@size)", ctxt);
|
g_autofree char *openfiles = virXPathString("string(./binary/openfiles/@max)", ctxt);
|
||||||
xmlNodePtr binary_node = virXPathNode("./binary", ctxt);
|
xmlNodePtr binary_node = virXPathNode("./binary", ctxt);
|
||||||
xmlNodePtr binary_lock_node = virXPathNode("./binary/lock", ctxt);
|
xmlNodePtr binary_lock_node = virXPathNode("./binary/lock", ctxt);
|
||||||
xmlNodePtr binary_cache_node = virXPathNode("./binary/cache", ctxt);
|
xmlNodePtr binary_cache_node = virXPathNode("./binary/cache", ctxt);
|
||||||
@ -8892,11 +8892,11 @@ virDomainFSDefParseXML(virDomainXMLOption *xmlopt,
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rlimit_nofile &&
|
if (openfiles &&
|
||||||
virStrToLong_ull(rlimit_nofile, NULL, 10, &def->rlimit_nofile) < 0) {
|
virStrToLong_ull(openfiles, NULL, 10, &def->openfiles) < 0) {
|
||||||
virReportError(VIR_ERR_XML_ERROR,
|
virReportError(VIR_ERR_XML_ERROR,
|
||||||
_("cannot parse rlimit_nofile '%1$s' for virtiofs"),
|
_("cannot parse openfiles '%1$s' for virtiofs"),
|
||||||
rlimit_nofile);
|
openfiles);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -23424,8 +23424,8 @@ virDomainFSDefFormat(virBuffer *buf,
|
|||||||
if (def->thread_pool_size >= 0)
|
if (def->thread_pool_size >= 0)
|
||||||
virBufferAsprintf(&binaryBuf, "<thread_pool size='%d'/>\n", def->thread_pool_size);
|
virBufferAsprintf(&binaryBuf, "<thread_pool size='%d'/>\n", def->thread_pool_size);
|
||||||
|
|
||||||
if (def->rlimit_nofile > 0)
|
if (def->openfiles > 0)
|
||||||
virBufferAsprintf(&binaryBuf, "<rlimit_nofile size='%lld'/>\n", def->rlimit_nofile);
|
virBufferAsprintf(&binaryBuf, "<openfiles max='%lld'/>\n", def->openfiles);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -890,7 +890,7 @@ struct _virDomainFSDef {
|
|||||||
bool symlinksResolved;
|
bool symlinksResolved;
|
||||||
char *binary;
|
char *binary;
|
||||||
unsigned long long queue_size;
|
unsigned long long queue_size;
|
||||||
unsigned long long rlimit_nofile;
|
unsigned long long openfiles;
|
||||||
virTristateSwitch xattr;
|
virTristateSwitch xattr;
|
||||||
virDomainFSCacheMode cache;
|
virDomainFSCacheMode cache;
|
||||||
virTristateSwitch posix_lock;
|
virTristateSwitch posix_lock;
|
||||||
|
@ -3381,9 +3381,9 @@
|
|||||||
</element>
|
</element>
|
||||||
</optional>
|
</optional>
|
||||||
<optional>
|
<optional>
|
||||||
<element name="rlimit_nofile">
|
<element name="openfiles">
|
||||||
<optional>
|
<optional>
|
||||||
<attribute name="size">
|
<attribute name="max">
|
||||||
<data type="positiveInteger"/>
|
<data type="positiveInteger"/>
|
||||||
</attribute>
|
</attribute>
|
||||||
</optional>
|
</optional>
|
||||||
|
@ -194,8 +194,8 @@ qemuVirtioFSBuildCommandLine(virQEMUDriverConfig *cfg,
|
|||||||
if (fs->thread_pool_size >= 0)
|
if (fs->thread_pool_size >= 0)
|
||||||
virCommandAddArgFormat(cmd, "--thread-pool-size=%i", fs->thread_pool_size);
|
virCommandAddArgFormat(cmd, "--thread-pool-size=%i", fs->thread_pool_size);
|
||||||
|
|
||||||
if (fs->rlimit_nofile > 0)
|
if (fs->openfiles > 0)
|
||||||
virCommandAddArgFormat(cmd, "--rlimit-nofile=%llu", fs->rlimit_nofile);
|
virCommandAddArgFormat(cmd, "--rlimit-nofile=%llu", fs->openfiles);
|
||||||
|
|
||||||
if (cfg->virtiofsdDebug) {
|
if (cfg->virtiofsdDebug) {
|
||||||
if (virBitmapIsBitSet(fs->caps, QEMU_VHOST_USER_FS_FEATURE_SEPARATE_OPTIONS))
|
if (virBitmapIsBitSet(fs->caps, QEMU_VHOST_USER_FS_FEATURE_SEPARATE_OPTIONS))
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
vhost-user-fs-fd-openfiles.xml
|
@ -32,7 +32,7 @@
|
|||||||
<cache mode='always'/>
|
<cache mode='always'/>
|
||||||
<sandbox mode='chroot'/>
|
<sandbox mode='chroot'/>
|
||||||
<thread_pool size='16'/>
|
<thread_pool size='16'/>
|
||||||
<rlimit_nofile size='122333'/>
|
<openfiles max='122333'/>
|
||||||
</binary>
|
</binary>
|
||||||
<idmap>
|
<idmap>
|
||||||
<uid start='0' target='100000' count='65535'/>
|
<uid start='0' target='100000' count='65535'/>
|
@ -1 +0,0 @@
|
|||||||
vhost-user-fs-fd-rlimit.xml
|
|
@ -2816,7 +2816,7 @@ mymain(void)
|
|||||||
DO_TEST_CAPS_ARCH_LATEST("launch-security-s390-pv", "s390x");
|
DO_TEST_CAPS_ARCH_LATEST("launch-security-s390-pv", "s390x");
|
||||||
|
|
||||||
DO_TEST_CAPS_LATEST("vhost-user-fs-fd-memory");
|
DO_TEST_CAPS_LATEST("vhost-user-fs-fd-memory");
|
||||||
DO_TEST_CAPS_LATEST("vhost-user-fs-fd-rlimit");
|
DO_TEST_CAPS_LATEST("vhost-user-fs-fd-openfiles");
|
||||||
DO_TEST_CAPS_LATEST("vhost-user-fs-hugepages");
|
DO_TEST_CAPS_LATEST("vhost-user-fs-hugepages");
|
||||||
DO_TEST_CAPS_LATEST_PARSE_ERROR("vhost-user-fs-readonly");
|
DO_TEST_CAPS_LATEST_PARSE_ERROR("vhost-user-fs-readonly");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user