From: Sukadev Bhattiprolu Subject: Re: [PATCH 6/9][cr][v2]: Checkpoint file-locks Date: Wed, 28 Jul 2010 12:26:49 -0700 Message-ID: <20100728192649.GB14570@us.ibm.com> References: <1274238452-15382-1-git-send-email-sukadev@linux.vnet.ibm.com> <1274238452-15382-7-git-send-email-sukadev@linux.vnet.ibm.com> <4C16FDE7.7050709@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 To: Oren Laadan Return-path: Received: from e36.co.us.ibm.com ([32.97.110.154]:41730 "EHLO e36.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751159Ab0G1TV0 (ORCPT ); Wed, 28 Jul 2010 15:21:26 -0400 Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by e36.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id o6SJHoRq002578 for ; Wed, 28 Jul 2010 13:17:50 -0600 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o6SJLMmP105648 for ; Wed, 28 Jul 2010 13:21:24 -0600 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o6SJLKlG005696 for ; Wed, 28 Jul 2010 13:21:21 -0600 Content-Disposition: inline In-Reply-To: <4C16FDE7.7050709@cs.columbia.edu> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Oren Laadan [orenl@cs.columbia.edu] wrote: | | | > + if (lock) { | > + h->fl_start = lock->fl_start; | > + h->fl_end = lock->fl_end; | > + h->fl_type = lock->fl_type; | > + h->fl_flags = lock->fl_flags; | > + } else { | > + /* Checkpoint a dummy lock as a marker */ | > + h->fl_start = -1; | | Maybe designate some constant for this ? e.g. CKPT_FLOCK_NONE ? | In any case, you need a (loff_t) -1 (like in the restore code). Ok. Defining macros CKPT_HDR_SET_MARKER_LOCK() and CKPT_HDR_CHECK_MARKER_LOCK(). Also added the missing (loff_t).