diff options
| author | Martin Matuska <mm@FreeBSD.org> | 2024-10-11 06:39:18 +0000 |
|---|---|---|
| committer | Martin Matuska <mm@FreeBSD.org> | 2024-10-11 06:43:49 +0000 |
| commit | 7a7741af18d6c8a804cc643cb7ecda9d730c6aa6 (patch) | |
| tree | 5bae8128eb32510f0477afd24ab5f3bc7babe1f3 /sys/contrib/openzfs/module/lua | |
| parent | 3e501ef896671cb190e8c40c6258b8f27d136f07 (diff) | |
| parent | 3a9fca901b4463760001644b83da60bf14f7b554 (diff) | |
zfs: merge openzfs/zfs@b10992582
Notable upstream pull request merges:
#9416 -multiple zio_compress: introduce max size threshold
#10018 a10e552b9 Adding Direct IO Support
#15147 e419a63bf xattr dataset prop: change defaults to sa
#15454 7e957fde7 send/recv: open up additional stream feature flags
#15810 0d77e738e Defer resilver only when progress is above a threshold
#15921 3cf2bfa57 Allocate zap_attribute_t from kmem instead of stack
#16483 -multiple dmu_objset: replace dnode_hash impl with cityhash4
#16485 8be2f4c3d zio_resume: log when unsuspending the pool
#16491 88433e640 sys/types32.h: Remove struct timeval32 from libspl header
#16496 f245541e2 zfs_file: implement zfs_file_deallocate for FreeBSD 14
#16511 308f7c2f1 Fix an uninitialized data access
#16529 29c9e6c32 Fix handling of DNS names with '-' in them for sharenfs
#16531 ddf5f34f0 Avoid fault diagnosis if multiple vdevs have errors
#16539 6f50f8e16 zfs_log: add flex array fields to log record structs
#16546 d40d40913 Evicting too many bytes from MFU metadata
#16551 3014dcb76 Reduce and handle EAGAIN errors on AIO label reads
#16554 80645d658 FreeBSD: restore zfs_znode_update_vfs()
#16565 832f66b21 FreeBSD: Sync taskq_cancel_id() returns with Linux
#16567 48d1be254 Properly release key in spa_keystore_dsl_key_hold_dd()
#16569 141368a4b Restrict raidz faulted vdev count
#16583 c84a37ae9 lua: add flex array field to TString type
#16584 86737c592 Avoid computing strlen() inside loops
#16587 d34d4f97a snapdir: add 'disabled' value to make .zfs inaccessible
#16593 224393a32 feature: large_microzap
#16597 412105977 Temporarily disable Direct IO by default
#16605 4ebe674d9 ARC: Cache arc_c value during arc_evict()
Backported pull request merges:
#16613 ab777f436 Return boolean_t in inline functions of
lib/libspl/include/sys/uio.h
#16616 efeb60b86 FreeBSD: ignore some includes when not building kernel
#16635 ---TBD--- zdb: fix printf format in dump_zap()
Obtained from: OpenZFS
OpenZFS commit: b109925820fb79db3e37670c159977f03edd950f
OpenZFS tag: 2.3.0-rc1
Diffstat (limited to 'sys/contrib/openzfs/module/lua')
| -rw-r--r-- | sys/contrib/openzfs/module/lua/lobject.h | 21 | ||||
| -rw-r--r-- | sys/contrib/openzfs/module/lua/lstate.h | 2 | ||||
| -rw-r--r-- | sys/contrib/openzfs/module/lua/lstring.c | 2 | ||||
| -rw-r--r-- | sys/contrib/openzfs/module/lua/lstring.h | 2 |
4 files changed, 15 insertions, 12 deletions
diff --git a/sys/contrib/openzfs/module/lua/lobject.h b/sys/contrib/openzfs/module/lua/lobject.h index b7c6b41ac7f4..06fdcdcbcb84 100644 --- a/sys/contrib/openzfs/module/lua/lobject.h +++ b/sys/contrib/openzfs/module/lua/lobject.h @@ -404,19 +404,22 @@ typedef TValue *StkId; /* index to stack elements */ /* ** Header for string value; string bytes follow the end of this structure */ -typedef union TString { - L_Umaxalign dummy; /* ensures maximum alignment for strings */ - struct { - CommonHeader; - lu_byte extra; /* reserved words for short strings; "has hash" for longs */ - unsigned int hash; - size_t len; /* number of characters in string */ - } tsv; +typedef struct TString { + union { + L_Umaxalign dummy; /* ensures maximum alignment for strings */ + struct { + CommonHeader; + lu_byte extra; /* reserved words for short strings; "has hash" for longs */ + unsigned int hash; + size_t len; /* number of characters in string */ + } tsv; + }; + char contents[]; } TString; /* get the actual string (array of bytes) from a TString */ -#define getstr(ts) cast(const char *, (ts) + 1) +#define getstr(ts) ((ts)->contents) /* get the actual string (array of bytes) from a Lua value */ #define svalue(o) getstr(rawtsvalue(o)) diff --git a/sys/contrib/openzfs/module/lua/lstate.h b/sys/contrib/openzfs/module/lua/lstate.h index 75c6ceda6d33..c5fa59335a9b 100644 --- a/sys/contrib/openzfs/module/lua/lstate.h +++ b/sys/contrib/openzfs/module/lua/lstate.h @@ -185,7 +185,7 @@ struct lua_State { */ union GCObject { GCheader gch; /* common header */ - union TString ts; + struct TString ts; union Udata u; union Closure cl; struct Table h; diff --git a/sys/contrib/openzfs/module/lua/lstring.c b/sys/contrib/openzfs/module/lua/lstring.c index 15a73116bb77..149a4ffc5023 100644 --- a/sys/contrib/openzfs/module/lua/lstring.c +++ b/sys/contrib/openzfs/module/lua/lstring.c @@ -103,7 +103,7 @@ static TString *createstrobj (lua_State *L, const char *str, size_t l, ts->tsv.len = l; ts->tsv.hash = h; ts->tsv.extra = 0; - sbuf = (char *)(TString *)(ts + 1); + sbuf = ts->contents; memcpy(sbuf, str, l*sizeof(char)); sbuf[l] = '\0'; /* ending 0 */ return ts; diff --git a/sys/contrib/openzfs/module/lua/lstring.h b/sys/contrib/openzfs/module/lua/lstring.h index 260e7f169bd0..257b384172ec 100644 --- a/sys/contrib/openzfs/module/lua/lstring.h +++ b/sys/contrib/openzfs/module/lua/lstring.h @@ -12,7 +12,7 @@ #include "lstate.h" -#define sizestring(s) (sizeof(union TString)+((s)->len+1)*sizeof(char)) +#define sizestring(s) (sizeof(struct TString)+((s)->len+1)*sizeof(char)) #define sizeudata(u) (sizeof(union Udata)+(u)->len) |
