Return-Path: Received: from mail-bw0-f46.google.com ([209.85.214.46]:59328 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754068Ab1BGPa0 convert rfc822-to-8bit (ORCPT ); Mon, 7 Feb 2011 10:30:26 -0500 Received: by bwz15 with SMTP id 15so5006638bwz.19 for ; Mon, 07 Feb 2011 07:29:46 -0800 (PST) In-Reply-To: References: <1296855242-2592-1-git-send-email-andros@netapp.com> <1296855242-2592-2-git-send-email-andros@netapp.com> <1296855242-2592-3-git-send-email-andros@netapp.com> <1296855242-2592-4-git-send-email-andros@netapp.com> <1296855242-2592-5-git-send-email-andros@netapp.com> <1296855242-2592-6-git-send-email-andros@netapp.com> <1296855242-2592-7-git-send-email-andros@netapp.com> <1296855242-2592-8-git-send-email-andros@netapp.com> <1296855242-2592-9-git-send-email-andros@netapp.com> <1296855242-2592-10-git-send-email-andros@netapp.com> <1296855242-2592-11-git-send-email-andros@netapp.com> <1296855242-2592-12-git-send-email-andros@netapp.com> <1296855242-2592-13-git-send-email-andros@netapp.com> <1296855242-2592-14-git-send-email-andros@netapp.com> <1296855242-2592-15-git-send-email-andros@netapp.com> <1296855242-2592-16-git-send-email-andros@netapp.com> <1296855242-2592-17-git-send-email-andros@netapp.com> <1296855242-2592-18-git-send-email-andros@netapp.com> <1296855242-2592-19-git-send-email-andros@netapp.com> <1296855242-2592-20-git-send-email-andros@netapp.com> <1296855242-2592-21-git-send-email-andros@netapp.com> <1296855242-2592-22-git-send-email-andros@netapp.com> <1296855242-2592-23-git-send-email-andros@netapp.com> <1296855242-2592-24-git-send-email-andros@netapp.com> Date: Mon, 7 Feb 2011 10:29:46 -0500 Message-ID: Subject: Re: [PATCH 23/40] SQUASHME pnfs-submit wave3 new function for ds expired lease From: Fred Isaman To: "William A. (Andy) Adamson" Cc: bhalevy@panasas.com, linux-nfs@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-nfs-owner@vger.kernel.org List-ID: MIME-Version: 1.0 On Mon, Feb 7, 2011 at 10:05 AM, William A. (Andy) Adamson wrote: > On Sun, Feb 6, 2011 at 2:41 PM, Fred Isaman wrote: >> On Sat, Feb 5, 2011 at 11:46 AM, William A. (Andy) Adamson >> wrote: >>> On Fri, Feb 4, 2011 at 4:51 PM, Fred Isaman wrote: >>>> On Fri, Feb 4, 2011 at 4:33 PM, ? wrote: >>>>> From: Andy Adamson >>>>> >>>>> Signed-off-by: Andy Adamson >>>>> --- >>>>> ?fs/nfs/nfs4proc.c | ? 11 ++++++++--- >>>>> ?1 files changed, 8 insertions(+), 3 deletions(-) >>>>> >>>>> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c >>>>> index 9c50be7..fb22cbf 100644 >>>>> --- a/fs/nfs/nfs4proc.c >>>>> +++ b/fs/nfs/nfs4proc.c >>>>> @@ -1574,7 +1574,7 @@ static int _nfs4_proc_open(struct nfs4_opendata *data) >>>>> ? ? ? ?return 0; >>>>> ?} >>>>> >>>>> -int nfs4_recover_expired_lease(struct nfs_client *clp) >>>>> +static int nfs4_client_recover_expired_lease(struct nfs_client *clp) >>>>> ?{ >>>>> ? ? ? ?unsigned int loop; >>>>> ? ? ? ?int ret; >>>>> @@ -1593,6 +1593,11 @@ int nfs4_recover_expired_lease(struct nfs_client *clp) >>>>> ?} >>>>> ?EXPORT_SYMBOL(nfs4_recover_expired_lease); >>>>> >>>>> +static int nfs4_recover_expired_lease(struct nfs_server *server) >>>>> +{ >>>>> + ? ? ? return nfs4_client_recover_expired_lease(server->nfs_client); >>>>> +} >>>>> + >>>> >>>> Why are we doing this extra indirection? >>> >>> As Trond pointed out, it is a lot less intrusive to the existing code. >>> >>> -->Andy >>> >> >> I must be missing something. ?What I see is that you are changing the >> arguments to a function that is called exactly twice, and creating a >> totally unnecessary subfunction ?nfs4_client_recover_expired_lease. >> How is this less intrusive than just directly inlining >> nfs4_client_recover_expired_lease? > > This patch reverts the change made in pnfs_submit: filelayout i/o > helpers which changed the argument from nfs_server to nfs_client. > which changed the two calls. That is more intrusive to what this patch > does which is to leave the two calls alone. ?Adding > nfs4_client_recover_expired_lease lets us call it with struct > nfs_client from the data server code without changing the existing > calls and is therefore less intrusive. > > -->Andy >> Ah, that is what I missed. I did not understand that this was reverting a previous change. Fred