Commit Graph

7 Commits

Author SHA1 Message Date
Mario Fetka
0994605aa8 nwshare: track physical-record set entries
Add physical-record entries to the shared synchronization set table.

The Novell SDK documents the physical-record set calls as operating on the
caller's logged data byte range table: Log Physical Record adds byte ranges,
Lock Physical Record Set locks all logged ranges, Release Physical Record Set
unlocks them while keeping them logged, and Clear Physical Record Set unlocks
and removes them.

MARS-NWE already used the shared set handler for file and logical-record sets.
Extend the same table with type 4 entries for physical records, storing the
NetWare file handle, start offset, record length, timeout, lock directive, and
current locked state.

Add a type 4 handler that reuses nw_log_physical_record() for set lock and
release operations, and export share_set_physrec_add_rm() so nwconn can
maintain the set table when individual physical-record calls log or clear
ranges.

This prepares the documented Physical Record Set endpoints to use the existing
byte-range lock implementation.
2026-05-29 23:21:19 +02:00
Mario Fetka
cfde1247f0 nwshare: preserve synchronization set entries
Keep synchronization set entries linked while handling Lock, Release, and Clear
Set operations.

The Novell SDK documents the set-oriented synchronization calls as operating on
the caller task table: Log File and Log Logical Record add entries, Lock Set
locks the logged entries, Release Set unlocks them while keeping them logged
for future Lock Set calls, and Clear Set unlocks and removes them.

share_handle_lock_sets() already encoded that semantic split with lock_flag -1
for release and -2 for clear, but its iterator unlinked each entry before
checking whether it should be removed. That meant even Lock Set and Release Set
walked the table destructively, and non-matching set types could be lost while
operating on another set family.

Only unlink entries when processing a matching Clear Set operation. Leave
entries in place for Lock Set and Release Set, and advance the list normally
for non-matching entries.

This fixes the shared set iterator used by the documented File Set and Logical
Record Set endpoints; it does not change the low-level locking primitives.
2026-05-29 23:09:01 +02:00
Mario Fetka
65f453d6b5 nwshare: tag synchronization set entries
Store the set-entry type when files and logical records are added to a
connection's synchronization set.

The Novell SDK documents the set-oriented synchronization calls as operating
on the caller's current task file/logical-record set: Log File and Log Logical
Record add entries, while Lock/Release/Clear Set calls later operate on those
logged entries.

MARS-NWE already had type-specific handling in share_handle_lock_sets(), using
type 1 for file sets and type 2 for logical-record sets, but newly allocated
SHARESET entries were left with the zero-filled default type. That meant the
type filter could not reliably match entries for set operations.

Assign type 1 in share_set_file_add_rm() and type 2 in
share_set_logrec_add_rm() so the existing set handlers can find the entries
they are supposed to lock, release, or clear.

This prepares the documented Lock File Set endpoint to use the existing set
path and also fixes the already-wired release/clear set handlers.
2026-05-29 22:54:55 +02:00
Mario Fetka
8e8b837c63 Fix ncpserv, nwfile and nwshare warning hot spots 2026-04-20 23:39:42 +02:00
Mario Fetka
368b36eb95 Fix 64-bit filesystem and type handling 2026-04-20 23:39:42 +02:00
Mario Fetka
be2d60525a update patches 2011-11-14 19:58:21 +01:00
Mario Fetka
0fbc9baf41 Restructure for camke build 2011-11-13 17:37:22 +01:00