Skip to contentSkip to conversation

Where Is Dirty Data Flushed During NFSv4 Delegation Recall?

DISCUSSION Zhou Jifeng 2 participants 3 messages Sep 11, 2025 – Sep 15, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello everyone, I have a question that has been bothering me for a long
time. I would like to ask a familiar friend to help explain it. In the NFSv4 protocol, it is clearly defined that during the delegation RECALL
processing, the client needs to write the modified cache to the server side. However, throughout the process, I have not found the code for flushing dirty data in the kernel NFS client. I have repeatedly reviewed the code logic of nfs4_callback_recall and nfs4_state_manager, but still cannot understand where the dirty data is flushed.

My question is: When the client is handling the RECALL operation, where does the process of flushing the dirty data take place?

Best regards

maintainer
#1 lore raw
Quoted 14 lines · Zhou Jifeng

Hello everyone, I have a question that has been bothering me for a long
 time. I would like to ask a familiar friend to help explain it. In the NFSv4
 protocol, it is clearly defined that during the delegation RECALL processing, the client needs to write the modified cache to the server
side. However, throughout the process, I have not found the code for flushing dirty data in the kernel NFS client. I have repeatedly reviewed
the code logic of nfs4_callback_recall and nfs4_state_manager, but still
cannot understand where the dirty data is flushed.

Quoted 4 lines

My question is: When the client is handling the RECALL operation, where
does the process of flushing the dirty data take place?

The question of when to flush dirty data isn't determined by the NFSv4 RECALL operation spec. It is decided by the client caching model and by POSIX.
Please read the "nfs(5)" manpage and the section on close-to-open cache consistency.

Signature · 3 lines
Trond Myklebust
Linux NFS client maintainer, Hammerspace
[email protected], [email protected]
#2 lore raw
Quoted 20 lines
Quoted 15 lines · Zhou Jifeng

Hello everyone, I have a question that has been bothering me for a long
time. I would like to ask a familiar friend to help explain it. In
the NFSv4
protocol, it is clearly defined that during the delegation RECALL
processing, the client needs to write the modified cache to the server
side. However, throughout the process, I have not found the code for flushing dirty data in the kernel NFS client. I have repeatedly reviewed
the code logic of nfs4_callback_recall and nfs4_state_manager, but still
cannot understand where the dirty data is flushed.

Quoted 4 lines

My question is: When the client is handling the RECALL operation, where
does the process of flushing the dirty data take place?

Quoted 6 lines

The question of when to flush dirty data isn't determined by the NFSv4 RECALL operation spec. It is decided by the client caching model and by POSIX.
Please read the "nfs(5)" manpage and the section on close-to-open cache consistency.

-> -

Quoted 3 lines

Trond Myklebust
Linux NFS client maintainer, Hammerspace [email protected], [email protected]

Hi Trond,

The nfs(5) manual page and the close-to-open consistency you mentioned have been of great help to my understanding. Thank you very much.

Best regards
Zhou Jifeng