Linux NFS development
 help / color / mirror / Atom feed
* Where Is Dirty Data Flushed During NFSv4 Delegation Recall?
@ 2025-09-11  2:30 Zhou Jifeng
  2025-09-11 14:29 ` Trond Myklebust
  0 siblings, 1 reply; 3+ messages in thread
From: Zhou Jifeng @ 2025-09-11  2:30 UTC (permalink / raw)
  To: linux-nfs

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Where Is Dirty Data Flushed During NFSv4 Delegation Recall?
  2025-09-11  2:30 Where Is Dirty Data Flushed During NFSv4 Delegation Recall? Zhou Jifeng
@ 2025-09-11 14:29 ` Trond Myklebust
  2025-09-15 11:23   ` Zhou Jifeng
  0 siblings, 1 reply; 3+ messages in thread
From: Trond Myklebust @ 2025-09-11 14:29 UTC (permalink / raw)
  To: Zhou Jifeng, linux-nfs

On Thu, 2025-09-11 at 10:30 +0800, Zhou Jifeng wrote:
> 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?
> 

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.

-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trondmy@kernel.org, trond.myklebust@hammerspace.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Where Is Dirty Data Flushed During NFSv4 Delegation Recall?
  2025-09-11 14:29 ` Trond Myklebust
@ 2025-09-15 11:23   ` Zhou Jifeng
  0 siblings, 0 replies; 3+ messages in thread
From: Zhou Jifeng @ 2025-09-15 11:23 UTC (permalink / raw)
  To: Trond Myklebust, linux-nfs

> > On Thu, 2025-09-11 at 10:30 +0800, Zhou Jifeng wrote:
> > 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?
> >
> 
> 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.
> 
-> -
> Trond Myklebust
> Linux NFS client maintainer, Hammerspace
> trondmy@kernel.org, trond.myklebust@hammerspace.com

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-15 11:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-11  2:30 Where Is Dirty Data Flushed During NFSv4 Delegation Recall? Zhou Jifeng
2025-09-11 14:29 ` Trond Myklebust
2025-09-15 11:23   ` Zhou Jifeng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox