Age | Commit message (Collapse) | Author | Files | Lines |
|
Inside a directory, keep a file open and then renaming
the directory should fail with ACCESS_DENIED.
Jeremy.
|
|
failure if we have a pending modtime and the containing directory
of the file has been renamed (there is no POSIX "update time by
fd" call). This can't happen on Windows as the rename will fail
if there are open files beneath it. Will add a torture test
for this.
Jeremy.
|
|
Jeremy.
|
|
Was missing case of "If file exists open. If file doesn't exist error."
Damn damn damn. CIFSFS client will have to have fallback cases
for this error for a long time.
Jeremy.
|
|
Jeremy.
|
|
Fixes the new RAW-STREAMS torture test.
Jeremy.
|
|
|
|
Jeremy.
|
|
This allows sendfile implementations that are atomic to avoid having
to send zeros or kill the client connection on a short read (usually
the file was truncated).
|
|
|
|
|
|
- Attempt to use syscalls to determine max-open-files value.
- Add in periodic logging when max file limit reached
|
|
* move to reinit_after_fork() to protect all Samba daemons
* only protect parent processes
|
|
* This allows a problem in the underlying CN backend to be bubbled up
to the general CN layer so a catch-all reply can be returned
* We now also return a catch-all response immediately if the server-side
event queue becomes too big
|
|
OneFS notify.
The OneFS kernel based change notify system takes an fd of the directory
to watch in it's initialization syscall. Since we already have this
directory open, this commit plumbs that fd down to the VFS layer via the
notify_entry struct.
We also need to know if the watch is taken out on a snapshot directory.
The full file_id struct is also passed down to make this determination.
The file_id marshalling wrappers are hand written here, but should
eventually be auto-generated by moving the struct file_id into the idl.
|
|
|
|
This extends the file_id struct to add an additional generic uint64_t
field: extid. For backwards compatibility with dev/inodes stored in
xattr_tdbs and acl_tdbs, the ext id is ignored for these databases.
This patch should cause no functional change on systems that don't use
SMB_VFS_FILE_ID_CREATE to set the extid.
Existing code that uses the smb_share_mode library will need to be
updated to be compatibile with the new extid.
|
|
Since file_id_create_dev is incompatible with the concept of file_ids,
it is now static and in the one file that needs it.
|
|
|
|
multiple replies
(e.g. reply_echo). Change test and onefs modules to match new api set (thanks Volker!).
|
|
Do not attempt to delete streams on a truncating open, if the name
we're opening is itself a stream.
Port 176e8857203944bc332844b700749120ce90c891 to standard open path
|
|
This was uncovered when the MAX FD limit was hit, causing an instant core
and invoking error reporting. This fix causes SMBD to exit, but without
building a core.
|
|
This commit adds a configure argument which allows for setting MADV_PROTECT
in the madvise() API. With this enabled the kernel won't kill SMBD when
it's running low on memory.
|
|
|
|
parameter name
|
|
|
|
|
|
|
|
|
|
Jeremy.
|
|
This patch adds 3 new VFS OPs for Windows byte range locking: BRL_LOCK_WINDOWS,
BRL_UNLOCK_WINDOWS and BRL_CANCEL_WINDOWS. Specifically:
* I renamed brl_lock_windows, brl_unlock_windows and brl_lock_cancel to
*_default as the default implementations of the VFS ops.
* The blocking_lock_record (BLR) is now passed into the brl_lock_windows and
brl_cancel_windows paths. The Onefs implementation uses it - future
implementations may find it useful too.
* Created brl_lock_cancel to do what brl_lock/brl_unlock do: set up a
lock_struct and call either the Posix or Windows lock function. These happen
to be the same for the default implementation.
* Added helper functions: increment_current_lock_count() and
decrement_current_lock_count().
* Minor spelling correction in brl_timeout_fn: brl -> blr.
* Changed blocking_lock_cancel() to return the BLR that it has cancelled. This
allows us to assert its the lock that we wanted to cancel. If this assert ever
fires, this path will need to take in the BLR to cancel, rather than choosing
on its own.
* Adds a small helper function: find_blocking_lock_record_by_id(). Used by the
OneFS implementation, but could be useful for others.
|
|
blocking_lock_record.
|
|
|
|
|
|
search requests.
By default this VFS call is a NOOP, but the onefs vfs module takes advantage
of it to initialize direntry search caches at the beginning of each
TRANS2_FIND_FIRST, TRANS2_FIND_NEXT, SMBffirst, SMBsearch, and SMBunique
|
|
* VFS_OP_READDIR can now provide stat information, take advantage of it
if it's available
* is_visible_file(): optimistically expect the provided stat buffer is
already valid
* dptr_ReadDirName(): refactor code for easier readability, functionality
is the same
|
|
* this allows VFS implementations that prefetch stat information on
readdir to return it through one VFS call
* backwards compatibility is maintained by passing in NULL
* if the system readdir doesn't return stat info, the stat struct is
set to invalid
|
|
A few functions in oplocks_onefs.c need to be accessed from the onefs
vfs module. It would be ideal if oplocks were implemented at the vfs
layer, but since they aren't yet, a new header is added to
source3/include to make these functions available to the onefs vfs
module. oplocks_onefs.o doesn't need to be linked into the onefs vfs
module explicitly, since it is already linked into smbd by default.
|
|
Unlinking a file while still holding an oplock can cause problems with
kernel oplocks. This simply releases the oplock before actually
unlinking the file.
|
|
Here is a short description for each of the new capability flags:
KOPLOCKS_LEVEL2_SUPPORTED: Level 2 oplocks are supported natively in
the kernel.
KOPLOCKS_DEFERRED_OPEN_NOTIFICATION: The kernel notifies deferred
openers when they can retry the open.
KOPLOCKS_TIMEOUT_NOTIFICATION: The kernel notifies smbds when an
oplock break times out.
KOPLOCKS_OPLOCK_BROKEN_NOTIFICATION: The kernel notifies smbds when an
oplock is broken.
|
|
This replaces release_level2_oplocks_on_change with
contend_level2_oplock_begin/end in order to contend level2 oplocks
throughout an operation rather than just at the begining. This is
necessary for some kernel oplock implementations, and also lays the
groundwork for better correctness in Samba's standard level2 oplock
handling. The next step for non-kernel oplocks is to add additional
state to the share mode lock struct that prevents any new opens from
granting oplocks while a contending operation is in progress.
All operations that contend level 2 oplocks are now correctly spanned
except for aio and synchronous writes. The two write paths both have
non-trivial error paths that need extra care to get right.
RAW-OPLOCK and the rest of 'make test' are still passing with this
change.
|
|
Level 2 for kernel oplocks
Pass in an extra argument when releasing an oplock so kernel oplock
implementations can support downgrading from Level 1 to Level 2.
|
|
I'm not certain if the dummy pointer is needed in struct vfs_fsp_data,
but I added it to be consistent with the comment below.
|
|
This changelist allows for the addition of custom performance
monitoring modules through smb.conf. Entrypoints in the main message
processing code have been added to capture the command, subop, ioctl,
identity and message size statistics.
|
|
|
|
|
|
|
|
|
|
failing.
Reported by Kukks. Make sure we correctly use LSTAT in all cases where
POSIX pathnames are being used. This matters when dealing with symlinks
pointing to invalid paths being renamed or deleted not all deletes and
renames are done via an nt_create open.
Jeremy.
|
|
delete file
This fixes the generic rename/delete problem for 3.3.0 and above.
Fixed slightly differently to discussions, user viewable modified
ACLs are not a good idea :-).
Jeremy.
|