* It possible for invalidate_inode_pages2 to fail with an EBUSY
@ 2018-08-11 13:56 gy Lee
0 siblings, 0 replies; only message in thread
From: gy Lee @ 2018-08-11 13:56 UTC (permalink / raw)
To: linux-nfs
Hi,All,
My kernel version is 4.14.0, centos system.
I ran into a problem that was very similar to a previous question. The
git information for the problem is as follows:
commit id : 874f946376de57c8d6230b30ad71f742883fee3a
When invalidating the page cache for a regular file, we want to first
sync all dirty data to disk and then call invalidate_inode_pages2().
The latter relies on nfs_launder_page() and nfs_release_page() to deal
respectively with dirty pages, and unstable written pages. When commit
9590544694bec ("NFS: avoid deadlocks with loop-back mounted
NFS filesystems.") changed the behaviour of nfs_release_page(), then it
made it possible for invalidate_inode_pages2() to fail with an EBUSY.
Unfortunately, that error is then propagated back to read(). Let's
therefore work around the problem for now by protecting the call
to sync the data and invalidate_inode_pages2() so that they are atomic
w.r.t. the addition of new writes.
Later on, we can revisit whether or not we still need nfs_launder_page()
and nfs_release_page().
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
However, in the later revisions, the modification of this part was
modified, and now I have encountered this problem. I tried a lot of
methods and didn't solve the problem successfully, so I asked for help
from you.
My business model is mixed read and write, EBUSY error is returned in
the read request, and the function call flow is:
> nfs_file_read -> nfs_revalidate_mapping -> invalidate_inode_pages2 -> invalidate_inode_pages2_range -> invalidate_complete_page2 -> nfs_release_page -> PagePrivate(page)
PagePrivate(page) return true,so invalidate_inode_pages2_range return -EBUSY.
Thanks for any help!
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-08-11 16:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-11 13:56 It possible for invalidate_inode_pages2 to fail with an EBUSY gy Lee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).