Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1080319pxb; Thu, 23 Sep 2021 17:52:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfz9QQyFqxDZbMAS6K4DxGmA8RAeG01EkfyCCqU1N38/WC3c68IzoKogBz8UJ7TvIKgQ1j X-Received: by 2002:a05:6638:1444:: with SMTP id l4mr6727859jad.41.1632444771186; Thu, 23 Sep 2021 17:52:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632444771; cv=none; d=google.com; s=arc-20160816; b=soHshQkcmEnMD7N19yRDJSFEm+G9IvXKwrrT3CNU6Uuv78dcU6WEiCeOsA3UZIi9bD aRM6Ld4gRocsIMSEVN1KFNCvnL+g2pEubVbHWpMe6Hah+WfzgxkXETJbNtmoisoBScRH jHw1iAEAZlLLi1oS8sxVkj9m0AOIJxScqEm5OqZAKEmtFTsrWXzHqfqFT0JMLS0tqrrr JfWbzdB/pjLT1R1k9Ue4LVoXW4fLhbRgOQyN1H6Kzd0GJQQVoBDMlYzjxOCAmclhlyl0 IjRcz/Qvs8eNgKlEVlbQ+ODgs6U4nMgvTWH3vAL6JjffL2rRxciiVRSKxqJ3FkPhvFyE Wxuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=CWVoHnd9YD9j5Yfm2Ruc2Ef0D19E5HElFIQwBIliFRI=; b=VTs7BmbnvVcfNI48FXy/aVKO+8tatcLR1lME84AR6crb1U3LMnpU0tepvJbAkoE19+ ZXSReoUIaCvORxbKUxsxoD9mvHTFz/xRNMj4h93Tq54b6nbMroMOYAFSjdG3ehruor91 38MVjLa8GCMJ+91AwTEVezfKd9c+FW2SCpGANbVHTbr1+Yt7EQr5XlAN5rfjBSfIR875 817ZM3QW54fV0MPCoh1zwLJZod72YwbqLA+X6ZCJ0Fr6mC8fqAjcUCZfG+KTc3sArw7S tUYke6icF2ywmnY2MDy0xgHhG6wUu6o6O85nANxCrL1eAxAS6sQvp6Yt/eaTEDm9SEEr DMpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samba.org header.s=42 header.b=1lHliXFs; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=samba.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i12si7842790jaf.41.2021.09.23.17.52.27; Thu, 23 Sep 2021 17:52:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samba.org header.s=42 header.b=1lHliXFs; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=samba.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243667AbhIXAwx (ORCPT + 99 others); Thu, 23 Sep 2021 20:52:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232143AbhIXAww (ORCPT ); Thu, 23 Sep 2021 20:52:52 -0400 Received: from hr2.samba.org (hr2.samba.org [IPv6:2a01:4f8:192:486::2:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18EC9C061574; Thu, 23 Sep 2021 17:51:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=samba.org; s=42; h=Message-ID:Cc:To:From:Date; bh=CWVoHnd9YD9j5Yfm2Ruc2Ef0D19E5HElFIQwBIliFRI=; b=1lHliXFsFSgfm1zry+IZ6HB6Xg ZSJNdfTICvIWjmQ/Zl8b10WaII6d01xGsSLut7hm/ixypObNm/jZaeHwJY0jSXovqClylEvlGeJF+ nndX8mtTeg12WWYjT/IbQ7fOsVJdlWv/825t86zLSxkUwLkNArDjiIojUPobHH7Fc6ryuKDpcTSOB sXMh9UDM57eVjJXO6CB04Of/yCvhsWDlN7syxgNtKJHR5Deyu7wnDGs6zWg/1i38bIyWAf04ZFXXD dDkvlwgBitEn8JTinx3asfrZSoqrS8yYRr9ceWZItn+B3inCRGqXxdWFEH95eTFsH8cfSnF683S/s lyrI1SFdkdT/tZwWkrrcD3SrPgMhTq8eFwRVc5ILRXkHX3QdraHdjEPE2MaW3yp8ehpvz4POyepRy Ij/uyHHH7DausEvjCDnYEom5+eSkfjouBZp18z+Ww/42Ic4hOph7+Mpf7waxsutEoV3dYdfANVTL/ pAQ4fkzV5hlZpPrNt6UjOxQ+; Received: from [127.0.0.2] (localhost [127.0.0.1]) by hr2.samba.org with esmtpsa (TLS1.3:ECDHE_SECP256R1__ECDSA_SECP256R1_SHA256__CHACHA20_POLY1305:256) (Exim) id 1mTZQq-007an9-LO; Fri, 24 Sep 2021 00:51:17 +0000 Date: Thu, 23 Sep 2021 17:51:13 -0700 From: Jeremy Allison To: dai.ngo@oracle.com Cc: Bruce Fields , "linux-nfs@vger.kernel.org" , CIFS Subject: Re: Locking issue between NFSv4 and SMB client Message-ID: Reply-To: Jeremy Allison References: <5b7be2c0-95a6-048c-581f-17e5e3750daa@oracle.com> <20210923215056.GH18334@fieldses.org> <90a8f89b-e8ac-2187-2926-d723ebbcb839@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <90a8f89b-e8ac-2187-2926-d723ebbcb839@oracle.com> Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Thu, Sep 23, 2021 at 03:39:52PM -0700, dai.ngo@oracle.com wrote: > >On 9/23/21 2:50 PM, Bruce Fields wrote: >>On Thu, Jul 15, 2021 at 04:45:22PM -0700, dai.ngo@oracle.com wrote: >>>Hi Bruce, >>Oops, sorry for neglecting this. >> >>>I'm doing some locking testing between NFSv4 and SMB client and >>>think there are some issues on the server that allows both clients >>>to lock the same file at the same time. >>It's not too surprising to me that getting consistent locks between the >>two would be hard. >> >>Did you get any review from a Samba expert? I seem to recall it having >>a lot of options, and I wonder if it's configured correctly for this >>case. > >No, I have not heard from any Samba expert. > >> >>It sounds like Samba may be giving out oplocks without getting a lease >>from the kernel. > >I will have to circle back to this when we're done with the 1st >phase of courteous server. > >-Dai > >> >>--b. >> >>>Here is what I did: >>> >>>NOTE: lck is a simple program that use lockf(3) to lock a file from >>>offset 0 to the length specified by '-l'. What does lockf map to in NFS ? Samba only uses posix fcntl byte range locks (and only when told to map SMB locks onto underlying posix locks), we don't use lockf at all.