summaryrefslogtreecommitdiff
path: root/usr/src/lib
diff options
context:
space:
mode:
authorDan McDonald <danmcd@joyent.com>2022-04-25 08:23:27 -0400
committerDan McDonald <danmcd@joyent.com>2022-04-25 08:23:27 -0400
commitb7cc77ad34467677e66c1a06f3d717c4ea632bc5 (patch)
tree10934aa0fdb2ea01ada9896e382658d81634eb07 /usr/src/lib
parent309baf317c94c37e7e9110980b39367afa97ec65 (diff)
parent1e6b83029f8d7ea1ade06314dc14e2fbd0cd2bcb (diff)
downloadillumos-joyent-b7cc77ad34467677e66c1a06f3d717c4ea632bc5.tar.gz
[illumos-gate merge]
commit 1e6b83029f8d7ea1ade06314dc14e2fbd0cd2bcb 14633 lib9p: unlinkat() does not work on 9p share commit 104fd2955714fa4ea6ed431b6b5cf2eb0766ecad 14623 bhyve/xhci: Connecting device on port 1 failed commit 77570342d4bf7e1e439bf1b8008312de7f031a0a 14653 loader: zfs: handle holes at the tail end correctly commit 1aa1f41fe10c6220a7fbef328fac1b72a8355a01 14495 bhyve VNC server should support alternate pixel formats 14494 bhyve VNC server could support multiple connections 14505 libumem's umem_update thread could be named 14506 libidspace does not expose id_allocff() 14640 bhyve VNC authentication fails with openssl3 Conflicts: usr/src/lib/libidspace/common/mapfile-vers usr/src/cmd/bhyve/Makefile
Diffstat (limited to 'usr/src/lib')
-rw-r--r--usr/src/lib/lib9p/common/backend/fs.c10
-rw-r--r--usr/src/lib/lib9p/common/request.c6
-rw-r--r--usr/src/lib/libidspace/common/libidspace.h2
-rw-r--r--usr/src/lib/libidspace/common/mapfile-vers4
-rw-r--r--usr/src/lib/libumem/common/umem_update_thread.c1
5 files changed, 17 insertions, 6 deletions
diff --git a/usr/src/lib/lib9p/common/backend/fs.c b/usr/src/lib/lib9p/common/backend/fs.c
index 4b7764cd86..792e17ebd2 100644
--- a/usr/src/lib/lib9p/common/backend/fs.c
+++ b/usr/src/lib/lib9p/common/backend/fs.c
@@ -1838,8 +1838,11 @@ fs_remove(void *softc, struct l9p_fid *fid)
return (error);
if (unlinkat(file->ff_dirfd, file->ff_name,
- S_ISDIR(cst.st_mode) ? AT_REMOVEDIR : 0) != 0)
+ S_ISDIR(cst.st_mode) ? AT_REMOVEDIR : 0) != 0) {
error = errno;
+ if (error == EEXIST && S_ISDIR(cst.st_mode))
+ error = ENOTEMPTY;
+ }
return (error);
}
@@ -3038,8 +3041,11 @@ fs_unlinkat(void *softc, struct l9p_request *req)
return (error);
if (req->lr_req.tunlinkat.flags & L9PL_AT_REMOVEDIR) {
- if (unlinkat(dirff->ff_dirfd, newname, AT_REMOVEDIR) != 0)
+ if (unlinkat(dirff->ff_dirfd, newname, AT_REMOVEDIR) != 0) {
error = errno;
+ if (error == EEXIST)
+ error = ENOTEMPTY;
+ }
} else {
if (unlinkat(dirff->ff_dirfd, newname, 0) != 0)
error = errno;
diff --git a/usr/src/lib/lib9p/common/request.c b/usr/src/lib/lib9p/common/request.c
index 99885690af..644524e12d 100644
--- a/usr/src/lib/lib9p/common/request.c
+++ b/usr/src/lib/lib9p/common/request.c
@@ -1410,12 +1410,12 @@ l9p_dispatch_trenameat(struct l9p_request *req)
int error;
error = fid_lookup(conn, req->lr_req.hdr.fid, ENOENT,
- F_REQUIRE_DIR | F_FORBID_OPEN, &req->lr_fid);
+ F_REQUIRE_DIR, &req->lr_fid);
if (error)
return (error);
error = fid_lookup(conn, req->lr_req.trenameat.newdirfid, ENOENT,
- F_REQUIRE_DIR | F_FORBID_OPEN, &req->lr_fid2);
+ F_REQUIRE_DIR, &req->lr_fid2);
if (error)
return (error);
@@ -1434,7 +1434,7 @@ l9p_dispatch_tunlinkat(struct l9p_request *req)
int error;
error = fid_lookup(conn, req->lr_req.hdr.fid, ENOENT,
- F_REQUIRE_DIR | F_FORBID_OPEN, &req->lr_fid);
+ F_REQUIRE_DIR, &req->lr_fid);
if (error)
return (error);
diff --git a/usr/src/lib/libidspace/common/libidspace.h b/usr/src/lib/libidspace/common/libidspace.h
index bb8690f19c..f78a3eb1fd 100644
--- a/usr/src/lib/libidspace/common/libidspace.h
+++ b/usr/src/lib/libidspace/common/libidspace.h
@@ -11,6 +11,7 @@
/*
* Copyright (c) 2014 Joyent, Inc. All rights reserved.
+ * Copyright 2022 OmniOS Community Edition (OmniOSce) Association.
*/
#ifndef _LIBIDSPACE_H
@@ -32,6 +33,7 @@ extern id_space_t *id_space_create(const char *, id_t, id_t);
extern void id_space_destroy(id_space_t *);
extern void id_space_extend(id_space_t *, id_t, id_t);
extern id_t id_alloc(id_space_t *);
+extern id_t id_allocff(id_space_t *);
extern id_t id_alloc_specific(id_space_t *, id_t);
extern void id_free(id_space_t *, id_t);
diff --git a/usr/src/lib/libidspace/common/mapfile-vers b/usr/src/lib/libidspace/common/mapfile-vers
index 61ae855ee0..248c75b2e3 100644
--- a/usr/src/lib/libidspace/common/mapfile-vers
+++ b/usr/src/lib/libidspace/common/mapfile-vers
@@ -11,6 +11,7 @@
#
# Copyright (c) 2014 Joyent, Inc. All rights reserved.
+# Copyright 2022 OmniOS Community Edition (OmniOSce) Association.
#
#
@@ -31,7 +32,8 @@ $mapfile_version 2
SYMBOL_VERSION ILLUMOS_1.0 { # first release of libidspace
global:
- id_alloc;
+ id_alloc;
+ id_allocff;
id_alloc_specific;
id_free;
id_space_create;
diff --git a/usr/src/lib/libumem/common/umem_update_thread.c b/usr/src/lib/libumem/common/umem_update_thread.c
index eb044b7641..fc64f9320b 100644
--- a/usr/src/lib/libumem/common/umem_update_thread.c
+++ b/usr/src/lib/libumem/common/umem_update_thread.c
@@ -142,6 +142,7 @@ umem_create_update_thread(void)
THR_BOUND | THR_DAEMON | THR_DETACHED | THR_SUSPENDED,
&newthread) == 0) {
(void) thr_sigsetmask(SIG_SETMASK, &oldmask, NULL);
+ (void) thr_setname(newthread, "umem_update");
(void) mutex_lock(&umem_update_lock);
/*