From: "J. Bruce Fields" <bfields@fieldses.org>
To: Olga Kornievskaia <aglo@umich.edu>
Cc: "J. Bruce Fields" <bfields@redhat.com>,
Olga Kornievskaia <kolga@netapp.com>,
linux-nfs <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH v6 07/10] NFSD create new stateid for async copy
Date: Tue, 6 Mar 2018 14:33:11 -0500 [thread overview]
Message-ID: <20180306193311.GF7099@fieldses.org> (raw)
In-Reply-To: <CAN-5tyEJu0PZ8i+t5c6EGMSWuW=zpcH1+1z8W+mXNxt-rON9AQ@mail.gmail.com>
On Tue, Mar 06, 2018 at 12:15:59PM -0500, Olga Kornievskaia wrote:
> On Tue, Feb 20, 2018 at 1:48 PM, J. Bruce Fields <bfields@fieldses.org> wrote:
> > Yeah, I kinda suspect there's a bug in the CLOSE and UNLOCK case too.
> >
> > I don't know if the client really causes trouble for anyone but itself
> > if it allows IO to go on past close, unlock, or delegreturn.
> >
> > If it's still going on after another client acquires a conflicting open,
> > lock, or delegation, that could be a problem: a client that holds a
> > mandatory lock, or an open with DENY_WRITE, or a delegation, has a right
> > not to expect the file to change underneath it. We should already be
> > safe against that in the delegation case thanks to the vfs checks in
> > fs/locks.c:check_conflicting_open().
> >
> > In the DENY_WRITE case I bet there's still bug. Maybe in the mandatory
> > lock case, too. But those cases are rare and already have other
> > problems.
> >
> > So, I guess I don't care too much unless someone's seeing another
> > problem.
> >
> > Still, killing off a long-running copy is probably a good precaution?
>
> Now that I got back into the code and remembered it again, copy
> stateid is never associated with a delegation stateid. Copy is
> associated with the destination file's stateid which is opened for
> write. Since linux server does not give out write delegations, then
> the stateid is either an open stateid or lock stateid (in my testing I
> varied not locking and locking the destination file so to get open
> stateid as well as lock stateid to be used in the copy). If you want
> me to keep the code for killing off copy in the delegreturn because in
> the future there might be write delegations, I can but I recall the
> rule of thumb is to keep it simple, thus I'm inclined to remove it.
I'm hoping to get to write delegations soon.... And you can actually
write while holding a read delegation. (Currently knfsd breaks the
delegation in that case, but I'm fixing that.)
That said, I still haven't convinced myself there's any real issue here.
So, I'm fine with leaving that out.
--b.
next prev parent reply other threads:[~2018-03-06 19:33 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-24 17:47 [PATCH v6 00/10] NFSD support for asynchronous COPY Olga Kornievskaia
2017-10-24 17:47 ` [PATCH v6 01/10] NFSD CB_OFFLOAD xdr Olga Kornievskaia
2018-01-25 16:43 ` J. Bruce Fields
2018-01-26 15:16 ` Olga Kornievskaia
2017-10-24 17:47 ` [PATCH v6 02/10] NFSD OFFLOAD_STATUS xdr Olga Kornievskaia
2017-10-24 17:47 ` [PATCH v6 03/10] NFSD OFFLOAD_CANCEL xdr Olga Kornievskaia
2017-10-24 17:47 ` [PATCH v6 04/10] NFSD xdr callback stateid in async COPY reply Olga Kornievskaia
2017-10-24 17:47 ` [PATCH v6 05/10] NFSD first draft of async copy Olga Kornievskaia
2018-01-25 22:04 ` J. Bruce Fields
2018-01-26 15:17 ` Olga Kornievskaia
2018-02-15 19:59 ` Olga Kornievskaia
2018-02-15 20:06 ` J. Bruce Fields
2018-01-25 22:29 ` J. Bruce Fields
2018-01-26 15:17 ` Olga Kornievskaia
2018-01-26 21:34 ` J. Bruce Fields
2018-02-02 19:50 ` Olga Kornievskaia
2018-02-02 19:55 ` J. Bruce Fields
2017-10-24 17:47 ` [PATCH v6 06/10] NFSD return nfs4_stid in nfs4_preprocess_stateid_op Olga Kornievskaia
2017-10-24 17:47 ` [PATCH v6 07/10] NFSD create new stateid for async copy Olga Kornievskaia
2018-01-26 21:37 ` J. Bruce Fields
2018-01-26 21:59 ` J. Bruce Fields
2018-02-02 20:45 ` Olga Kornievskaia
2018-02-02 21:45 ` J. Bruce Fields
2018-02-15 22:18 ` Olga Kornievskaia
2018-02-16 1:43 ` J. Bruce Fields
2018-02-16 16:06 ` Olga Kornievskaia
2018-02-16 18:12 ` J. Bruce Fields
2018-02-16 20:53 ` Olga Kornievskaia
2018-02-20 18:48 ` J. Bruce Fields
2018-03-06 17:15 ` Olga Kornievskaia
2018-03-06 19:33 ` J. Bruce Fields [this message]
2017-10-24 17:47 ` [PATCH v6 08/10] NFSD handle OFFLOAD_CANCEL op Olga Kornievskaia
2018-02-16 17:28 ` Olga Kornievskaia
2018-02-16 18:10 ` J. Bruce Fields
2017-10-24 17:47 ` [PATCH v6 09/10] NFSD support OFFLOAD_STATUS Olga Kornievskaia
2017-10-24 17:47 ` [PATCH v6 10/10] NFSD stop queued async copies on client shutdown Olga Kornievskaia
2018-01-25 22:22 ` J. Bruce Fields
2018-01-26 15:17 ` Olga Kornievskaia
2017-11-03 19:57 ` [PATCH v6 00/10] NFSD support for asynchronous COPY Olga Kornievskaia
2017-11-10 15:01 ` Olga Kornievskaia
2017-11-14 0:48 ` J. Bruce Fields
2017-11-28 20:28 ` Olga Kornievskaia
2017-11-30 20:18 ` J. Bruce Fields
2017-11-30 23:03 ` Olga Kornievskaia
2017-12-04 21:32 ` J. Bruce Fields
[not found] ` <CAN-5tyEVSwBmPMtUBJYDdLi7FK2MNMGuDQrrsvp776zD3Jcw0w@mail.gmail.com>
2018-01-22 16:51 ` Olga Kornievskaia
2018-01-25 22:33 ` J. Bruce Fields
2018-01-26 15:16 ` Olga Kornievskaia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180306193311.GF7099@fieldses.org \
--to=bfields@fieldses.org \
--cc=aglo@umich.edu \
--cc=bfields@redhat.com \
--cc=kolga@netapp.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).