From owner-freebsd-questions@FreeBSD.ORG Wed Jan 18 23:44:01 2006 Return-Path: X-Original-To: freebsd-questions@FreeBSD.org Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5883716A41F for ; Wed, 18 Jan 2006 23:44:01 +0000 (GMT) (envelope-from heesub.shin@samsung.com) Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id C09E343D45 for ; Wed, 18 Jan 2006 23:44:00 +0000 (GMT) (envelope-from heesub.shin@samsung.com) Received: from ep_mmp1 (mailout1.samsung.com [203.254.224.24]) by mailout1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0ITB00JKYB9BZU@mailout1.samsung.com> for freebsd-questions@FreeBSD.org; Thu, 19 Jan 2006 08:43:59 +0900 (KST) Received: from gamja ([10.88.165.25]) by mmp1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPSA id <0ITB00D4XB97LI@mmp1.samsung.com> for freebsd-questions@FreeBSD.org; Thu, 19 Jan 2006 08:43:59 +0900 (KST) Date: Thu, 19 Jan 2006 08:43:55 +0900 From: "Shin,Hee-Sub" To: freebsd-questions@FreeBSD.org Message-id: <000001c61c89$0da481a0$19a5580a@swcenter.sec.samsung.co.kr> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Mailer: Microsoft Office Outlook 11 Thread-index: AcYciQsVJaueLx+XQQqKSvpcQAhy2A== Content-Type: text/plain; charset=ks_c_5601-1987 Content-Transfer-Encoding: 7BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: About VFS locking strategy... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jan 2006 23:44:01 -0000 Hi all. I'm speluking with source code of FreeBSD now, comparing VFS of FBSD and the linux's. I have a question related with concurrent accesses to the file system. It is seemed that VFS locks and unlocks each VNODEs before calling VNODE OPS provided by underlying FS. For example, it calls vn_lock(vp, ...) before jumps to VOP_READ() in vn_read(). WindowsCE kernel also has a component that is responsible for switching FS requests to appropriate file-system underlying and similar with VFS of many UNIX variants, but it's not perfectly same. In WindowsCE world, file system driver code can be called on re-entry and file system programmer should keep this in mind. The manager does not manage any synchronization problems that can be occurred when multiple threads access to the file system. It has only a few locks for protecting its own data structures. How does it manage synchronization problems in the VFS of FreeBSD? Please give me a detailed description about lock strategy the FreeBSD uses. Thanks in advance. Charlie