summaryrefslogtreecommitdiff
path: root/source3/locking
AgeCommit message (Collapse)AuthorFilesLines
2008-09-05Write times code update.Jeremy Allison1-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)
2008-07-09Fix alignment problems on sparc, bug 5512Volker Lendecke1-19/+20
Patch successfully tested by Christoph Kaegi <kaph@zhaw.ch>, thanks. (cherry picked from commit 9f8df16f476c49da85000b7365c8a6e33b8b71fc) (This used to be commit 82ed19ff64fc815a8ca9fbd7d3331671ecf5d12b)
2008-05-27Allow server manager to close open files selected by id.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 7eeed8bb41059ec2bddedb6a71deddeec7f33af2)
2008-05-02Remove the "stat_open()" function, flag, and all associated code. It was onlyJeremy Allison1-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)
2008-04-21Slight reformatting of fd_close_posix(), while I'm at it.Michael Adam1-5/+9
Wrap lines and remove trailing space. Michael (This used to be commit 74ed53a115b2063d4d5c8572af8f1302bc658882)
2008-04-21Change fd_close_posix() to return int instead of NTSTATUS.Michael Adam1-12/+4
The errno is handed up through the VFS layer to the callers. Michael (This used to be commit d928e6648d61cf2d3c1b77db440efb835b729a84)
2008-04-21Don't modify the fsp in fd_close_posix() anymore.Michael Adam1-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)
2008-04-21Move the posix pending close functionality down into the VFS layer.Michael Adam1-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)
2008-04-11Quieten valgrind message on make valgrindtest. This doesn'tJeremy Allison1-0/+5
seem to be valid (vl - feel free to confirm). Jeremy. (This used to be commit 43b0254d93540eeaddaa32d76dd9271f4dc2ebff)
2008-04-07locking: combine get_delete_on_close_flag() and get_write_time() into ↵Stefan Metzmacher1-19/+22
get_file_infos() This means we need to fetch the record only once. metze (This used to be commit 4130b873291d39e363184fe4e38dc1f24ebe5056)
2008-04-07locking: store the write time in the locking.tdbStefan Metzmacher1-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)
2008-03-17Merge leftovers of 0e1a86bc845 in 3-0-ctdbVolker Lendecke2-5/+4
(This used to be commit 64b1625f8e3bca43504871747bef6631e1b18f44)
2008-01-20Fix some "set but never used" warningsVolker Lendecke1-5/+0
(This used to be commit 4a6dadc5178f4861e9c032321939db3b639734b5)
2008-01-16Merge CTDB-related fixes from samba-ctdb 3.0 branch ↵Alexander Bokovoy1-14/+15
(http://samba.org/~tridge/3_0-ctdb) Signed-off-by: Alexander Bokovoy <ab@samba.org>(This used to be commit 0c8e23afbbb2d081fc23908bafcad04650bfacea)
2008-01-12Don't early delete the share mode tdb dataVolker Lendecke1-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)
2008-01-12Trivial simplificationVolker Lendecke1-5/+1
(This used to be commit 616bc34744487450edd47e212a29c0f57eabb722)
2008-01-10Some more talloc_tos()Volker Lendecke1-7/+7
(This used to be commit 444e35e7df1f13fc285183da8fb41b30ad99a3fa)
2008-01-10use talloc_tos in a few more placesVolker Lendecke1-2/+2
(This used to be commit 65dd869bea351010c67f02046ae4134bdada1a4c)
2008-01-07Remove redundant parameter fd from SMB_VFS_GETLOCK().Michael Adam1-2/+2
Michael (This used to be commit ee5a20becdcdb20d7012732b324c6938fab44f67)
2008-01-07Do not talloc_strdup filename and servicepathVolker Lendecke1-16/+8
(This used to be commit 66be770993acf4e1673e9615bcddb21768c33e62)
2008-01-07Remove redundant parameter fd from SMB_VFS_LOCK().Michael Adam1-2/+2
Michael (This used to be commit 4f3ab2c406072e0b43581057e7e785e8ad454cfa)
2008-01-04allocate share_mode_str only when neededVolker Lendecke1-1/+4
(This used to be commit a98693bfa7bfe72ffa164d21b3e9636e268708aa)
2007-12-22Remove redundant connection_struct from fd_close_posix() parameter list.Michael Adam1-2/+2
Michael (This used to be commit f3365b74ac016eaee1e82eef769dd618af5df201)
2007-12-11Convert the posix_pending_close_db to dbwrap_rbtVolker Lendecke1-126/+130
(This used to be commit 841f4ccbfb5f79ac4f447342e9dd6ef73cacbc65)
2007-12-10Tiny simplificationsVolker Lendecke3-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)
2007-12-10Remove a staticVolker Lendecke1-11/+9
(This used to be commit 1f317f471af72f8bbc6c9fdd3e79a27c59e6fb6e)
2007-12-10Remove two staticsVolker Lendecke1-39/+17
(This used to be commit 8ee502e1e59960fd8db037f0adf1171b2a18cec5)
2007-11-18Add a commentVolker Lendecke1-1/+7
(This used to be commit 144014096a41de293ce7ec15f82681a469dd3aa1)
2007-11-18Fix a valgrind errorVolker Lendecke1-3/+4
(This used to be commit b82120f9b7f5aad83d8b4ece0261e9693eedca0c)
2007-11-15Add MAX_DNS_NAME_LENGTH, remove more pstrings.Jeremy Allison2-11/+14
Jeremy. (This used to be commit a1725f4ff7ed375808c78ac661b539557748d0a5)
2007-10-18RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison3-69/+69
bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
2007-10-10r25055: Add file_id_string_tosVolker Lendecke2-3/+3
This removes file_id_string_static and file_id_string_static2 (This used to be commit 638c848c9afe374feb30e34c494f89b2a6c64f7b)
2007-10-10r24571: Only look at errno if the close call actually failedVolker Lendecke1-1/+4
Patch from Ofir Azoulay <Ofir.Azoulay@expand.com> -- thanks (This used to be commit 888e657d758173c0eb4b68059d6fb5ae45b2b2ed)
2007-10-10r24266: Remove the "open files database hash size" parameterVolker Lendecke2-4/+2
This has been superseded by the "tdb_hashsize:<tdbname>" parameter (This used to be commit df40d336afd256f05a0ec3724cc2096fb7114d81)
2007-10-10r24117: use locking_key() instead of forming the TDB_DATA keyStefan Metzmacher1-4/+1
by hand metze (This used to be commit a7449e4ab390b3c1d9d5a0bbc466f71de17918e0)
2007-10-10r24034: Print the full cluster pid in print_lock_structVolker Lendecke1-2/+2
(This used to be commit ff1996ce4b0edfee90758c85ea0ac653877a1b9f)
2007-10-10r23956: merge from 3_2-ctdb-tridge:Stefan Metzmacher1-0/+8
fixed a bug with dead share mode entries jra: please tell me if it's ok to merge this to 3_2_0. metze (This used to be commit 044ac6afa7a36b352f4cb203879af082d4726417)
2007-10-10r23908: Fix bug with interaction of optimization withJeremy Allison1-8/+24
POSIX locking. We can't do lock counts with POSIX, so stop counting if we get a POSIX lock request. Jeremy. (This used to be commit a48e4a29e6774e5e72b9b361a17207b053474521)
2007-10-10r23885: Fix make test on opi.Volker Lendecke1-0/+1
(This used to be commit b2adb28808fe25d420bc12834ca8bc70779bb653)
2007-10-10r23882: Fix Coverity id 389 -- finally (I hope)Volker Lendecke1-7/+11
(This used to be commit 9b8f2d8bd144700306819480bcb260d2c20969ae)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell3-6/+3
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison3-3/+3
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r23759: Fix make test -- sorryVolker Lendecke1-2/+2
(This used to be commit cbbc70604e815f4ffd25d040ca0a4ef58e651523)
2007-10-10r23755: Fix Coverity id 384Volker Lendecke1-1/+7
(This used to be commit ebb410ca1e08d6f062154c9f8b3970682c6eeebd)
2007-10-10r23516: Fix bug found & fixed by Doug Rudoff (doug_rudoff@isilon.com)Jeremy Allison1-0/+6
- when cleaning up invalid locks make sure we mark the lck struct as modified so it'll get saved back correctly (that was the original intent). Jeremy. (This used to be commit cbf0829abcc3689edd7ab225054dfc79d43c6309)
2007-10-10r23510: Tidy calls to smb_panic by removing trailing newlines. Print theJames Peach3-28/+28
failed expression in SMB_ASSERT. (This used to be commit 171dc060e2a576d724eed1ca65636bdafffd7713)
2007-10-10r23486: Ok, this time with a hopefully successful make test in the right place:Volker Lendecke1-4/+0
Remove two local variables (This used to be commit 575e594e936c3cb197945063309f0b424dcdefc8)
2007-10-10r23316: Ouch... This would not have run in production without cluster codeVolker Lendecke1-2/+2
anyway. (This used to be commit ca1d0ff03d038372d5886ff1aa409494721142f4)
2007-10-10r23222: share_mode_forall() is only for counting and status display stuff, soVolker Lendecke1-1/+1
traverse_read is enough here (This used to be commit 40991badef046233326815e50097aa7f493790e8)
2007-10-10r23204: Add MSG_SMB_BRL_VALIDATE. Tridge, this is a bit different from your bzrVolker Lendecke1-0/+106
branch, please check if it fulfils your needs. Two changes: The validation is not done inside the brlock.c traverse_fn, it's done as a separate routine. Secondly, this patch does not call the checker routines in smbcontrol directly but depends on a running smbd. (This used to be commit 7e39d77c1f90d9025cab08918385d140e20ca25b)