Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 27 Aug 2002 00:31:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 27 Aug 2002 00:31:16 -0400 Received: from supreme.pcug.org.au ([203.10.76.34]:44246 "EHLO pcug.org.au") by vger.kernel.org with ESMTP id ; Tue, 27 Aug 2002 00:31:16 -0400 Date: Tue, 27 Aug 2002 14:35:17 +1000 From: Stephen Rothwell To: Jan Hudec Cc: bulb@cimice.maxinet.cz, linux-kernel@vger.kernel.org Subject: Re: Question about leases Message-Id: <20020827143517.40ba04f7.sfr@canb.auug.org.au> In-Reply-To: <20020827010616.GB16207@vagabond> References: <20020827010616.GB16207@vagabond> X-Mailer: Sylpheed version 0.8.1 (GTK+ 1.2.10; i386-debian-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1136 Lines: 26 On Tue, 27 Aug 2002 03:06:16 +0200 Jan Hudec wrote: > > Please can anyone throw a bit light on file leases (fcntl F_SETLEASE > command) or at least point me to some documentation? I can't find any. There isn't any (except maybe the talk I gave at Linux Kongress last year (http://www.canb.auug.org.au/~sfr/idle.html). > As far as I figured out process holding a lease is notified when other > process opens the leased file. But I am still not sure how the leases > should then be released and how the process knows which lease was broken > (struct siginfo does not seem to have union member for that case). To release a lease, you use fcntl(fd, F_SETLEASE, F_UNLCK). The file descriptor of the file that the lease is on is returned in the siginfo structure. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/