* NFS client behaviour with soft mount @ 2016-09-21 14:19 Mayur Bajaj 2016-09-21 14:41 ` Trond Myklebust 0 siblings, 1 reply; 5+ messages in thread From: Mayur Bajaj @ 2016-09-21 14:19 UTC (permalink / raw) To: linux-nfs Hello, I have a question regarding NFS client behaviour with soft mount. I have gone through the code but could not figure out. Can someone please help me. An application is writing data via NFS client (soft mount, with sync mount option NOT set). The Application thinks that data written was successful but that is not the case. The NFS client will cache all the write request and flush after some time/threshold. The NFS sever is not responding. NFS client retries for 3 times (or retrans) and give up as the NFS server is not responding. Will this cache pages be pinned in memory for ever or freed up (marked clean) as the operation has failed? Will NFS client keep on retrying again? Thanks in advance Mayur ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: NFS client behaviour with soft mount 2016-09-21 14:19 NFS client behaviour with soft mount Mayur Bajaj @ 2016-09-21 14:41 ` Trond Myklebust 2016-09-22 4:39 ` Mayur Bajaj 0 siblings, 1 reply; 5+ messages in thread From: Trond Myklebust @ 2016-09-21 14:41 UTC (permalink / raw) To: Mayur Bajaj; +Cc: List Linux NFS Mailing > On Sep 21, 2016, at 10:19, Mayur Bajaj <mbajaj@maprtech.com> wrote: >=20 > Hello, >=20 > I have a question regarding NFS client behaviour with soft mount. I > have gone through the code but could not figure out. Can someone > please help me. >=20 > An application is writing data via NFS client (soft mount, with sync > mount option NOT set). The Application thinks that data written was > successful but that is not the case. > The NFS client will cache all the write request and flush after some > time/threshold. The NFS sever is not responding. NFS client retries > for 3 times (or retrans) and give up as the NFS server is not > responding. >=20 > Will this cache pages be pinned in memory for ever or freed up (marked > clean) as the operation has failed? > Will NFS client keep on retrying again? The behaviour in the above situation is completely undefined. You may have = bits and pieces of data persisted on the server or not, and cached data may= end up getting resent after the EIO was returned to the application. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: NFS client behaviour with soft mount 2016-09-21 14:41 ` Trond Myklebust @ 2016-09-22 4:39 ` Mayur Bajaj 2016-09-22 4:55 ` Trond Myklebust 0 siblings, 1 reply; 5+ messages in thread From: Mayur Bajaj @ 2016-09-22 4:39 UTC (permalink / raw) To: Trond Myklebust; +Cc: List Linux NFS Mailing Thanks for the response. Incomplete data on server (NFS) is alright. I wanted to know what happens to the dirty cache pages (on NFS client with soft mount and sync flag not set) after the NFS client has retried for 3 times (or retrans). Will the NFS client retry or give up and clean up the dirty cache pages (and the dirty inode). Mayur On Wed, Sep 21, 2016 at 8:11 PM, Trond Myklebust <trondmy@primarydata.com> wrote: > >> On Sep 21, 2016, at 10:19, Mayur Bajaj <mbajaj@maprtech.com> wrote: >> >> Hello, >> >> I have a question regarding NFS client behaviour with soft mount. I >> have gone through the code but could not figure out. Can someone >> please help me. >> >> An application is writing data via NFS client (soft mount, with sync >> mount option NOT set). The Application thinks that data written was >> successful but that is not the case. >> The NFS client will cache all the write request and flush after some >> time/threshold. The NFS sever is not responding. NFS client retries >> for 3 times (or retrans) and give up as the NFS server is not >> responding. >> >> Will this cache pages be pinned in memory for ever or freed up (marked >> clean) as the operation has failed? >> Will NFS client keep on retrying again? > > > The behaviour in the above situation is completely undefined. You may have bits and pieces of data persisted on the server or not, and cached data may end up getting resent after the EIO was returned to the application. > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: NFS client behaviour with soft mount 2016-09-22 4:39 ` Mayur Bajaj @ 2016-09-22 4:55 ` Trond Myklebust 2016-09-22 4:59 ` Mayur Bajaj 0 siblings, 1 reply; 5+ messages in thread From: Trond Myklebust @ 2016-09-22 4:55 UTC (permalink / raw) To: Mayur Bajaj; +Cc: List Linux NFS Mailing > On Sep 22, 2016, at 00:39, Mayur Bajaj <mbajaj@maprtech.com> wrote: >=20 > Thanks for the response. >=20 > Incomplete data on server (NFS) is alright. I wanted to know what > happens to the dirty cache pages (on NFS client with soft mount and > sync flag not set) after the NFS client has retried for 3 times (or > retrans). Will the NFS client retry or give up and clean up the dirty > cache pages (and the dirty inode). As I said below, that behaviour is completely undefined. The page may end u= p being discarded, or it may end up persisting in the page cache. If you wa= nt to be certain that any remaining dirty pages in the page cache have been= cleaned, then you need to successfully fsync() the file to disk. >=20 > Mayur >=20 > On Wed, Sep 21, 2016 at 8:11 PM, Trond Myklebust > <trondmy@primarydata.com> wrote: >>=20 >>> On Sep 21, 2016, at 10:19, Mayur Bajaj <mbajaj@maprtech.com> wrote: >>>=20 >>> Hello, >>>=20 >>> I have a question regarding NFS client behaviour with soft mount. I >>> have gone through the code but could not figure out. Can someone >>> please help me. >>>=20 >>> An application is writing data via NFS client (soft mount, with sync >>> mount option NOT set). The Application thinks that data written was >>> successful but that is not the case. >>> The NFS client will cache all the write request and flush after some >>> time/threshold. The NFS sever is not responding. NFS client retries >>> for 3 times (or retrans) and give up as the NFS server is not >>> responding. >>>=20 >>> Will this cache pages be pinned in memory for ever or freed up (marked >>> clean) as the operation has failed? >>> Will NFS client keep on retrying again? >>=20 >>=20 >> The behaviour in the above situation is completely undefined. You may ha= ve bits and pieces of data persisted on the server or not, and cached data = may end up getting resent after the EIO was returned to the application. >>=20 >=20 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: NFS client behaviour with soft mount 2016-09-22 4:55 ` Trond Myklebust @ 2016-09-22 4:59 ` Mayur Bajaj 0 siblings, 0 replies; 5+ messages in thread From: Mayur Bajaj @ 2016-09-22 4:59 UTC (permalink / raw) To: Trond Myklebust; +Cc: List Linux NFS Mailing Thanks a lot. On Thu, Sep 22, 2016 at 10:25 AM, Trond Myklebust <trondmy@primarydata.com> wrote: > >> On Sep 22, 2016, at 00:39, Mayur Bajaj <mbajaj@maprtech.com> wrote: >> >> Thanks for the response. >> >> Incomplete data on server (NFS) is alright. I wanted to know what >> happens to the dirty cache pages (on NFS client with soft mount and >> sync flag not set) after the NFS client has retried for 3 times (or >> retrans). Will the NFS client retry or give up and clean up the dirty >> cache pages (and the dirty inode). > > As I said below, that behaviour is completely undefined. The page may end= up being discarded, or it may end up persisting in the page cache. If you = want to be certain that any remaining dirty pages in the page cache have be= en cleaned, then you need to successfully fsync() the file to disk. > >> >> Mayur >> >> On Wed, Sep 21, 2016 at 8:11 PM, Trond Myklebust >> <trondmy@primarydata.com> wrote: >>> >>>> On Sep 21, 2016, at 10:19, Mayur Bajaj <mbajaj@maprtech.com> wrote: >>>> >>>> Hello, >>>> >>>> I have a question regarding NFS client behaviour with soft mount. I >>>> have gone through the code but could not figure out. Can someone >>>> please help me. >>>> >>>> An application is writing data via NFS client (soft mount, with sync >>>> mount option NOT set). The Application thinks that data written was >>>> successful but that is not the case. >>>> The NFS client will cache all the write request and flush after some >>>> time/threshold. The NFS sever is not responding. NFS client retries >>>> for 3 times (or retrans) and give up as the NFS server is not >>>> responding. >>>> >>>> Will this cache pages be pinned in memory for ever or freed up (marked >>>> clean) as the operation has failed? >>>> Will NFS client keep on retrying again? >>> >>> >>> The behaviour in the above situation is completely undefined. You may h= ave bits and pieces of data persisted on the server or not, and cached data= may end up getting resent after the EIO was returned to the application. >>> >> > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-09-22 4:59 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-09-21 14:19 NFS client behaviour with soft mount Mayur Bajaj 2016-09-21 14:41 ` Trond Myklebust 2016-09-22 4:39 ` Mayur Bajaj 2016-09-22 4:55 ` Trond Myklebust 2016-09-22 4:59 ` Mayur Bajaj
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).