NFS dir timestamp question

scream29125_at_yahoo.com
Date: 05/09/05


Date: 9 May 2005 13:45:07 -0700

In my code compilation environment, I have setup my Makefile
dependencies to use a directory timestamp, like this:

abc: my_obj_dir
    $(CC) my_obj_dir/*.o $(LDFLAGS) -o abc

my_obj_dir contains a bunch of .o files. This method assumes that
whenever any file in my_obj_dir changes, the timestamp of my_obj_dir
changes too. So when any .o file gets updated, program "abc" will be
regenerated using those files. This provides an easy way to keep abc
up-to-date, even when the number of .o files in my_obj_dir changes.

This method works fine on locally mounted partitions, but it fails when
my_obj_dir is mounted over NFS. I found that when a new file gets
created in my_obj_dir, my_obj_dir's timestamp is updated, which is
expected. However, when an existing file gets changed/overwritten,
my_obj_dir's timestamp is NOT changed. Hence, abc is not regenerated.

This doesn't seem to be an NFS caching problem, because the timestamp
of my_obj_dir on the NFS server really did not change.

Is this an expected behavior with NFS? If so, what would be a better
solution to achieve the same dependency checking behavior as I
described above?

Thanks.



Relevant Pages

  • Re: optimistic locking using timestamp
    ... I have tried keyset, but the result is the same. ... Dim conn As New ADODB.Connection ... rs2.UpdateBatch ' this should fail, but it succeeded, code: abc ... If timestamp doesn't work, what do you suggest I do to provide ...
    (microsoft.public.vb.database.ado)
  • Re: panic: No NCF_TS
    ... the changes for fs/nfsclient. ... without a timestamp is just going to result in that name cache entry not ... struct nfsvattr nfsva, dnfsva; ... * must care about lookup caching hit rate, ...
    (freebsd-current)
  • Re: panic: No NCF_TS
    ... the changes for fs/nfsclient. ... without a timestamp is just going to result in that name cache entry not ...
    (freebsd-current)
  • Re: [BUG] NFS no longer updates file modification times appropriately
    ... 'cos NFS does not provide any device for ensuring that clocks ... > on client and server are synchronized. ... So allowing timestamp update on create/close but not writes ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)