s3: use monotonic clock for aio timeout
authorBjörn Jacke <bj@sernet.de>
Tue, 7 Sep 2010 01:29:19 +0000 (03:29 +0200)
committerBjörn Jacke <bj@sernet.de>
Tue, 7 Sep 2010 18:29:13 +0000 (20:29 +0200)
source3/smbd/aio.c

index 677fbb6764c306246a1659be0ae5ef0407c872a2..7a23d379181b3a90972aad1a6f40cef957718be1 100644 (file)
@@ -900,7 +900,7 @@ int wait_for_aio_completion(files_struct *fsp)
        struct aio_extra *aio_ex;
        const SMB_STRUCT_AIOCB **aiocb_list;
        int aio_completion_count = 0;
-       time_t start_time = time(NULL);
+       time_t start_time = time_mono(NULL);
        int seconds_left;
 
        for (seconds_left = SMB_TIME_FOR_AIO_COMPLETE_WAIT;
@@ -975,7 +975,7 @@ int wait_for_aio_completion(files_struct *fsp)
 
                SAFE_FREE(aiocb_list);
                seconds_left = SMB_TIME_FOR_AIO_COMPLETE_WAIT
-                       - (time(NULL) - start_time);
+                       - (time_mono(NULL) - start_time);
        }
 
        /* We timed out - we don't know why. Return ret if already an error,