Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How does AFS maintain consistency on read-write files?

0
10 Posted

How does AFS maintain consistency on read-write files?

0

AFS uses a mechanism called “callback”. Callback is a promise from the fileserver that the cache version of a file/directory is up-to-date. It is established by the fileserver with the caching of a file. When a file is modified the fileserver breaks the callback. When the user accesses the file again the Cache Manager fetches a new copy if the callback has been broken. The following paragraphs describe AFS callback mechanism in more detail: If I open() fileA and start reading, and you then open() fileA, write() a change ***and close() or fsync()*** the file to get your changes back to the server – at the time the server accepts and writes your changes to the appropriate location on the server disk, the server also breaks callbacks to all clients to which it issued a copy of fileA. So my client receives a message to break the callback on fileA, which it dutifully does. But my application (editor, spreadsheet, whatever I’m using to read fileA) is still running, and doesn’t really care th

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123