From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <019206925c24941d4c6592964c40a290@terzarima.net> To: 9fans@cse.psu.edu Subject: Re: [9fans] kfs locks From: Charles Forsyth In-Reply-To: <200403071755.i27HtbcR080605@adat.davidashen.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-hyppkfntogjzlhknlxyqfqxuqq" Date: Sun, 7 Mar 2004 19:56:34 +0000 Topicbox-Message-UUID: 1f656536-eacd-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. --upas-hyppkfntogjzlhknlxyqfqxuqq Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit the intent is that the sync command ensures that all current IO has gone to disc without allowing file system activity meanwhile--that's what the rlock of mainlock does-- but syncproc is allowed to run concurrently with file system activity to encourage the disc to be reasonably up to date but without ensuring it. there are interlocks on the buffers themselves (for instance) to prevent confusion between several processes active at once, whether for file system activity or syncproc. --upas-hyppkfntogjzlhknlxyqfqxuqq Content-Type: message/rfc822 Content-Disposition: inline Received: from mail.cse.psu.edu ([130.203.4.6]) by lavoro; Sun Mar 7 17:56:48 GMT 2004 Received: by mail.cse.psu.edu (CSE Mail Server, from userid 60001) id E353B19DD2; Sun, 7 Mar 2004 12:57:14 -0500 (EST) Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.4.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 12E6A19AD3; Sun, 7 Mar 2004 12:57:12 -0500 (EST) X-Original-To: 9fans@cse.psu.edu Delivered-To: 9fans@cse.psu.edu Received: by mail.cse.psu.edu (CSE Mail Server, from userid 60001) id 5C4F319B11; Sun, 7 Mar 2004 12:56:40 -0500 (EST) Received: from adat.davidashen.net (unknown [217.113.20.242]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id E8A3E19A91 for <9fans@cse.psu.edu>; Sun, 7 Mar 2004 12:56:37 -0500 (EST) Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1]) by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id i27Htbiq080606 for <9fans@cse.psu.edu>; Sun, 7 Mar 2004 21:55:37 +0400 (AMT) (envelope-from dvd@adat.davidashen.net) Received: (from dvd@localhost) by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id i27HtbcR080605 for 9fans@cse.psu.edu; Sun, 7 Mar 2004 21:55:37 +0400 (AMT) From: David Tolpin Message-Id: <200403071755.i27HtbcR080605@adat.davidashen.net> To: 9fans@cse.psu.edu Content-Type: text/plain; charset=KOI8-R Subject: [9fans] kfs locks Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Sun, 7 Mar 2004 21:55:37 +0400 (AMT) X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on psuvax1.cse.psu.edu X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63 X-Spam-Level: Hi, cmd_sync sets rlock(&mainlock); ... syncall(); ... runlock(&mainlock); ... syncproc, the background process forked by kfs, runs syncblock() without setting rlock(&mainlock) Can it the cause that I am getting wrenwrite errors after 'check f' on startup, if cmd_sync is not called after cmd_check and before forking 'sync' and 'serve'? I am still struggling to understand the problem. I've changed the disk to be sure and still can reproduce the error if cmd_sync is not called after the list of free blocks is rebuilt after blackdown. David Tolpin --upas-hyppkfntogjzlhknlxyqfqxuqq--