Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1223830ybl; Fri, 6 Dec 2019 13:27:49 -0800 (PST) X-Google-Smtp-Source: APXvYqzCx7/g/MN/c8urhzZzvFHHHfNSNVU4WQV4X8a8IYWhJo95XpjGZwPST5+4JWkKX8gsxSui X-Received: by 2002:a9d:644:: with SMTP id 62mr13296000otn.287.1575667669251; Fri, 06 Dec 2019 13:27:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575667669; cv=none; d=google.com; s=arc-20160816; b=JZZKzKspodFayjMuZydlLyrKS+c8TgAN/gcEelAoliN0iBethyDtYNYMwm4u0JeKUq Z+gj1wZ9oR06nwiYhPjxjMgwQ5uLcn344q6mp6QbtAOHchk/SQrUpMaxXjhjXu5xaOnV M91uX3iipIHNhWW48ne/UZmZcccjyY9iGsZvzkni2FJ9pbAXqhBHxLDGgRCs0IGEuLTD jjhFof4zueMKEMycoaRwa7fRXgI488PIxWwugU2Lyj+nEp84+OoXOOlyXFnXmhmgrMNy dC2S2Dyfy/pAkIOSturHFrSFk35dD2E6wZmvP3LeRfowqIK0jjeCgiAERjpM316ez6zh YKxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=cs7g9VJVPwmEyuFJS1ZM7Ruc9x7OMrsvL7hfbuQqpys=; b=O+PWo7sTqh5zIgNQLr/wksHRtWOkRDi72F1v9uSk9o2NjzNpSzTxgQRqtJhECsu7Ag dPHqCnuy7OlTrolngYoQOXAeUC7b+XTyQfwFQ/sVoNcQjBZoneP5AuMYpqXxjfqqZQl/ tFZ45VVfs78r/RUJRMOSZgrhQ64+t1n4iCnO2tXreukCOjrD1Rr9boD8W9dxXPOUkQOj E+aXabc3Gk83triz4JQzFulHvwzbcQaCACb2G4mgVkiVs1NnKliAfRf0TLBCd0KAzcdd Mkh5omXlgNbkFm8MbpwrV5smJoKxsszVFadYej4wVaa+sU8bYvU2icT4dmSeR1LKreil cbnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XAChXNBb; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y8si7930793oih.141.2019.12.06.13.27.37; Fri, 06 Dec 2019 13:27:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XAChXNBb; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726371AbfLFV1g (ORCPT + 99 others); Fri, 6 Dec 2019 16:27:36 -0500 Received: from mail-ua1-f68.google.com ([209.85.222.68]:38786 "EHLO mail-ua1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726330AbfLFV1g (ORCPT ); Fri, 6 Dec 2019 16:27:36 -0500 Received: by mail-ua1-f68.google.com with SMTP id z17so3459033uac.5 for ; Fri, 06 Dec 2019 13:27:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cs7g9VJVPwmEyuFJS1ZM7Ruc9x7OMrsvL7hfbuQqpys=; b=XAChXNBb4DN47H5DUBusaZdMbeGRGlrTdYQ+MuHM9pkx18Y/NbmXGcw5and3nCE4Pp h63Ud8fBztwAav2JppmcSwSnjV0CF/faUiFpTgTF5DeTAgvlP05hsm23Yie+X8n7YOrW 2jkfnb+lUCiqJ/T5sO4G5BM2kz+XAe732UkUZLa+mNANsT0gHalA88LeViwmdW4pBRJy TKq9WYF24D/Wnq5W52yGvTESqNUwS7iB2DUVg1M2e2kDQXwSMEGnX28upnIbtBbuW1yl DlbL5leWAmuv0ZJHXBwT6DeV6pqrnaiEPZ9AMFQLW0QFOgsfuO7myiarpiRNwmNT4CNP XWbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cs7g9VJVPwmEyuFJS1ZM7Ruc9x7OMrsvL7hfbuQqpys=; b=RrHrdBLjruoS6J7TfnRvJoAKYDZ8bwrbOY5GcnLg0xhE5ZLYi+jlbE8Vu/ArWZtbg9 w2AlyAWVSsWpNJDCqgYA6eBG1yVknxNGPQIfI/NNkqzlwbT1wVdXDr+vFKY9GLBtgkjr WFdCth4V+D7QK2XRt8hyicg6abAUca+CJFvdsC3XBdfcG0qe8UYkALYrGsa94M2/pZRU EjZFwj5onkUoUWMKzj/1drbZF0PfnJtHwhcyM0XZyQM2+Q3iVz3A9gt+/Qdv7C6NlZ7h A4yVaQygam1zCtWabEwYHihi3hasco+6RAMvO1E6wirdX5L3hfwq4RINOGh/NGwII7AM 3mQw== X-Gm-Message-State: APjAAAWol3OaOAzDSOBJ6lY5bZ5Apa55eVhyByuQImphG/qCIMaH7DHJ qKLnALIovjspMKwuHRO8hWgTeh5tFYfCfrXldU8= X-Received: by 2002:ab0:6418:: with SMTP id x24mr14943439uao.40.1575667655065; Fri, 06 Dec 2019 13:27:35 -0800 (PST) MIME-Version: 1.0 References: <20191204080039.ixjqetefkzzlldyt@kili.mountain> <20191204220435.GG40361@pick.fieldses.org> <20191205023826.GA43279@pick.fieldses.org> <20191206211442.GB17524@fieldses.org> <20191206211538.GC17524@fieldses.org> In-Reply-To: <20191206211538.GC17524@fieldses.org> From: Olga Kornievskaia Date: Fri, 6 Dec 2019 16:27:24 -0500 Message-ID: Subject: Re: [bug report] NFSD: allow inter server COPY to have a STALE source server fh To: "J. Bruce Fields" Cc: "J. Bruce Fields" , Dan Carpenter , linux-nfs Content-Type: text/plain; charset="UTF-8" Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Fri, Dec 6, 2019 at 4:15 PM J. Bruce Fields wrote: > > On Fri, Dec 06, 2019 at 04:14:42PM -0500, bfields wrote: > > On Wed, Dec 04, 2019 at 09:38:26PM -0500, J. Bruce Fields wrote: > > > So, stuff we could do: > > > > > > - add an extra check of fh_export or something here. > > > > So, I'm applying the following for now. > > + if (current->fh->fh_export && > ^^^ > > Um, maybe with a typo or two fixed. > > > > + need_wrongsec_check(rqstp)) > > op->status = check_nfsd_access(current_fh->fh_export, rqstp); > > } > > encode_op: Sure thing. But I just finished up and have hacked up the client to send a GETATTR after the 1st PUTFH in the COPY compound of the inter copy. The server doesn't croak but returns an ERR_STALE on the 1st PUTFH (I believe this is due to the logic that it's not a valid inter COPY compound.. so logic works). but I have nothing against adding the check.