pvfs: add posix:writetimeupdatedelay option
authorStefan Metzmacher <metze@samba.org>
Tue, 3 Jun 2008 09:34:10 +0000 (11:34 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 3 Jun 2008 12:03:50 +0000 (14:03 +0200)
metze
(This used to be commit c3ba19ca62affced96b927fcbe63cf5d075aed22)

source4/ntvfs/posix/vfs_posix.c
source4/ntvfs/posix/vfs_posix.h

index 14b5210fd0e6ced1db9d99cd944b5cf13a2e984b..b5dd270346122ab5b169d28fdcf601fbce50d8ca 100644 (file)
@@ -95,6 +95,10 @@ static void pvfs_setup_options(struct pvfs_state *pvfs)
                                                      PVFS_OPLOCK_TIMEOUT,
                                                      PVFS_OPLOCK_TIMEOUT_DEFAULT);
 
+       pvfs->writetime_delay = share_int_option(scfg,
+                                                PVFS_WRITETIME_DELAY,
+                                                PVFS_WRITETIME_DELAY_DEFAULT);
+
        pvfs->share_name = talloc_strdup(pvfs, scfg->name);
 
        pvfs->fs_attribs = 
index d25f8a879e44f75556455651016f576617c00d1f..cf39bcf0ac0db318f0246dec8a65638b71f105db 100644 (file)
@@ -59,6 +59,9 @@ struct pvfs_state {
        /* the oplock break timeout (secs) */
        uint_t oplock_break_timeout;
 
+       /* the write time update delay (nsecs) */
+       uint_t writetime_delay;
+
        /* filesystem attributes (see FS_ATTR_*) */
        uint32_t fs_attribs;
 
@@ -258,6 +261,7 @@ struct pvfs_odb_retry;
 #define PVFS_FAKE_OPLOCKS              "posix:fakeoplocks"
 #define PVFS_SHARE_DELAY               "posix:sharedelay"
 #define PVFS_OPLOCK_TIMEOUT            "posix:oplocktimeout"
+#define PVFS_WRITETIME_DELAY           "posix:writetimeupdatedelay"
 #define PVFS_ALLOCATION_ROUNDING       "posix:allocationrounding"
 #define PVFS_SEARCH_INACTIVITY         "posix:searchinactivity"
 #define PVFS_ACL                       "posix:acl"
@@ -267,6 +271,7 @@ struct pvfs_odb_retry;
 #define PVFS_FAKE_OPLOCKS_DEFAULT              false
 #define PVFS_SHARE_DELAY_DEFAULT               1000000 /* nsecs */
 #define PVFS_OPLOCK_TIMEOUT_DEFAULT            30 /* secs */
+#define PVFS_WRITETIME_DELAY_DEFAULT           2000000 /* nsecs */
 #define PVFS_ALLOCATION_ROUNDING_DEFAULT       512
 #define PVFS_SEARCH_INACTIVITY_DEFAULT         300