• src/sbbs3/chksmb.c fixsmb

    From Rob Swindell (on Windows@VERT to Git commit to main/sbbs/m on Thursday, March 12, 2026 14:38:00
    https://gitlab.synchro.net/main/sbbs/-/commit/691b242e247b822d5184e9b5
    Modified Files:
    src/sbbs3/chksmb.c fixsmb.c smbutil.c
    Log Message:
    Gracefully terminate (e.g. unlocked msgbase) when aborted with Ctrl-C/break

    Fix issue #1092

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows@VERT to Git commit to main/sbbs/m on Thursday, March 12, 2026 14:47:00
    https://gitlab.synchro.net/main/sbbs/-/commit/3f32c79ae83bb61d3cce85ce
    Modified Files:
    src/sbbs3/chksmb.c fixsmb.c smbutil.c
    Log Message:
    signal() use should #include <signal.h> first

    Caught on Alpine Linux (only)

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Tuesday, September 22, 2026 20:05:00
    https://gitlab.synchro.net/main/sbbs/-/commit/531bd654b515fc1f6b790d89
    Modified Files:
    src/sbbs3/chksmb.c fixsmb.c smbutil.c src/smblib/smballoc.c smblib.c Log Message:
    smblib: read/write data allocation records a run at a time

    smb_incdat() and smb_freemsgdat() updated the .sda allocation table one
    2-byte record per 256-byte data block: seek, read, seek back, write. Each
    seek discards the stdio buffer, so every block cost its own read() and
    write() syscall. On a message base served over SMB/CIFS (e.g. with Samba
    "sync always"), each of those writes is a synchronous round trip to the
    file server: rebuilding an 820MB mail base with fixsmb took ~13 minutes
    at ~3,700 writes/sec, holding the base locked the whole time.

    Now the whole run of records for a data field is read with one fread(), adjusted in memory, and written back with one fwrite(). smb_freemsgdat()
    still truncates completely-freed records from the end of the .sda file.

    Measured on a copy of the same mail base, with byte-identical results
    versus the old code:
    fixsmb: 3,079,001 -> 58,663 write() calls
    smbutil m: 1,673,481 -> 39,340 write() calls

    This benefits every message delete/maint/pack as well as fixsmb.

    Bump SMBLIB, FIXSMB, CHKSMB and SMBUTIL to v3.22 (unchanged since the
    v3.21e release). The SMB format version is unchanged.

    Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net