svn commit: samba r3532 - in branches/SAMBA_4_0/source/ntvfs/posix:
.
tridge at samba.org
tridge at samba.org
Thu Nov 4 13:27:30 GMT 2004
Author: tridge
Date: 2004-11-04 13:27:29 +0000 (Thu, 04 Nov 2004)
New Revision: 3532
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=3532
Log:
make sharing violation delay in pvfs configurable with "posix:sharedelay = usecs"
Modified:
branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c
branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c
branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.h
Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c 2004-11-04 13:15:22 UTC (rev 3531)
+++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c 2004-11-04 13:27:29 UTC (rev 3532)
@@ -34,8 +34,6 @@
#define PVFS_MIN_NEW_FNUM 0x200
#define PVFS_MIN_DIR_FNUM 0x300
-#define SHARING_VIOLATION_DELAY 1000000
-
/*
find open file handle given fnum
*/
@@ -540,7 +538,7 @@
r->io = io;
r->f = f;
r->req = req;
- r->end_time = timeval_current_ofs(0, SHARING_VIOLATION_DELAY);
+ r->end_time = timeval_current_ofs(0, pvfs->sharing_violation_delay);
r->open_flags = open_flags;
/* setup a pending lock */
Modified: branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c 2004-11-04 13:15:22 UTC (rev 3531)
+++ branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.c 2004-11-04 13:27:29 UTC (rev 3532)
@@ -34,6 +34,7 @@
static void pvfs_setup_options(struct pvfs_state *pvfs)
{
int snum = pvfs->tcon->service;
+ int delay;
if (lp_map_hidden(snum)) pvfs->flags |= PVFS_FLAG_MAP_HIDDEN;
if (lp_map_archive(snum)) pvfs->flags |= PVFS_FLAG_MAP_ARCHIVE;
@@ -43,6 +44,12 @@
if (lp_strict_locking(snum)) pvfs->flags |= PVFS_FLAG_STRICT_LOCKING;
if (lp_ci_filesystem(snum)) pvfs->flags |= PVFS_FLAG_CI_FILESYSTEM;
+ pvfs->sharing_violation_delay = 1000000;
+ delay = lp_parm_int(snum, "posix", "sharedelay");
+ if (delay != -1) {
+ pvfs->sharing_violation_delay = delay;
+ }
+
pvfs->share_name = talloc_strdup(pvfs, lp_servicename(snum));
}
Modified: branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.h
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.h 2004-11-04 13:15:22 UTC (rev 3531)
+++ branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.h 2004-11-04 13:27:29 UTC (rev 3532)
@@ -50,6 +50,9 @@
/* a list of pending async requests. Needed to support
ntcancel */
struct pvfs_wait *wait_list;
+
+ /* the sharing violation timeout */
+ uint_t sharing_violation_delay;
};
More information about the samba-cvs
mailing list