From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sukadev Bhattiprolu Subject: Re: [RFC][PATCH 2/3][cr][v2]: Checkpoint/restart file leases Date: Fri, 30 Jul 2010 12:16:07 -0700 Message-ID: <20100730191607.GA16238@us.ibm.com> References: <1274836063-13271-1-git-send-email-sukadev@linux.vnet.ibm.com> <1274836063-13271-3-git-send-email-sukadev@linux.vnet.ibm.com> <4C170430.2030708@cs.columbia.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: serue@us.ibm.com, Matt Helsley , matthew@wil.cx, linux-fsdevel@vger.kernel.org, Containers , johnstul@us.ibm.com To: Oren Laadan Return-path: Received: from e34.co.us.ibm.com ([32.97.110.152]:49742 "EHLO e34.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757028Ab0G3TKz (ORCPT ); Fri, 30 Jul 2010 15:10:55 -0400 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e34.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id o6UJ2LDa017225 for ; Fri, 30 Jul 2010 13:02:21 -0600 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o6UJAgVa092402 for ; Fri, 30 Jul 2010 13:10:44 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o6UJAc4q029474 for ; Fri, 30 Jul 2010 13:10:39 -0600 Content-Disposition: inline In-Reply-To: <4C170430.2030708@cs.columbia.edu> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Oren Laadan [orenl@cs.columbia.edu] wrote: | | | > h->fl_type = lock->fl_type; | > + h->fl_type_prev = lock->fl_type_prev; | > h->fl_flags = lock->fl_flags; | > + if (h->fl_type & F_INPROGRESS && | > + (lock->fl_break_time > jiffies)) | > + h->fl_rem_lease = (lock->fl_break_time - jiffies) / HZ; | | Hmmm -- we have a ctx->ktime_begin marking the start of the checkpoint. | It is used for relative-time calculations, for example, the expiry of | restart-blocks and timeouts. I suggest that we use it here too to be | consistent. Well, I started off using ktime_begin but discussed this with John Stultz (CC'd here) who pointed out that mixing different domains of time is likely to cause errors. ktime is an absolute time and fl_break_time uses jiffies - a relative time. I think use of ktime_begin for restart_blocks is fine (since they use ktime_t) but using ktime_t for file leases and converting between jiffies and nanoseconds could be a problem, unless we convert fl_break_time to seconds. IOW, can we leave the above computation of ->fl_rem_lease for now ? Sukadev