c - force attribute refresh in NFS -


i don't know if asking right, part of problem. use nfs on our linux boxes. have mounts directories on file servers. use 1 hour attribute timeouts , 1 hour data timeouts. have models of writing files. 1) add end of files. when adding end of files, keep same file name. 2) changing written data. when changing file, change file name. idea work caching, because data gets written file never changed. need 1 more thing make work. current settings, "bus error" when access newly added part of file using mmap when part of file didnt exist @ time attributes cached. makes sense , expected. force nfs refresh file attributes knows file larger now. in perfect world, when got bus error. so... there command can execute c or shell can this?

edit got down voted, guess question stupid. maybe more information help. when use mount has long attribute , data refresh, microsecond performance require. when use mount short attribute refresh, becomes 1000x slower. need attribute refresh when bus error. linux, there chance method exists force refresh. our data changes once every 20 minutes explore refresh on demand scenario.

nfs uses "close-to-open cache consistency". according manual (man nfs), "when application opens file stored on nfs server, nfs client checks still exists on server , permitted opener sending getattr or access request".

according a8 of faq, "linux implements close-to-open cache consistency comparing results of getattr operation done after file closed results of getattr operation done when file next opened. if results same, client assume data cache still valid; otherwise, cache purged."

i think should close , reopen (and re-mmap) file when "bus error".

p.s. question, way.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -