From patchwork Mon Aug 20 06:56:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mkrtchyan, Tigran" X-Patchwork-Id: 10569963 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 80F5B921 for ; Mon, 20 Aug 2018 06:56:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E6E628923 for ; Mon, 20 Aug 2018 06:56:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6096B28B08; Mon, 20 Aug 2018 06:56:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HK_RANDOM_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D2ACF28923 for ; Mon, 20 Aug 2018 06:56:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725948AbeHTKLL (ORCPT ); Mon, 20 Aug 2018 06:11:11 -0400 Received: from smtp-o-1.desy.de ([131.169.56.154]:45402 "EHLO smtp-o-1.desy.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725944AbeHTKLL (ORCPT ); Mon, 20 Aug 2018 06:11:11 -0400 Received: from smtp-buf-1.desy.de (smtp-buf-1.desy.de [IPv6:2001:638:700:1038::1:a4]) by smtp-o-1.desy.de (DESY-O-1) with ESMTP id D29CA2807D6 for ; Mon, 20 Aug 2018 08:56:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp-o-1.desy.de D29CA2807D6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=desy.de; s=default; t=1534748204; bh=hkeM9CtzmTs9pX/VpG0cal3rMDgbDI1NBEhNQMt8nP4=; h=From:To:Cc:Subject:Date:From; b=fIVRsi9xBFCr9Lare1akLu+pH/d7jItCGuViCQ7oHsU98P18pPO+EP8j582MRZ/dN sD3ao9ZGwpuTmkKrYOVE1kv4kyZ8/ISGXghW8FD1fxYIPUUvh/1kpI72N9ivAduP5c Y+787eJWTx3SmC+5Wn4R0WnswRjMaU9j8u1R0Ox0= Received: from smtp-map-1.desy.de (smtp-map-1.desy.de [131.169.56.66]) by smtp-buf-1.desy.de (Postfix) with ESMTP id CCD991201D3; Mon, 20 Aug 2018 08:56:44 +0200 (CEST) X-Virus-Scanned: amavisd-new at desy.de Received: from anahit.desy.de (anahit.desy.de [131.169.185.68]) by smtp-intra-3.desy.de (DESY-INTRA-3) with ESMTP id D6A501568; Mon, 20 Aug 2018 08:56:43 +0200 (MEST) From: Tigran Mkrtchyan To: linux-nfs@vger.kernel.org Cc: trondmy@hammerspace.com, Anna.Schumaker@Netapp.com, Tigran Mkrtchyan Subject: [PATCH] nfs4: flex_file: ignore synthetic uid/gid for tightly coupled DSes Date: Mon, 20 Aug 2018 08:56:08 +0200 Message-Id: <20180820065608.11860-1-tigran.mkrtchyan@desy.de> X-Mailer: git-send-email 2.17.1 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP for tightly coupled DSes client must ignore provided synthetic uid and gid as stated in draft-ietf-nfsv4-flex-files-19#section-5.1. Signed-off-by: Tigran Mkrtchyan --- fs/nfs/flexfilelayout/flexfilelayoutdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c index d62279d3fc5d..290625cfd369 100644 --- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c +++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c @@ -452,7 +452,7 @@ ff_layout_get_ds_cred(struct pnfs_layout_segment *lseg, u32 ds_idx, struct nfs4_ff_layout_mirror *mirror = FF_LAYOUT_COMP(lseg, ds_idx); struct rpc_cred *cred; - if (mirror) { + if (mirror && !mirror->mirror_ds->ds_versions[0].tightly_coupled) { cred = ff_layout_get_mirror_cred(mirror, lseg->pls_range.iomode); if (!cred) cred = get_rpccred(mdscred);