Skip to content
Browse files

WIN32: make pagecache ttl of type time_t

We both compare and compute using the ttl value with variables of
type time_t. Thus is makes most sense to have ttl as time_t too.
  • Loading branch information...
sahlberg committed Sep 21, 2016
1 parent c000bf2 commit 3d1351bf8258c836f0624a86ae5c6fa785c6488e
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/libnfs.c
@@ -115,7 +115,7 @@ struct nfs_pagecache_entry {
struct nfs_pagecache {
struct nfs_pagecache_entry *entries;
uint32_t num_entries;
uint32_t ttl;
time_t ttl;

struct nfsfh {
@@ -222,6 +222,7 @@ void nfs_pagecache_put(struct nfs_pagecache *pagecache, uint64_t offset, char *b
uint32_t entry = nfs_pagecache_hash(pagecache, page_offset);
struct nfs_pagecache_entry *e = &pagecache->entries[entry];
size_t n = MIN(NFS_BLKSIZE - offset % NFS_BLKSIZE, len);

/* we can only write to the cache if we add a full page or
* partially update a page that is still valid */
if (n == NFS_BLKSIZE ||

0 comments on commit 3d1351b

Please sign in to comment.
You can’t perform that action at this time.