summaryrefslogtreecommitdiffstats
path: root/source3/locking
Commit message (Collapse)AuthorAgeFilesLines
* Make the smbd VFS typesafeVolker Lendecke2009-07-242-0/+46
|
* s3: Change fsp->fsp_name to be an smb_filename struct!Tim Prouty2009-07-203-29/+41
|
* s3: Change the share_mode_lock struct to store a base_name and stream_nameTim Prouty2009-07-081-29/+64
|
* s3: Make some arguments to (parse|unparse)_share_modes() constTim Prouty2009-07-081-2/+2
|
* s3: Remove unnecessary const qualifiersTim Prouty2009-07-071-2/+1
|
* s3 sticky write time: Removed unused args and tighten up a function by ↵Tim Prouty2009-07-061-1/+2
| | | | making an arg const
* Fix Coverity ID 897: REVERSE_INULLVolker Lendecke2009-05-061-1/+1
|
* Use procid_str in debug messages for better cluster-debuggabilityVolker Lendecke2009-04-031-2/+2
|
* Fix a scary "fill_share_mode_lock failed" messageVolker Lendecke2009-03-261-1/+2
| | | | | | | To me "fill_share_mode_lock failed" is a "can't happen" alert. There is however a perfectly valid case in get_file_infos() when the file is not open. Change the corresponding debug message to level 10 and explain more.
* s3: Add strict lock/unlock calls to the vfs layer to replace is_lockedDave Richards2009-03-131-35/+55
|
* Last part of fix for #6154 - zfs does not honor admin users.Jeremy Allison2009-03-051-4/+15
| | | | Jeremy.
* s3 BRL: Add more clarifying comments and add implied logic to make ↵Zack Kirsch2009-02-201-2/+6
| | | | conditional more clear
* s3: Add extid to the dev/inode pairTim Prouty2009-02-191-3/+3
| | | | | | | | | | | 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.
* s3: Fix uninitialized variable warning (and bug).Zack Kirsch2009-02-131-2/+0
|
* Add VFS ops for Windows BRL: Lock, Unlock and Cancel:Zack Kirsch2009-02-132-52/+95
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix an uninitialized variable. Tim, please check!Volker Lendecke2009-02-101-1/+1
|
* s3 oplocks: Make the level2 oplock contention API more granularTim Prouty2009-02-091-11/+74
| | | | | | | | | | | | | | | | | | 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.
* Fix more asprintf warnings and some error path errors.Jeremy Allison2008-12-231-7/+6
| | | | Jeremy.
* Fix bug #5979 - Level 2 oplocks being granted improperly,Jeremy Allison2008-12-171-1/+10
| | | | Jeremy.
* s3: [3/3]: Fix a delete on close divergence from windows and the associated ↵Tim Prouty2008-12-091-45/+1
| | | | | | | torture test This third patch cleans up by removing all of the code that is made obsolete by the first patch. It should cause no functional changes.
* Use {u,}int64_t instead of SMB_BIG_{U,}INT.Jelmer Vernooij2008-10-142-26/+26
|
* Fix debug message to show correct function name.Jeremy Allison2008-09-051-1/+1
| | | | | Jeremy. (This used to be commit 079c75ef3c169c7a5d81bcaa0b70b6e0df2c464d)
* Write times code update.Jeremy Allison2008-09-051-5/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ok, here's the fix for the write times breakage with the new tests in S4 smbtorture. The key is keeping in the share mode struct the "old_file_time" as the real write time, set by all the write and allocation calls, and the "changed_write_time" as the "sticky" write time - set by the SET_FILE_TIME calls. We can set them independently (although I kept the optimization of not setting the "old_file_time" is a "changed_write_time" was already set, as we'll never see it. This allows us to update the write time immediately on the SMBwrite truncate case, SET_END_OF_FILE and SET_ALLOCATION_SIZE calls, whilst still have the 2 second delay on the "normal" SMBwrite, SMBwriteX calls. I think in a subsequent patch I'd like to change the name of these from "old_file_time" to "write_time" and "changed_write_time" to "sticky_write_time" to make this clearer. I think I also fixed a bug in Metze's original code in that once a write timestamp had been set from a "normal" SMBwriteX call the fsp->update_write_time_triggered variable was set and then never reset - thus meaning the write timestamp would never get updated again on subsequent SMBwriteX's. The new code checks the update_write_time_event event instead, and doesn't update is there's an event already scheduled. Metze especially, please check this over for your understanding. Jeremy. (This used to be commit 6f20585419046c4aca1f7d6c863cf79eb6ae53b0)
* Fix alignment problems on sparc, bug 5512Volker Lendecke2008-07-091-19/+20
| | | | | | Patch successfully tested by Christoph Kaegi <kaph@zhaw.ch>, thanks. (cherry picked from commit 9f8df16f476c49da85000b7365c8a6e33b8b71fc) (This used to be commit 82ed19ff64fc815a8ca9fbd7d3331671ecf5d12b)
* Allow server manager to close open files selected by id.Jeremy Allison2008-05-271-1/+1
| | | | | Jeremy. (This used to be commit 7eeed8bb41059ec2bddedb6a71deddeec7f33af2)
* Remove the "stat_open()" function, flag, and all associated code. It was onlyJeremy Allison2008-05-021-4/+0
| | | | | | | | being (correctly) used in the can_read/can_write checks for hide unreadable/unwritable and this is more properly done using the functions in smbd/file_access.c. Preparing to do NT access checks on all file access. Jeremy. (This used to be commit 6bfb06ad95963ae2acb67c4694a98282d3b29faa)
* Slight reformatting of fd_close_posix(), while I'm at it.Michael Adam2008-04-211-5/+9
| | | | | | | Wrap lines and remove trailing space. Michael (This used to be commit 74ed53a115b2063d4d5c8572af8f1302bc658882)
* Change fd_close_posix() to return int instead of NTSTATUS.Michael Adam2008-04-211-12/+4
| | | | | | | The errno is handed up through the VFS layer to the callers. Michael (This used to be commit d928e6648d61cf2d3c1b77db440efb835b729a84)
* Don't modify the fsp in fd_close_posix() anymore.Michael Adam2008-04-211-4/+0
| | | | | | | | | Now that it is inside the vfs layer, this function should not alter the fsp (i.e. set fsp->fh->fd = -1) anymore. That belongs above the vfs layer. Michael (This used to be commit df264bf3e00d7d77afcf55e54d2669b9ffa9af4a)
* Move the posix pending close functionality down into the VFS layer.Michael Adam2008-04-211-3/+3
| | | | | | | | | | | | | | | | | | This hides the pending close fds from the outside. Call order of SMB_VFS_CLOSE is reversed. Originally, it was: fd_close -> fd_close_posix -> SMB_VFS_CLOSE -> close And now it is: fd_close -> SMB_VFS_CLOSE -> fd_close_posix -> close This is in preparation of removing the fd parameter from the SMB_VFS_CLOSE function. But it is also the right place for the pending close calls anyways. Michael (This used to be commit 3cf56b124a2886c6260455bba4bf77d08e9a4f77)
* Quieten valgrind message on make valgrindtest. This doesn'tJeremy Allison2008-04-111-0/+5
| | | | | | seem to be valid (vl - feel free to confirm). Jeremy. (This used to be commit 43b0254d93540eeaddaa32d76dd9271f4dc2ebff)
* locking: combine get_delete_on_close_flag() and get_write_time() into ↵Stefan Metzmacher2008-04-071-19/+22
| | | | | | | | | get_file_infos() This means we need to fetch the record only once. metze (This used to be commit 4130b873291d39e363184fe4e38dc1f24ebe5056)
* locking: store the write time in the locking.tdbStefan Metzmacher2008-04-071-14/+82
| | | | | | | | | | This is needed to implement the strange write time update logic later. We need to store 2 time timestamps to distinguish between the time the file system had before the first client opened the file and a forced timestamp update. metze (This used to be commit 6aaa2ce0eeb46f6735ec984a2e7aadde7a7f456d)
* Merge leftovers of 0e1a86bc845 in 3-0-ctdbVolker Lendecke2008-03-172-5/+4
| | | | (This used to be commit 64b1625f8e3bca43504871747bef6631e1b18f44)
* Fix some "set but never used" warningsVolker Lendecke2008-01-201-5/+0
| | | | (This used to be commit 4a6dadc5178f4861e9c032321939db3b639734b5)
* Merge CTDB-related fixes from samba-ctdb 3.0 branch ↵Alexander Bokovoy2008-01-161-14/+15
| | | | | | (http://samba.org/~tridge/3_0-ctdb) Signed-off-by: Alexander Bokovoy <ab@samba.org>(This used to be commit 0c8e23afbbb2d081fc23908bafcad04650bfacea)
* Don't early delete the share mode tdb dataVolker Lendecke2008-01-121-2/+0
| | | | | We now refer directly to the file name in the tdb data, so don't delete it. (This used to be commit 71de4946cf00cf8b7bb2f2d92832166bee12e84a)
* Trivial simplificationVolker Lendecke2008-01-121-5/+1
| | | | (This used to be commit 616bc34744487450edd47e212a29c0f57eabb722)
* Some more talloc_tos()Volker Lendecke2008-01-101-7/+7
| | | | (This used to be commit 444e35e7df1f13fc285183da8fb41b30ad99a3fa)
* use talloc_tos in a few more placesVolker Lendecke2008-01-101-2/+2
| | | | (This used to be commit 65dd869bea351010c67f02046ae4134bdada1a4c)
* Remove redundant parameter fd from SMB_VFS_GETLOCK().Michael Adam2008-01-071-2/+2
| | | | | Michael (This used to be commit ee5a20becdcdb20d7012732b324c6938fab44f67)
* Do not talloc_strdup filename and servicepathVolker Lendecke2008-01-071-16/+8
| | | | (This used to be commit 66be770993acf4e1673e9615bcddb21768c33e62)
* Remove redundant parameter fd from SMB_VFS_LOCK().Michael Adam2008-01-071-2/+2
| | | | | Michael (This used to be commit 4f3ab2c406072e0b43581057e7e785e8ad454cfa)
* allocate share_mode_str only when neededVolker Lendecke2008-01-041-1/+4
| | | | (This used to be commit a98693bfa7bfe72ffa164d21b3e9636e268708aa)
* Remove redundant connection_struct from fd_close_posix() parameter list.Michael Adam2007-12-221-2/+2
| | | | | Michael (This used to be commit f3365b74ac016eaee1e82eef769dd618af5df201)
* Convert the posix_pending_close_db to dbwrap_rbtVolker Lendecke2007-12-111-126/+130
| | | | (This used to be commit 841f4ccbfb5f79ac4f447342e9dd6ef73cacbc65)
* Tiny simplificationsVolker Lendecke2007-12-103-16/+17
| | | | | | | locking.c:open_read_only was unused don't export the silly boolean flag locking_init(bool read_only) (This used to be commit 2f3c865707010bc7c463a02782dbee3dc2479da1)
* Remove a staticVolker Lendecke2007-12-101-11/+9
| | | | (This used to be commit 1f317f471af72f8bbc6c9fdd3e79a27c59e6fb6e)
* Remove two staticsVolker Lendecke2007-12-101-39/+17
| | | | (This used to be commit 8ee502e1e59960fd8db037f0adf1171b2a18cec5)
* Add a commentVolker Lendecke2007-11-181-1/+7
| | | | (This used to be commit 144014096a41de293ce7ec15f82681a469dd3aa1)