VFS_PREOPEN(8)

πŸ’– vfs_preopen β€” the manual page, but make it a group chat πŸ’–

okay bestie, gather round, because we're reading the vfs_preopen(8) page together and it's lowkey one of the coolest little tricks in the samba(7) universe. it lives in the System Administration tools corner of the man page shelf, and it's giving secret weapon energy. let's go πŸ¦‹


✨ NAME ✨

vfs_preopen β€” hide read latencies for applications reading numbered files πŸ’…

yes. that's the whole job. it hides the lag. icon behavior honestly.


🌸 SYNOPSIS 🌸

vfs objects = preopen

that's it. that's the whole vibe. drop it in and you're cooking πŸ”₯


πŸŽ€ DESCRIPTION πŸŽ€

so this VFS module is part of the samba(7) suite. family reunion, everyone's here πŸ’–

here's the tea: this module is for apps that want to read numbered files in sequence with very strict latency requirements. like, no chill at all about timing. the iconic example is video streaming applications that want to read one file per frame β€” frame after frame after frame, no pauses, no buffering, no "hmm let me think about it" 🎬

what it does is genuinely so clever: when you use this module, a bunch of helper processes get started, and they speculatively open files and read a number of bytes to prime the file system cache. so later, when the real application's request finally shows up? boom. no disk access necessary. the data was already waiting like a bestie holding your spot in line 🫢

and yes, this module is stackable. stack it, layer it, live your truth ✨


πŸ’… OPTIONS πŸ’…

okay this is the long part but stay with me, every single one matters, no skips, no cap.

  • preopen:posix-basic-regex = BOOL β€” default is no. setting it to yes changes the meaning of the preopen:names option. the deets are explained down there. πŸ‘‡
  • preopen:names = /pattern1/pattern2/ β€” this one specifies the file name pattern(s) that should trigger the preopen helpers to actually do their job. we assume the files are numbered incrementally, that's the whole premise. so if your file names look like FRAME00000.frm, FRAME00001.frm and so on, you'd list them as preopen:names=/FRAME*.frm/. the default algorithm takes the first (at least 3) digits it finds and uses them to calculate the name of the next frames. cute, right? πŸ“

setting preopen:posix-basic-regex = yes changes the meaning of the preopen:names option. it means 'POSIX Basic Regular Expression' strings are used as patterns. the key here: each pattern requires exactly one 'subexpression' starting with \( and ending with \), and that subexpression is what specifies the position of the digits representing the incrementing frame numbers. given file names like Movie7599Frame0v1234.txt, Movie7599Frame1v1234.txt, Movie7599Frame2v1234.txt up to Movie7599Frame9v1234.txt, you can use preopen:names = /.*Frame\([0-9]\).*\.txt/ in order to match just a single digits. this might not be a real world example, but it shows the flexibility that is possible here. πŸ’«

  • preopen:num_bytes = BYTES β€” specifies the number of bytes the helpers should speculatively read. defaults to 1.
  • preopen:helpers = NUM-PROCS β€” number of forked helper processes. defaults to 1.
  • preopen:queuelen = NUM-FILES β€” number of files that should be speculatively opened. defaults to the 10 subsequent files β€” so the next 10, lined up and ready.
  • preopen:nomatch_log_level = LOGLEVEL β€” wanna debug or audit how the preopen logic is being used? use this option to specify at what log level details about filenames not matching any pattern from preopen:names get logged.

defaults to the log level 5. also peep smb.conf(5) in the 'log level' section for special handling of the 'preopen' debug class. πŸ“

  • preopen:match_log_level = LOGLEVEL β€” again, for debugging or auditing usage of the preopen logic, this one sets the log level for details about filenames that actually matching a pattern from preopen:names.

see also 'preopen:founddigits_log_level' and 'preopen:push_log_level'.

defaults to the log level 5. see also smb.conf(5) in the 'log level' section for special handling of the 'preopen' debug class. πŸ‘‘

  • preopen:nodigits_log_level = LOGLEVEL β€” for debugging or auditing problems with the preopen configuration, this sets the log level for details about filenames that actually match a pattern from preopen:names, but at the same time don't contain the expected digits. this is typically something the administrator wants to notice and adjust the configuration in order to define more precisely where to find the digits in the filename. πŸ‘€

defaults to the log level 1. see also smb.conf(5) in the 'log level' section for special handling of the 'preopen' debug class.

  • preopen:founddigits_log_level = LOGLEVEL β€” for debugging or auditing usage of the preopen logic, this sets the log level for details about filenames that actually match a pattern from preopen:names and at the same time have valid expected digits. this means enough information is available in order to queue preopens. we love a win πŸŽ‰

defaults to the log level 3. see also smb.conf(5) in the 'log level' section for special handling of the 'preopen' debug class.

  • preopen:reset_log_level = LOGLEVEL β€” if a matching filename belongs to a different pattern from preopen:names, a different parent directory, or differs in a significant way from the last filename that was found before, the module needs to reset its internal queue state. this means no more preopens will be pushed to helper processes belonging to the former queue state. to debug or audit such queue resets, use this option to specify at what log level details are logged. it's giving start over, fresh slate 🧹

defaults to the log level 5. see also smb.conf(5) in the 'log level' section for special handling of the 'preopen' debug class.

  • preopen:push_log_level = LOGLEVEL β€” for debugging or auditing usage of the preopen logic, this sets the log level for details about filenames actually pushed to preopen helper processes. this means they will actually be preopened soon. here we gooo πŸš€

defaults to the log level 3. see also smb.conf(5) in the 'log level' section for special handling of the 'preopen' debug class.

  • preopen:queue_log_level = LOGLEVEL β€” debugging details about internal queue processing? this one sets the log level those details get logged at. very behind-the-scenes, very backstage pass energy.

defaults to the log level 10. see also smb.conf(5) in the 'log level' section for special handling of the 'preopen' debug class. 🌈


⭐ VERSION ⭐

this man page is part of version 4.24.7-Ubuntu-4.24.7+dfsg-1ubuntu1 of the Samba suite. periodt.


πŸ‘‘ AUTHOR πŸ‘‘

the original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed. legends only 🌟

the PREOPEN VFS module was created with contributions from Volker Lendecke and the developers at IBM. absolute icons, we're obsessed πŸ’œ


aaaand that's the whole page bestie!! this came to you from the Samba suite, version 4.24.7-Ubuntu-4.24.7+dfsg-1ubuntu1, dated 09/13/2026 β€” so jot that down, screenshot it, tell your friends, whatever πŸ’–βœ¨πŸŽ€ it was a pleasure doing Unix with you, mwah πŸ«ΆπŸ’…

πŸ“¦ where this page comes from