From owner-freebsd-fs@FreeBSD.ORG Tue Apr 25 12:19:15 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2FC5D16A40F; Tue, 25 Apr 2006 12:19:15 +0000 (UTC) (envelope-from daichi@freebsd.org) Received: from natial.ongs.co.jp (natial.ongs.co.jp [202.216.232.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F94043D45; Tue, 25 Apr 2006 12:19:07 +0000 (GMT) (envelope-from daichi@freebsd.org) Received: from [192.168.1.101] (dullmdaler.ongs.co.jp [202.216.232.62]) by natial.ongs.co.jp (Postfix) with ESMTP id DF945244C19; Tue, 25 Apr 2006 21:19:06 +0900 (JST) Message-ID: <444E13BA.8050902@freebsd.org> Date: Tue, 25 Apr 2006 21:19:06 +0900 From: Daichi GOTO User-Agent: Thunderbird 1.5.0.2 (X11/20060424) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org, freebsd-fs@freebsd.org References: <43E5D052.3020207@freebsd.org> <43E656C7.8040302@freesbie.org> <43E6D5C8.4050405@freebsd.org> <43E71485.5040901@freesbie.org> <43E73330.8070101@freebsd.org> <43EB4C00.2030101@freebsd.org> <4417DD8D.3050201@freebsd.org> <4433CA53.5050000@freebsd.org> In-Reply-To: <4433CA53.5050000@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Danny Braniss , Alexander@Leidinger.net, ozawa@ongs.co.jp, freebsd-listen@fabiankeil.de Subject: [ANN] unionfs patchset-11 release X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Apr 2006 12:19:15 -0000 It is my pleasure and honor to announce the availability of the unionfs patchset-11. Patchset-11: For 7-current http://people.freebsd.org/~daichi/unionfs/unionfs-p11.diff For 6.x http://people.freebsd.org/~daichi/unionfs/unionfs6-p11.diff Changes in unionfs-p11.diff - Changed a few implementations around the lock/unlock mechanism. Because of this, you can use both the unionfs and the nullfs together without LK_CANRECURSE. - Fixed a bug that sometimes does not unlock if it cannot create shadow file. The documents of those unionfs patches: http://people.freebsd.org/~daichi/unionfs/ (English) http://people.freebsd.org/~daichi/unionfs/index-ja.html (Japanese) Heads Up: Fabian Keil gave me a good patch to fix my broken English. Above English text is good rather than pre one. Heads Up: Above English text contains some Japanese text. If you are interested in translating the Japanese text into English, please do it and send it to me. ATTENTION: If someone knows the details of vnode's lock status via VOP_GETWRITEMOUNT, Please teach us (daichi, ozawa). We want to know the details. Thanks -- Daichi GOTO, http://people.freebsd.org/~daichi From owner-freebsd-fs@FreeBSD.ORG Tue Apr 25 12:56:15 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0045B16A402; Tue, 25 Apr 2006 12:56:14 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1437343D7B; Tue, 25 Apr 2006 12:56:03 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 54D5846B1E; Tue, 25 Apr 2006 08:56:02 -0400 (EDT) Date: Tue, 25 Apr 2006 13:56:02 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Daichi GOTO In-Reply-To: <444E13BA.8050902@freebsd.org> Message-ID: <20060425133412.V51337@fledge.watson.org> References: <43E5D052.3020207@freebsd.org> <43E656C7.8040302@freesbie.org> <43E6D5C8.4050405@freebsd.org> <43E71485.5040901@freesbie.org> <43E73330.8070101@freebsd.org> <43EB4C00.2030101@freebsd.org> <4417DD8D.3050201@freebsd.org> <4433CA53.5050000@freebsd.org> <444E13BA.8050902@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: ozawa@ongs.co.jp, freebsd-hackers@freebsd.org, freebsd-fs@freebsd.org, freebsd-current@freebsd.org, Alexander@Leidinger.net Subject: Re: [ANN] unionfs patchset-11 release X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Apr 2006 12:56:15 -0000 On Tue, 25 Apr 2006, Daichi GOTO wrote: > Changes in unionfs-p11.diff > - Changed a few implementations around the lock/unlock > mechanism. Because of this, you can use both the unionfs > and the nullfs together without LK_CANRECURSE. > - Fixed a bug that sometimes does not unlock if it cannot > create shadow file. First off, thanks again for working on this! > If someone knows the details of vnode's lock status via > VOP_GETWRITEMOUNT, Please teach us (daichi, ozawa). We > want to know the details. Basically, file systems supporting full file system snapshots (UFS) provide a mechanism to "lock out" writers before they enter VFS so that they don't end up holding write locks for long periods, leading to deadlock. vn_start_write() is called to notify the file system that a thread is about to enter the file system for a write, and vn_write_finished() is called to notify the file system it is done. In effect, it's a giant reader-writer lock, which allows multiple readers and multipler writers, except during snapshot generation, when it blocks new writers until the snapshot is generated. In general, you'll notice two sorts of logic around calls to vn_start_write(): a first set, where vn_start_write() is called once holding a vnode reference, is acquired, and then things continue as normal, with a final vn_finished_write() call at the end. In this situation, vnode locks are acquired after the vn_start_write() call, but vnode references are held before (since vn_start_write() takes a vnode so that it can find the file system). The other circumstance is where vnode locks may already be held, in which case a non-sleeping acquire is performed, since in effect this is a violation of lock order. If it fails, the vnode lock is released, the reference is acquired, and then the whole operation is restarted so that we can try again to acquire the vnode lock under circumstances where file system snapshot lock can be safely acquired. So basically, it has deadlock detection and recovery logic. The V_XSLEEP lock basically says "Sleep until the snapshot lock would be available, then return", which loops back so we can re-try the acquires. So according to the above, the file system snapshot lock is *before* the vnode locks in the lock order, although in practice we acquire in any order as long as it won't lead to deadlock (in which case we recover). The logic here is a little shaky in practice -- among other things, it looks like potentially the mount point could go away during the call to vn_start_write() once the vnode is released in the deadlock detection code, but in practice this probably never happens. Notice that the above is all couched in terms of a single file system, not stacking. This is probably because it was all written with UFS and not stacking in mind. Robert N M Watson From owner-freebsd-fs@FreeBSD.ORG Tue Apr 25 15:48:03 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E0DF16A43C for ; Tue, 25 Apr 2006 15:48:03 +0000 (UTC) (envelope-from haro@h4.dion.ne.jp) Received: from smtp1.dcns.ne.jp (smtp1.dcns.ne.jp [203.178.100.134]) by mx1.FreeBSD.org (Postfix) with SMTP id 03CE443D48 for ; Tue, 25 Apr 2006 15:47:50 +0000 (GMT) (envelope-from haro@h4.dion.ne.jp) Received: (qmail 381 invoked from network); 26 Apr 2006 00:47:49 +0900 Received: from unknown (HELO localhost) (211.10.184.118) by smtp1.dcns.ne.jp with SMTP; 26 Apr 2006 00:47:49 +0900 Date: Wed, 26 Apr 2006 00:45:55 +0900 (JST) Message-Id: <20060426.004555.21603794.haro@h4.dion.ne.jp> To: daichi@freebsd.org From: Munehiro Matsuda In-Reply-To: <444E13BA.8050902@freebsd.org> References: <4417DD8D.3050201@freebsd.org> <4433CA53.5050000@freebsd.org> <444E13BA.8050902@freebsd.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: ozawa@ongs.co.jp, freebsd-hackers@freebsd.org, freebsd-fs@freebsd.org, freebsd-current@freebsd.org, Alexander@Leidinger.net Subject: Re: [ANN] unionfs patchset-11 release X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Apr 2006 15:48:03 -0000 Hi Goto-san, From: Daichi GOTO Date: Tue, 25 Apr 2006 21:19:06 +0900 ::It is my pleasure and honor to announce the availability of ::the unionfs patchset-11. :: Heads Up: Above English text contains some Japanese text. :: If you are interested in translating the Japanese :: text into English, please do it and send it to me. How about this? =-------------------------------------------------------------------------- On creating a hardlink, due to VOP_GETWRITEMOUNT() called right after lookup(), if only files exist in the underlying filesystem, VOP_GETWRITEMOUNT() cannot be process on the vnode for the layer above. Thus creating hardlink fails. A complete fix is to change VOP_GETWRITEMOUNT() to create a shadowfile, but its not possible due to the fact that, locking status of vnode passed as argument to VOP_GETWRITEMOUNT() is not stable. In the current kernel code base, filesystems using vop_stdgetwritemount() simply aquire mount point vnode, thus using vnode for directory above seems to suffice and used for the current implementation. But this logic cannot be considered safe and may cause problems in the future. Also, when mounting a directory containing multiple mount points using unionfs, becomes evil. Thus, it is dangerous to mount directories containing multiple mount points, using the current implementation of unionfs. =-------------------------------------------------------------------------- Hope this helps, Haro =------------------------------------------------------------------------------ _ _ Munehiro (haro) Matsuda -|- /_\ |_|_| Internet Solution Dept., KGT Inc. /|\ |_| |_|_| 2-8-8 Shinjuku Shinjuku-ku Tokyo 160-0022, Japan Tel: +81-3-3225-0767 Fax: +81-3-3225-0740 Email: haro-at-kgt.co.jp From owner-freebsd-fs@FreeBSD.ORG Tue Apr 25 17:56:05 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 18A7F16A40E; Tue, 25 Apr 2006 17:56:05 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8371B43D6E; Tue, 25 Apr 2006 17:55:54 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 4DCEF1A4E24; Tue, 25 Apr 2006 10:55:54 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 9C9AC55A0B; Tue, 25 Apr 2006 13:55:53 -0400 (EDT) Date: Tue, 25 Apr 2006 13:55:53 -0400 From: Kris Kennaway To: Daichi GOTO Message-ID: <20060425175553.GA56011@xor.obsecurity.org> References: <43E5D052.3020207@freebsd.org> <43E656C7.8040302@freesbie.org> <43E6D5C8.4050405@freebsd.org> <43E71485.5040901@freesbie.org> <43E73330.8070101@freebsd.org> <43EB4C00.2030101@freebsd.org> <4417DD8D.3050201@freebsd.org> <4433CA53.5050000@freebsd.org> <444E13BA.8050902@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gBBFr7Ir9EOA20Yy" Content-Disposition: inline In-Reply-To: <444E13BA.8050902@freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: ozawa@ongs.co.jp, freebsd-hackers@freebsd.org, freebsd-fs@freebsd.org, freebsd-current@freebsd.org, Alexander@Leidinger.net Subject: Re: [ANN] unionfs patchset-11 release X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Apr 2006 17:56:05 -0000 --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 25, 2006 at 09:19:06PM +0900, Daichi GOTO wrote: > It is my pleasure and honor to announce the availability of > the unionfs patchset-11. >=20 > Patchset-11: > For 7-current > http://people.freebsd.org/~daichi/unionfs/unionfs-p11.diff >=20 > For 6.x > http://people.freebsd.org/~daichi/unionfs/unionfs6-p11.diff >=20 > Changes in unionfs-p11.diff > - Changed a few implementations around the lock/unlock > mechanism. Because of this, you can use both the unionfs > and the nullfs together without LK_CANRECURSE. > - Fixed a bug that sometimes does not unlock if it cannot > create shadow file. I still get a panic immediately upon use: KDB: stack backtrace: vfs_badlock(cdef7540,ee22b9c4,c07a60e0,cdef7540,0) at vfs_badlock+0x76 assert_vop_locked(cdef7540,c0765a3d,220,cdef7540,d12ed380) at assert_vop_lo= cked+0x60 VOP_OPEN_APV(c077acc0,ee22ba1c,d0456c28,0,c68a2510) at VOP_OPEN_APV+0x87 union_open(ee22ba74,c0765a3d,ee22bbfc,47ec,cdf1a690) at union_open+0xa2 VOP_OPEN_APV(c077b6a0,ee22ba74,c07a5f60,cdf1a690,1) at VOP_OPEN_APV+0x94 exec_check_permissions(ee22bba8,0,c073c75f,143,d1921000) at exec_check_perm= issions+0x107 kern_execve(c68a2510,ee22bc60,0,bfbfe910,bfbfea0c,e87b9000,e87b9000,e87b903= 8,e87b94e9,e87f9000,3fb17,4,39) at kern_execve+0x214 execve(c68a2510,ee22bd04,c,ee22bd38,3) at execve+0x52 syscall(3b,3b,3b,bfbfe90c,bfbfecc7) at syscall+0x163 Xint0x80_syscall() at Xint0x80_syscall+0x1f --- syscall (59, FreeBSD ELF32, execve), eip =3D 0x280d493b, esp =3D 0xbfbf= e37c, ebp =3D 0xbfbfe828 --- VOP_OPEN: 0xcdef7540 is not locked but should be db> show lockedvnods Locked vnodes 0xd0456bd0: tag ufs, type VREG usecount 1, writecount 0, refcount 4 mountedhere 0 flags () v_object 0xcf9c1960 ref 0 pages 5 lock type ufs: EXCL (count 1) by thread 0xc68a2510 (pid 5593)#0 0xc053= 248e at lockmgr+0x573 #1 0xc059f9d4 at vop_stdlock+0x32 #2 0xc071541a at VOP_LOCK_APV+0x76 #3 0xc0681146 at ffs_lock+0x19 #4 0xc071541a at VOP_LOCK_APV+0x76 #5 0xc04ff967 at union_lock+0xda #6 0xc071541a at VOP_LOCK_APV+0x76 #7 0xc05b793a at vn_lock+0x67 #8 0xc05ab84b at vget+0x77 #9 0xc04fab14 at union_nodeget+0x682 #10 0xc04fd98a at union_lookup+0x5e6 #11 0xc0712034 at VOP_LOOKUP_APV+0x76 #12 0xc05a1588 at lookup+0x343 #13 0xc05a21f3 at namei+0x330 #14 0xc0522983 at kern_execve+0x1e4 #15 0xc05236ee at execve+0x52 #16 0xc06fc295 at syscall+0x163 #17 0xc06e5fdf at Xint0x80_syscall+0x1f ino 2805716, on dev da0s1e 0xcdf1a690: tag unionfs, type VREG usecount 1, writecount 0, refcount 1 mountedhere 0 flags (VV_TEXT) v_object 0xcf9544b0 ref 0 pages 5 lock type ufs: EXCL (count 1) by thread 0xc68a2510 (pid 5593)#0 0xc053= 248e at lockmgr+0x573 #1 0xc059f9d4 at vop_stdlock+0x32 #2 0xc071541a at VOP_LOCK_APV+0x76 #3 0xc0681146 at ffs_lock+0x19 #4 0xc071541a at VOP_LOCK_APV+0x76 #5 0xc04ff967 at union_lock+0xda #6 0xc071541a at VOP_LOCK_APV+0x76 #7 0xc05b793a at vn_lock+0x67 #8 0xc05ab84b at vget+0x77 #9 0xc04fab14 at union_nodeget+0x682 #10 0xc04fd98a at union_lookup+0x5e6 #11 0xc0712034 at VOP_LOOKUP_APV+0x76 #12 0xc05a1588 at lookup+0x343 #13 0xc05a21f3 at namei+0x330 #14 0xc0522983 at kern_execve+0x1e4 #15 0xc05236ee at execve+0x52 #16 0xc06fc295 at syscall+0x163 #17 0xc06e5fdf at Xint0x80_syscall+0x1f union_vp=3D0xcdf1a690, uppervp=3D0xd0456bd0, lowervp=3D0xcdef7540 union: upper 0xd0456bd0: tag ufs, type VREG usecount 1, writecount 0, refcount 4 mountedhere 0 flags () v_object 0xcf9c1960 ref 0 pages 5 lock type ufs: EXCL (count 1) by thread 0xc68a2510 (pid 5593)#0 0xc053= 248e at lockmgr+0x573 #1 0xc059f9d4 at vop_stdlock+0x32 #2 0xc071541a at VOP_LOCK_APV+0x76 #3 0xc0681146 at ffs_lock+0x19 #4 0xc071541a at VOP_LOCK_APV+0x76 #5 0xc04ff967 at union_lock+0xda #6 0xc071541a at VOP_LOCK_APV+0x76 #7 0xc05b793a at vn_lock+0x67 #8 0xc05ab84b at vget+0x77 #9 0xc04fab14 at union_nodeget+0x682 #10 0xc04fd98a at union_lookup+0x5e6 #11 0xc0712034 at VOP_LOOKUP_APV+0x76 #12 0xc05a1588 at lookup+0x343 #13 0xc05a21f3 at namei+0x330 #14 0xc0522983 at kern_execve+0x1e4 #15 0xc05236ee at execve+0x52 #16 0xc06fc295 at syscall+0x163 #17 0xc06e5fdf at Xint0x80_syscall+0x1f ino 2805716, on dev da0s1e union: lower 0xcdef7540: tag null, type VREG usecount 1, writecount 0, refcount 1 mountedhere 0 flags () v_object 0xcf9544b0 ref 0 pages 5 #0 0xc053248e at lockmgr+0x573 #1 0xc059f9d4 at vop_stdlock+0x32 #2 0xc071541a at VOP_LOCK_APV+0x76 #3 0xc0681146 at ffs_lock+0x19 #4 0xc071541a at VOP_LOCK_APV+0x76 #5 0xc05b793a at vn_lock+0x67 #6 0xc05ab84b at vget+0x77 #7 0xc059c93c at cache_lookup+0xe7 #8 0xc059d28f at vfs_cache_lookup+0xad #9 0xc0712034 at VOP_LOOKUP_APV+0x76 #10 0xc04f50a1 at null_lookup+0x6c #11 0xc0712034 at VOP_LOOKUP_APV+0x76 #12 0xc04fd762 at union_lookup+0x3be #13 0xc0712034 at VOP_LOOKUP_APV+0x76 #14 0xc05a1588 at lookup+0x343 #15 0xc05a21f3 at namei+0x330 #16 0xc0522983 at kern_execve+0x1e4 #17 0xc05236ee at execve+0x52 vp=3D0xcdef7540, lowervp=3D0xcdef73f0 db> db> show allpcpu Current CPU: 1 cpuid =3D 0 curthread =3D 0xc63caa20: pid 13 "idle: cpu0" curpcb =3D 0xea408d90 fpcurthread =3D none idlethread =3D 0xc63caa20: pid 13 "idle: cpu0" APIC ID =3D 0 currentldt =3D 0x50 spin locks held: cpuid =3D 1 curthread =3D 0xc68a2510: pid 5593 "chroot" curpcb =3D 0xee22bd90 fpcurthread =3D none idlethread =3D 0xc63ca870: pid 12 "idle: cpu1" APIC ID =3D 1 currentldt =3D 0x50 spin locks held: cpuid =3D 2 curthread =3D 0xc63ca6c0: pid 11 "idle: cpu2" curpcb =3D 0xea402d90 fpcurthread =3D none idlethread =3D 0xc63ca6c0: pid 11 "idle: cpu2" APIC ID =3D 2 currentldt =3D 0x50 spin locks held: exclusive spin mutex sio r =3D 0 (0xc080f588) locked @ dev/sio/sio.c:1390 cpuid =3D 3 curthread =3D 0xc63cabd0: pid 14 "swi4: clock sio" curpcb =3D 0xea40bd90 fpcurthread =3D none idlethread =3D 0xc63ca510: pid 10 "idle: cpu3" APIC ID =3D 3 currentldt =3D 0x50 spin locks held: db> Kris --gBBFr7Ir9EOA20Yy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFETmKpWry0BWjoQKURAivQAJ940gnTqBuYuzfztggorUD0wetx5gCg6joJ 4rCS7EnINCZqPVUu4CpfQsc= =u31v -----END PGP SIGNATURE----- --gBBFr7Ir9EOA20Yy-- From owner-freebsd-fs@FreeBSD.ORG Wed Apr 26 12:23:38 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A3DE16A401; Wed, 26 Apr 2006 12:23:38 +0000 (UTC) (envelope-from daichi@freebsd.org) Received: from natial.ongs.co.jp (natial.ongs.co.jp [202.216.232.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7CE9743D6D; Wed, 26 Apr 2006 12:23:28 +0000 (GMT) (envelope-from daichi@freebsd.org) Received: from [192.168.1.101] (dullmdaler.ongs.co.jp [202.216.232.62]) by natial.ongs.co.jp (Postfix) with ESMTP id 45B0A244C19; Wed, 26 Apr 2006 21:23:27 +0900 (JST) Message-ID: <444F663D.9060905@freebsd.org> Date: Wed, 26 Apr 2006 21:23:25 +0900 From: Daichi GOTO User-Agent: Thunderbird 1.5.0.2 (X11/20060424) MIME-Version: 1.0 To: Kris Kennaway References: <43E5D052.3020207@freebsd.org> <43E656C7.8040302@freesbie.org> <43E6D5C8.4050405@freebsd.org> <43E71485.5040901@freesbie.org> <43E73330.8070101@freebsd.org> <43EB4C00.2030101@freebsd.org> <4417DD8D.3050201@freebsd.org> <4433CA53.5050000@freebsd.org> <444E13BA.8050902@freebsd.org> <20060425175553.GA56011@xor.obsecurity.org> In-Reply-To: <20060425175553.GA56011@xor.obsecurity.org> Content-Type: multipart/mixed; boundary="------------000008020900090004010903" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: ozawa@ongs.co.jp, freebsd-hackers@freebsd.org, Daichi GOTO , freebsd-fs@freebsd.org, freebsd-current@freebsd.org, Alexander@Leidinger.net Subject: Re: [ANN] unionfs patchset-11 release X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2006 12:23:38 -0000 This is a multi-part message in MIME format. --------------000008020900090004010903 Content-Type: text/plain; charset=Shift_JIS Content-Transfer-Encoding: 7bit Kris Kennaway wrote: > I still get a panic immediately upon use: OKey. Maybe we fixed your panic. Please try attached file as /usr/src/sys/fs/unionfs/union_vnops.c :) -- Daichi GOTO, http://people.freebsd.org/~daichi --------------000008020900090004010903-- From owner-freebsd-fs@FreeBSD.ORG Wed Apr 26 13:16:15 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C574916A416 for ; Wed, 26 Apr 2006 13:16:15 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay01.ispgateway.de (smtprelay01.ispgateway.de [80.67.18.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 676C543D55 for ; Wed, 26 Apr 2006 13:16:12 +0000 (GMT) (envelope-from freebsd-listen@fabiankeil.de) Received: (qmail 7541 invoked from network); 26 Apr 2006 13:16:09 -0000 Received: from unknown (HELO localhost) ([pbs]775067@[217.50.131.123]) (envelope-sender ) by smtprelay01.ispgateway.de (qmail-ldap-1.03) with SMTP for ; 26 Apr 2006 13:16:09 -0000 Date: Wed, 26 Apr 2006 15:15:57 +0200 From: Fabian Keil To: Daichi GOTO Message-ID: <20060426151557.3a46dfbd@localhost> In-Reply-To: <444F663D.9060905@freebsd.org> References: <43E5D052.3020207@freebsd.org> <43E656C7.8040302@freesbie.org> <43E6D5C8.4050405@freebsd.org> <43E71485.5040901@freesbie.org> <43E73330.8070101@freebsd.org> <43EB4C00.2030101@freebsd.org> <4417DD8D.3050201@freebsd.org> <4433CA53.5050000@freebsd.org> <444E13BA.8050902@freebsd.org> <20060425175553.GA56011@xor.obsecurity.org> <444F663D.9060905@freebsd.org> X-Mailer: Sylpheed-Claws 2.0.0 (GTK+ 2.8.17; i386-portbld-freebsd6.0) X-PGP-KEY-URL: http://www.fabiankeil.de/gpg-keys/freebsd-listen-2006-08-19.asc Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_Qlq1PH9m6ABA/a7=iZxQ.nB"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: freebsd-fs@freebsd.org, freebsd-hackers@freebsd.org, freebsd-current@freebsd.org, ozawa@ongs.co.jp, Kris Kennaway Subject: Re: [ANN] unionfs patchset-11 release X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2006 13:16:15 -0000 --Sig_Qlq1PH9m6ABA/a7=iZxQ.nB Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Daichi GOTO wrote: > Kris Kennaway wrote: > > I still get a panic immediately upon use: >=20 > OKey. >=20 > Maybe we fixed your panic. Please try attached file as > /usr/src/sys/fs/unionfs/union_vnops.c :) Looks like the attachment was filtered. I got a different panic on FreeBSD TP51.local 6.1-RC FreeBSD 6.1-RC #22: Wed Apr 26 13:25:57 CEST 2006 after mounting an empty directory above /usr/src, applying a patch and using find's -type f option shortly afterwards to show the files in the directory on top:=20 Unread portion of the kernel message buffer: panic: initiate_write_filepage: dir inum 0 !=3D new 24971 KDB: enter: panic Locked vnodes 0xc3cf7770: tag ufs, type VDIR usecount 1, writecount 0, refcount 4 mountedhere 0 flags () v_object 0xc392539c ref 0 pages 0 lock type ufs: EXCL (count 1) by thread 0xc334ec00 (pid 41) ino 24936, on dev ad0s3e 0xc3cf7880: tag unionfs, type VDIR usecount 36, writecount 0, refcount 36 mountedhere 0 flags () v_object 0xc392539c ref 0 pages 0 lock type ufs: EXCL (count 1) by thread 0xc334ec00 (pid 41) union_vp=3D0xc3cf7880, uppervp=3D0xc3cf7770, lowervp=3D0xc3cee550 union: upper 0xc3cf7770: tag ufs, type VDIR usecount 1, writecount 0, refcount 4 mountedhere 0 flags () v_object 0xc392539c ref 0 pages 0 lock type ufs: EXCL (count 1) by thread 0xc334ec00 (pid 41) ino 24936, on dev ad0s3e union: lower 0xc3cee550: tag ufs, type VDIR usecount 1, writecount 0, refcount 3 mountedhere 0 flags () =20 ino 943568, on dev ad0s3f exclusive sleep mutex Softdep Lock r =3D 0 (0xc07839c0) locked @ /usr/src/s= ys/ufs/ffs/ffs_softdep.c:3730 exclusive sleep mutex Giant r =3D 0 (0xc072f640) locked @ /usr/src/sys/kern= /vfs_subr.c:1608 panic: from debugger Uptime: 20m58s Dumping 511 MB (2 chunks) chunk 0: 1MB (159 pages) ... ok chunk 1: 511MB (130656 pages) 495 479 463 447 431 415 399 383 367 351 335= 319 303 287 271 255 239 223 207 191 175 159 143 127 111 95=20 79 63 47 31 15 #0 doadump () at pcpu.h:165 165 pcpu.h: No such file or directory. in pcpu.h (kgdb) where #0 doadump () at pcpu.h:165 #1 0xc054a865 in boot (howto=3D260) at /usr/src/sys/kern/kern_shutdown.c:4= 02 #2 0xc054ab27 in panic (fmt=3D0xc06c9423 "from debugger") at /usr/src/sys/= kern/kern_shutdown.c:558 #3 0xc047f523 in db_panic (addr=3D-1068086451, have_addr=3D0, count=3D-1, = modif=3D0xd564b95c "") at /usr/src/sys/ddb/db_command.c:438 #4 0xc047f49c in db_command (last_cmdp=3D0xc072b3e4, cmd_table=3D0x0, aux_= cmd_tablep=3D0xc06f28c4, aux_cmd_tablep_end=3D0xc06f28c8) at /usr/src/sys/ddb/db_command.c:350 #5 0xc047f58d in db_command_loop () at /usr/src/sys/ddb/db_command.c:458 #6 0xc048143d in db_trap (type=3D3, code=3D0) at /usr/src/sys/ddb/db_main.= c:221 #7 0xc0564dd7 in kdb_trap (type=3D0, code=3D0, tf=3D0xd564baa8) at /usr/sr= c/sys/kern/subr_kdb.c:473 #8 0xc069e4d2 in trap (frame=3D {tf_fs =3D -1066532856, tf_es =3D 40, tf_ds =3D -714866648, tf_edi = =3D 1, tf_esi =3D -1066511478, tf_ebp =3D -714818832, tf_isp =3D -714818860, tf_ebx =3D -714818776, tf_edx =3D 0, tf_ecx =3D -1056878592, tf_eax =3D 18= , tf_trapno =3D 3, tf_err =3D 0, tf_eip =3D -1068086451, tf_cs =3D 32, tf_ef lags =3D 642, tf_esp =3D -1066558175, tf_ss =3D -1066564882}) at /usr/src/s= ys/i386/i386/trap.c:593 #9 0xc068feda in calltrap () at /usr/src/sys/i386/i386/exception.s:139 #10 0xc0564b4d in kdb_enter (msg=3D0x12
) at cp= ufunc.h:60 #11 0xc054aabf in panic (fmt=3D0xc06e538a "%s: dir inum %d !=3D new %d") at= /usr/src/sys/kern/kern_shutdown.c:542 #12 0xc0634021 in initiate_write_filepage (pagedep=3D0xc354b580, bp=3D0xcd7= c7e18) at /usr/src/sys/ufs/ffs/ffs_softdep.c:3834 #13 0xc0633d1c in softdep_disk_io_initiation (bp=3D0xcd7c7e18) at /usr/src/= sys/ufs/ffs/ffs_softdep.c:3740 #14 0xc063c8c4 in ffs_geom_strategy (bo=3D0xc358aa50, bp=3D0xcd7c7e18) at b= uf.h:422 #15 0xc0648db7 in ufs_strategy (ap=3D0x12) at /usr/src/sys/ufs/ufs/ufs_vnop= s.c:1942 #16 0xc06b47c8 in VOP_STRATEGY_APV (vop=3D0xc0719380, a=3D0xd564bbec) at vn= ode_if.c:1796 #17 0xc059965c in bufstrategy (bo=3D0xc3cf7830, bp=3D0x12) at vnode_if.h:928 #18 0xc05946e6 in bufwrite (bp=3D0xcd7c7e18) at buf.h:415 #19 0xc0594c31 in bawrite (bp=3D0x12) at buf.h:399 #20 0xc063cb82 in ffs_syncvnode (vp=3D0xc3cf7770, waitfor=3D3) at /usr/src/= sys/ufs/ffs/ffs_vnops.c:256 #21 0xc063c8fc in ffs_fsync (ap=3D0xd564bca4) at /usr/src/sys/ufs/ffs/ffs_v= nops.c:179 #22 0xc06b416c in VOP_FSYNC_APV (vop=3D0x12, a=3D0x0) at vnode_if.c:1020 #23 0xc05a59d6 in sync_vnode (bo=3D0xc3cf7830, td=3D0xc334ec00) at vnode_if= .h:537 #24 0xc05a5cbf in sched_sync () at /usr/src/sys/kern/vfs_subr.c:1676 #25 0xc053401c in fork_exit (callout=3D0xc05a5a82 , arg=3D0x12,= frame=3D0x12) at /usr/src/sys/kern/kern_fork.c:805 Fabian --=20 http://www.fabiankeil.de/ --Sig_Qlq1PH9m6ABA/a7=iZxQ.nB Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFET3KVjV8GA4rMKUQRAtK+AKCn7qQ9XOmU60o/OkiSXp3YFQNciQCg5N3S /+6vB/ksqIpKcqSokerv2Lg= =u3GH -----END PGP SIGNATURE----- --Sig_Qlq1PH9m6ABA/a7=iZxQ.nB-- From owner-freebsd-fs@FreeBSD.ORG Wed Apr 26 13:26:46 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9208316A403; Wed, 26 Apr 2006 13:26:46 +0000 (UTC) (envelope-from daichi@freebsd.org) Received: from natial.ongs.co.jp (natial.ongs.co.jp [202.216.232.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0246A43D5D; Wed, 26 Apr 2006 13:26:34 +0000 (GMT) (envelope-from daichi@freebsd.org) Received: from [192.168.1.101] (dullmdaler.ongs.co.jp [202.216.232.62]) by natial.ongs.co.jp (Postfix) with ESMTP id BCECF244C19; Wed, 26 Apr 2006 22:26:33 +0900 (JST) Message-ID: <444F7507.5090306@freebsd.org> Date: Wed, 26 Apr 2006 22:26:31 +0900 From: Daichi GOTO User-Agent: Thunderbird 1.5.0.2 (X11/20060424) MIME-Version: 1.0 To: Robert Watson References: <43E5D052.3020207@freebsd.org> <43E656C7.8040302@freesbie.org> <43E6D5C8.4050405@freebsd.org> <43E71485.5040901@freesbie.org> <43E73330.8070101@freebsd.org> <43EB4C00.2030101@freebsd.org> <4417DD8D.3050201@freebsd.org> <4433CA53.5050000@freebsd.org> <444E13BA.8050902@freebsd.org> <20060425133412.V51337@fledge.watson.org> In-Reply-To: <20060425133412.V51337@fledge.watson.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: ozawa@ongs.co.jp, freebsd-hackers@freebsd.org, Daichi GOTO , freebsd-fs@freebsd.org, freebsd-current@freebsd.org, Alexander@Leidinger.net Subject: Re: [ANN] unionfs patchset-11 release X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2006 13:26:47 -0000 Robert Watson wrote: >> If someone knows the details of vnode's lock status via >> VOP_GETWRITEMOUNT, Please teach us (daichi, ozawa). We >> want to know the details. > > Basically, file systems supporting full file system snapshots (UFS) Oh thanks rwatson! It is very useful. Thank you very much :) -- Daichi GOTO, http://people.freebsd.org/~daichi From owner-freebsd-fs@FreeBSD.ORG Wed Apr 26 13:43:11 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C28D716A400; Wed, 26 Apr 2006 13:43:11 +0000 (UTC) (envelope-from daichi@freebsd.org) Received: from natial.ongs.co.jp (natial.ongs.co.jp [202.216.232.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id 388CF43D72; Wed, 26 Apr 2006 13:43:09 +0000 (GMT) (envelope-from daichi@freebsd.org) Received: from [192.168.1.101] (dullmdaler.ongs.co.jp [202.216.232.62]) by natial.ongs.co.jp (Postfix) with ESMTP id D9145244C19; Wed, 26 Apr 2006 22:43:07 +0900 (JST) Message-ID: <444F78E9.5070409@freebsd.org> Date: Wed, 26 Apr 2006 22:43:05 +0900 From: Daichi GOTO User-Agent: Thunderbird 1.5.0.2 (X11/20060424) MIME-Version: 1.0 To: Munehiro Matsuda References: <4417DD8D.3050201@freebsd.org> <4433CA53.5050000@freebsd.org> <444E13BA.8050902@freebsd.org> <20060426.004555.21603794.haro@h4.dion.ne.jp> In-Reply-To: <20060426.004555.21603794.haro@h4.dion.ne.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: ozawa@ongs.co.jp, freebsd-hackers@freebsd.org, daichi@freebsd.org, freebsd-fs@freebsd.org, freebsd-current@freebsd.org, Alexander@Leidinger.net Subject: Re: [ANN] unionfs patchset-11 release X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2006 13:43:11 -0000 Munehiro Matsuda wrote: > How about this? Great! I just updated site. Thanks Matsuda-san :) http://people.freebsd.org/~daichi/unionfs/ -- Daichi GOTO, http://people.freebsd.org/~daichi From owner-freebsd-fs@FreeBSD.ORG Wed Apr 26 14:13:30 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4ACB616A401; Wed, 26 Apr 2006 14:13:30 +0000 (UTC) (envelope-from daichi@freebsd.org) Received: from natial.ongs.co.jp (natial.ongs.co.jp [202.216.232.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id D177343D45; Wed, 26 Apr 2006 14:13:29 +0000 (GMT) (envelope-from daichi@freebsd.org) Received: from [192.168.1.101] (dullmdaler.ongs.co.jp [202.216.232.62]) by natial.ongs.co.jp (Postfix) with ESMTP id D26F9244C19; Wed, 26 Apr 2006 23:13:28 +0900 (JST) Message-ID: <444F8006.6010609@freebsd.org> Date: Wed, 26 Apr 2006 23:13:26 +0900 From: Daichi GOTO User-Agent: Thunderbird 1.5.0.2 (X11/20060424) MIME-Version: 1.0 To: Fabian Keil References: <43E5D052.3020207@freebsd.org> <43E656C7.8040302@freesbie.org> <43E6D5C8.4050405@freebsd.org> <43E71485.5040901@freesbie.org> <43E73330.8070101@freebsd.org> <43EB4C00.2030101@freebsd.org> <4417DD8D.3050201@freebsd.org> <4433CA53.5050000@freebsd.org> <444E13BA.8050902@freebsd.org> <20060425175553.GA56011@xor.obsecurity.org> <444F663D.9060905@freebsd.org> <20060426151557.3a46dfbd@localhost> In-Reply-To: <20060426151557.3a46dfbd@localhost> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: ozawa@ongs.co.jp, freebsd-hackers@freebsd.org, Daichi GOTO , freebsd-fs@freebsd.org, freebsd-current@freebsd.org, Kris Kennaway Subject: Re: [ANN] unionfs patchset-11 release X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2006 14:13:30 -0000 Fabian Keil wrote: > Looks like the attachment was filtered. > > I got a different panic on > FreeBSD TP51.local 6.1-RC FreeBSD 6.1-RC #22: Wed Apr 26 13:25:57 CEST 2006 > after mounting an empty directory above /usr/src, > applying a patch and using find's -type f option shortly afterwards > to show the files in the directory on top: Muuuu... We tried as follow, but we could not get the same error :( It looks very fine. # cd /usr/ # mkdir hoge # mount_unionfs -c transparent -o noatime /usr/hoge /usr/src # cd src # find . -type f &; find . -type f &; find . -type f & # cd /usr/ # umount /usr/src # rm -r hoge # mkdir hoge # mount_unionfs -c transparent /usr/hoge /usr/src # cd src # find . -type f &; find . -type f &; find . -type f & What do you make of it? -- Daichi GOTO, http://people.freebsd.org/~daichi From owner-freebsd-fs@FreeBSD.ORG Wed Apr 26 15:04:00 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6D8C416A406 for ; Wed, 26 Apr 2006 15:04:00 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay01.ispgateway.de (smtprelay01.ispgateway.de [80.67.18.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 361DD43D6A for ; Wed, 26 Apr 2006 15:03:49 +0000 (GMT) (envelope-from freebsd-listen@fabiankeil.de) Received: (qmail 27181 invoked from network); 26 Apr 2006 15:03:48 -0000 Received: from unknown (HELO localhost) ([pbs]775067@[217.50.131.123]) (envelope-sender ) by smtprelay01.ispgateway.de (qmail-ldap-1.03) with SMTP for ; 26 Apr 2006 15:03:48 -0000 Date: Wed, 26 Apr 2006 17:03:35 +0200 From: Fabian Keil To: Daichi GOTO Message-ID: <20060426170335.40e95f36@localhost> In-Reply-To: <444F8006.6010609@freebsd.org> References: <43E5D052.3020207@freebsd.org> <43E656C7.8040302@freesbie.org> <43E6D5C8.4050405@freebsd.org> <43E71485.5040901@freesbie.org> <43E73330.8070101@freebsd.org> <43EB4C00.2030101@freebsd.org> <4417DD8D.3050201@freebsd.org> <4433CA53.5050000@freebsd.org> <444E13BA.8050902@freebsd.org> <20060425175553.GA56011@xor.obsecurity.org> <444F663D.9060905@freebsd.org> <20060426151557.3a46dfbd@localhost> <444F8006.6010609@freebsd.org> X-Mailer: Sylpheed-Claws 2.0.0 (GTK+ 2.8.17; i386-portbld-freebsd6.0) X-PGP-KEY-URL: http://www.fabiankeil.de/gpg-keys/freebsd-listen-2006-08-19.asc Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Sig_68ckTcMHBgdp8QMVSFwD_xx; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: freebsd-fs@freebsd.org, freebsd-hackers@freebsd.org, freebsd-current@freebsd.org, ozawa@ongs.co.jp, Kris Kennaway Subject: Re: [ANN] unionfs patchset-11 release X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2006 15:04:00 -0000 --Sig_68ckTcMHBgdp8QMVSFwD_xx Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Daichi GOTO wrote: > Fabian Keil wrote: > > Looks like the attachment was filtered. > >=20 > > I got a different panic on > > FreeBSD TP51.local 6.1-RC FreeBSD 6.1-RC #22: Wed Apr 26 13:25:57 CEST = 2006 > > after mounting an empty directory above /usr/src, > > applying a patch and using find's -type f option shortly afterwards > > to show the files in the directory on top:=20 >=20 > Muuuu... >=20 > We tried as follow, but we could not get the same error :( > It looks very fine. >=20 > # cd /usr/ > # mkdir hoge > # mount_unionfs -c transparent -o noatime /usr/hoge /usr/src > # cd src > # find . -type f &; find . -type f &; find . -type f & > # cd /usr/ > # umount /usr/src > # rm -r hoge > # mkdir hoge > # mount_unionfs -c transparent /usr/hoge /usr/src > # cd src > # find . -type f &; find . -type f &; find . -type f & >=20 > What do you make of it? I didn't give you enough information, sorry. What I'm doing is: fk@TP51 ~ $mkdir /tmp/unionfs-src/ fk@TP51 ~ $mount_unionfs /tmp/unionfs-src /usr/src fk@TP51 ~ $cd /usr/src fk@TP51 /usr/src $patch -p1 < ~/test/combi.patch fk@TP51 /usr/src $find /tmp/unionfs-src/ -type f [Panic] ~/test/combi.patch changes about twenty files. I'm not sure if it's important, but /usr was mounted readonly and /tmp is a different file system. My kernel has options WITNESS enabled. The last step doesn't seem to be the only way to get a problem, I tried the first four steps again and umount /usr/src resulted in a reboot. I was running Xorg and didn't get a panic, but I'll try again without Xorg, to see if it's the same problem. Fabian --=20 http://www.fabiankeil.de/ --Sig_68ckTcMHBgdp8QMVSFwD_xx Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFET4vRjV8GA4rMKUQRAnwOAJ9qyZQbtmBmoo6z1flOh0NCFC1AgQCeJwAk 1B43U7YoKn8xeCe/pyrXpM8= =T+GK -----END PGP SIGNATURE----- --Sig_68ckTcMHBgdp8QMVSFwD_xx-- From owner-freebsd-fs@FreeBSD.ORG Wed Apr 26 15:46:11 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2724316A40A for ; Wed, 26 Apr 2006 15:46:11 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay01.ispgateway.de (smtprelay01.ispgateway.de [80.67.18.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D9AE43D48 for ; Wed, 26 Apr 2006 15:46:07 +0000 (GMT) (envelope-from freebsd-listen@fabiankeil.de) Received: (qmail 12094 invoked from network); 26 Apr 2006 15:46:05 -0000 Received: from unknown (HELO localhost) ([pbs]775067@[217.50.131.123]) (envelope-sender ) by smtprelay01.ispgateway.de (qmail-ldap-1.03) with SMTP for ; 26 Apr 2006 15:46:05 -0000 Date: Wed, 26 Apr 2006 17:45:53 +0200 From: Fabian Keil To: Daichi GOTO Message-ID: <20060426174553.43863486@localhost> In-Reply-To: <20060426170335.40e95f36@localhost> References: <43E5D052.3020207@freebsd.org> <43E656C7.8040302@freesbie.org> <43E6D5C8.4050405@freebsd.org> <43E71485.5040901@freesbie.org> <43E73330.8070101@freebsd.org> <43EB4C00.2030101@freebsd.org> <4417DD8D.3050201@freebsd.org> <4433CA53.5050000@freebsd.org> <444E13BA.8050902@freebsd.org> <20060425175553.GA56011@xor.obsecurity.org> <444F663D.9060905@freebsd.org> <20060426151557.3a46dfbd@localhost> <444F8006.6010609@freebsd.org> <20060426170335.40e95f36@localhost> X-Mailer: Sylpheed-Claws 2.0.0 (GTK+ 2.8.17; i386-portbld-freebsd6.0) X-PGP-KEY-URL: http://www.fabiankeil.de/gpg-keys/freebsd-listen-2006-08-19.asc Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_QW2V0/lsfWnLa0mc26Lg1+/"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: freebsd-fs@freebsd.org, freebsd-hackers@freebsd.org, freebsd-current@freebsd.org, ozawa@ongs.co.jp, Kris Kennaway Subject: Re: [ANN] unionfs patchset-11 release X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2006 15:46:11 -0000 --Sig_QW2V0/lsfWnLa0mc26Lg1+/ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Fabian Keil wrote: > Daichi GOTO wrote: >=20 > > Fabian Keil wrote: > > > I got a different panic on > > > FreeBSD TP51.local 6.1-RC FreeBSD 6.1-RC #22: Wed Apr 26 13:25:57 CES= T 2006 > > > after mounting an empty directory above /usr/src, > > > applying a patch and using find's -type f option shortly afterwards > > > to show the files in the directory on top:=20 > > We tried as follow, but we could not get the same error :( > > It looks very fine. > I didn't give you enough information, sorry. >=20 > What I'm doing is: >=20 > fk@TP51 ~ $mkdir /tmp/unionfs-src/ > fk@TP51 ~ $mount_unionfs /tmp/unionfs-src /usr/src > fk@TP51 ~ $cd /usr/src > fk@TP51 /usr/src $patch -p1 < ~/test/combi.patch > fk@TP51 /usr/src $find /tmp/unionfs-src/ -type f > [Panic] >=20 > ~/test/combi.patch changes about twenty files. >=20 > I'm not sure if it's important, but /usr was mounted > readonly and /tmp is a different file system. >=20 > My kernel has options WITNESS enabled. >=20 > The last step doesn't seem to be the only way to > get a problem, I tried the first four steps again > and umount /usr/src resulted in a reboot. >=20 > I was running Xorg and didn't get a panic, but I'll > try again without Xorg, to see if it's the same problem. OK, I guess it's the same problem: panic: initiate_write_filepage: dir inum 0 !=3D new 8482 KDB: enter: panic Locked vnodes 0xc359ddd0: tag syncer, type VNON usecount 1, writecount 0, refcount 2 mountedhere 0 flags () lock type syncer: EXCL (count 1) by thread 0xc334ec00 (pid 41) 0xc393a880: tag ufs, type VDIR =20 usecount 1, writecount 0, refcount 3 mountedhere 0 flags () =20 v_object 0xc3746e70 ref 0 pages 0 lock type ufs: EXCL (count 1) by thread 0xc334ec00 (pid 41) ino 8469, on dev ad0s3e exclusive sleep mutex Softdep Lock r =3D 0 (0xc07839c0) locked @ /usr/src/s= ys/ufs/ffs/ffs_softdep.c:3730 exclusive sleep mutex Giant r =3D 0 (0xc072f640) locked @ /usr/src/sys/kern= /vfs_subr.c:1608 Locked vnodes 0xc359ddd0: tag syncer, type VNON usecount 1, writecount 0, refcount 2 mountedhere 0 flags () lock type syncer: EXCL (count 1) by thread 0xc334ec00 (pid 41) 0xc393a880: tag ufs, type VDIR usecount 1, writecount 0, refcount 3 mountedhere 0 flags () v_object 0xc3746e70 ref 0 pages 0 lock type ufs: EXCL (count 1) by thread 0xc334ec00 (pid 41) ino 8469, on dev ad0s3e panic: from debugger Uptime: 2m14s Dumping 511 MB (2 chunks) chunk 0: 1MB (159 pages) ... ok chunk 1: 511MB (130656 pages) 495 479 463 447 431 415 399 383 367 351 335= 319 303 287 271 255 239 223 207 191 175 159 143 127 111 95 79 63 47 31 15 #0 doadump () at pcpu.h:165 165 pcpu.h: No such file or directory. in pcpu.h (kgdb) where #0 doadump () at pcpu.h:165 #1 0xc054a865 in boot (howto=3D260) at /usr/src/sys/kern/kern_shutdown.c:4= 02 #2 0xc054ab27 in panic (fmt=3D0xc06c9423 "from debugger") at /usr/src/sys/= kern/kern_shutdown.c:558 #3 0xc047f523 in db_panic (addr=3D-1068086451, have_addr=3D0, count=3D-1, = modif=3D0xd564b8d8 "") at /usr/src/sys/ddb/db_command.c:438 #4 0xc047f49c in db_command (last_cmdp=3D0xc072b3e4, cmd_table=3D0x0, aux_= cmd_tablep=3D0xc06f28c4, aux_cmd_tablep_end=3D0xc06f28c8) at /usr/src/sys/ddb/db_command.c:350 #5 0xc047f58d in db_command_loop () at /usr/src/sys/ddb/db_command.c:458 #6 0xc048143d in db_trap (type=3D3, code=3D0) at /usr/src/sys/ddb/db_main.= c:221 #7 0xc0564dd7 in kdb_trap (type=3D0, code=3D0, tf=3D0xd564ba24) at /usr/sr= c/sys/kern/subr_kdb.c:473 #8 0xc069e4d2 in trap (frame=3D {tf_fs =3D -1066532856, tf_es =3D 40, tf_ds =3D -714866648, tf_edi = =3D 1, tf_esi =3D -1066511478, tf_ebp =3D -714818964, tf_isp =3D -714818992= , tf_ebx =3D -714818908, tf_edx =3D 0, tf_ecx =3D -1056878592, tf_eax =3D 1= 8, tf_trapno =3D 3, tf_err =3D 0, tf_eip =3D -1068086451, tf_cs =3D 32, tf_= eflags =3D 642, tf_esp =3D -1066558175, tf_ss =3D -1066564882}) at /usr/src= /sys/i386/i386/trap.c:593 #9 0xc068feda in calltrap () at /usr/src/sys/i386/i386/exception.s:139 #10 0xc0564b4d in kdb_enter (msg=3D0x12
) at cp= ufunc.h:60 #11 0xc054aabf in panic (fmt=3D0xc06e538a "%s: dir inum %d !=3D new %d") at= /usr/src/sys/kern/kern_shutdown.c:542 #12 0xc0634021 in initiate_write_filepage (pagedep=3D0xc354bc00, bp=3D0xcd8= 38268) at /usr/src/sys/ufs/ffs/ffs_softdep.c:3834 #13 0xc0633d1c in softdep_disk_io_initiation (bp=3D0xcd838268) at /usr/src/= sys/ufs/ffs/ffs_softdep.c:3740 #14 0xc063c8c4 in ffs_geom_strategy (bo=3D0xc358aa50, bp=3D0xcd838268) at b= uf.h:422 #15 0xc0648db7 in ufs_strategy (ap=3D0x12) at /usr/src/sys/ufs/ufs/ufs_vnop= s.c:1942 #16 0xc06b47c8 in VOP_STRATEGY_APV (vop=3D0xc0719380, a=3D0xd564bb68) at vn= ode_if.c:1796 #17 0xc059965c in bufstrategy (bo=3D0xc393a940, bp=3D0x12) at vnode_if.h:928 #18 0xc05946e6 in bufwrite (bp=3D0xcd838268) at buf.h:415 #19 0xc0594c31 in bawrite (bp=3D0x12) at buf.h:399 #20 0xc063cb82 in ffs_syncvnode (vp=3D0xc393a880, waitfor=3D3) at /usr/src/= sys/ufs/ffs/ffs_vnops.c:256 #21 0xc063b753 in ffs_sync (mp=3D0xc352b400, waitfor=3D3, td=3D0xc334ec00) = at /usr/src/sys/ufs/ffs/ffs_vfsops.c:1143 #22 0xc05a7f42 in sync_fsync (ap=3D0x0) at /usr/src/sys/kern/vfs_subr.c:3086 #23 0xc06b416c in VOP_FSYNC_APV (vop=3D0x12, a=3D0x0) at vnode_if.c:1020 #24 0xc05a59d6 in sync_vnode (bo=3D0xc359de90, td=3D0xc334ec00) at vnode_if= .h:537 #25 0xc05a5cbf in sched_sync () at /usr/src/sys/kern/vfs_subr.c:1676 Before I got the panic I unmounted the layer above /usr/src and used mount to show the result. There were perhaps 5 seconds between umount /usr/src and the panic. Another thing which could be significant or not: After my last mail I closed Xorg and tried to reproduce the panic two times, but couldn't. After a reboot the panic occurred right after the first attempt. Fabian --=20 http://www.fabiankeil.de/ --Sig_QW2V0/lsfWnLa0mc26Lg1+/ Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFET5W6jV8GA4rMKUQRAruaAKCjsOc7d6OMCUYtNpGVW4gUFq/9ewCg0G/c Efjt0etLidIbQQH4bSgQJLg= =2VXm -----END PGP SIGNATURE----- --Sig_QW2V0/lsfWnLa0mc26Lg1+/-- From owner-freebsd-fs@FreeBSD.ORG Wed Apr 26 16:50:29 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5E56816A400 for ; Wed, 26 Apr 2006 16:50:29 +0000 (UTC) (envelope-from kent@team.outblaze.com) Received: from corpmail.outblaze.com (corpmail.outblaze.com [203.86.166.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id B6C2643D48 for ; Wed, 26 Apr 2006 16:50:28 +0000 (GMT) (envelope-from kent@team.outblaze.com) Received: from vexira-out.outblaze.com (unknown [210.17.191.253]) by corpmail.outblaze.com (Postfix) with SMTP id 784E537C4B for ; Wed, 26 Apr 2006 16:49:30 +0000 (GMT) Received: from int.hk.outblaze.com (203-86-166-97.outblaze.com [203.86.166.97]) by corpmail.outblaze.com (Postfix) with SMTP id CD94316DD84 for ; Wed, 26 Apr 2006 16:49:29 +0000 (GMT) Received: (qmail 10975 invoked from network); 26 Apr 2006 16:49:29 -0000 Received: from unknown (HELO ?192.168.11.2?) (kent@team.outblaze.com@61.10.24.249) by smtp1.hk1.outblaze.com with SMTP; 26 Apr 2006 16:49:29 -0000 Message-ID: <444FA4CF.7040507@outblaze.com> Date: Thu, 27 Apr 2006 00:50:23 +0800 From: Kent Ho User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiVirus: Checked by VAMS 1.57.2 Build 1.57.2-21 VDB 8.1162 Subject: Do I need to reserve disk space for UFS snapshots? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2006 16:50:29 -0000 Hi, I'm planing to use FreeBSD snapshots. It seems to be the snapshop image is placed on the same file system. The question is how do I manage or reserve space for the snapshots? Can someone give me some guidelines or pointers. Here's my netapp it has a separate area allocated for the snapshots, I'm keeping 2 weekly snapshots in there(weekly.0 & weekly.1) using around 30G. Filesystem kbytes used avail capacity Mounted on /vol/vol0/ 305052552 272495320 32557232 89% /vol/vol0/ /vol/vol0/.snapshot 76263136 30658028 45605108 40% /vol/vol0/.snapshot Filesystem iused ifree %iused Mounted on /vol/vol0/ 10802387 89822586 11% /vol/vol0/ If copy all content in vol0 to a FreeBSD and make 2 snapshot will it be around the same? 272G + 30G = 302G? So if I df on the FreeBSD box around 302G will be used? Any help and information is highly appreciated. Many thanks. Kent. From owner-freebsd-fs@FreeBSD.ORG Wed Apr 26 18:45:07 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9AF2D16A40A for ; Wed, 26 Apr 2006 18:45:07 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay01.ispgateway.de (smtprelay01.ispgateway.de [80.67.18.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B0CB43D58 for ; Wed, 26 Apr 2006 18:45:04 +0000 (GMT) (envelope-from freebsd-listen@fabiankeil.de) Received: (qmail 15345 invoked from network); 26 Apr 2006 18:45:03 -0000 Received: from unknown (HELO localhost) ([pbs]775067@[217.50.131.123]) (envelope-sender ) by smtprelay01.ispgateway.de (qmail-ldap-1.03) with SMTP for ; 26 Apr 2006 18:45:03 -0000 Date: Wed, 26 Apr 2006 20:44:54 +0200 From: Fabian Keil To: Fabian Keil Message-ID: <20060426204454.4e926292@localhost> In-Reply-To: <20060426174553.43863486@localhost> References: <43E5D052.3020207@freebsd.org> <43E656C7.8040302@freesbie.org> <43E6D5C8.4050405@freebsd.org> <43E71485.5040901@freesbie.org> <43E73330.8070101@freebsd.org> <43EB4C00.2030101@freebsd.org> <4417DD8D.3050201@freebsd.org> <4433CA53.5050000@freebsd.org> <444E13BA.8050902@freebsd.org> <20060425175553.GA56011@xor.obsecurity.org> <444F663D.9060905@freebsd.org> <20060426151557.3a46dfbd@localhost> <444F8006.6010609@freebsd.org> <20060426170335.40e95f36@localhost> <20060426174553.43863486@localhost> X-Mailer: Sylpheed-Claws 2.0.0 (GTK+ 2.8.17; i386-portbld-freebsd6.0) X-PGP-KEY-URL: http://www.fabiankeil.de/gpg-keys/freebsd-listen-2006-08-19.asc Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_+6blnOzM4wl3.EtN=RIxFUU"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: freebsd-fs@freebsd.org, freebsd-hackers@freebsd.org, Daichi GOTO , ozawa@ongs.co.jp, freebsd-current@freebsd.org Subject: Re: [ANN] unionfs patchset-11 release X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2006 18:45:07 -0000 --Sig_+6blnOzM4wl3.EtN=RIxFUU Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Fabian Keil wrote: > Fabian Keil wrote: >=20 > > Daichi GOTO wrote: > >=20 > > > Fabian Keil wrote: > > What I'm doing is: > >=20 > > fk@TP51 ~ $mkdir /tmp/unionfs-src/ > > fk@TP51 ~ $mount_unionfs /tmp/unionfs-src /usr/src > > fk@TP51 ~ $cd /usr/src > > fk@TP51 /usr/src $patch -p1 < ~/test/combi.patch > > fk@TP51 /usr/src $find /tmp/unionfs-src/ -type f > > [Panic] > >=20 > > ~/test/combi.patch changes about twenty files. Not exactly: fk@TP51 ~ $grep +++ ~/test/combi.patch | wc -l 38 > > I'm not sure if it's important, but /usr was mounted > > readonly and /tmp is a different file system. I got the same panic with /usr mounted rewritable and both directories on the same file system this time. Running patch -p1 < ~/test/combi.patch seems to be enough to trigger the panic. I tried three runs with a smaller patch (unionfs6-p11.diff) without panic, I then took the bigger patch again and a few seconds later the system panicked. > Another thing which could be significant or not: > After my last mail I closed Xorg and tried to reproduce the > panic two times, but couldn't. After a reboot the panic > occurred right after the first attempt. I'm not sure anymore if I used the same patch the first times. Fabian --=20 http://www.fabiankeil.de/ --Sig_+6blnOzM4wl3.EtN=RIxFUU Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFET7+sjV8GA4rMKUQRAvwxAJ0e5jY/tZQnCSenZ91Q1TdDxxfb8wCghCg4 DMj+PiofG4OaarA0XK01SbI= =8YLQ -----END PGP SIGNATURE----- --Sig_+6blnOzM4wl3.EtN=RIxFUU-- From owner-freebsd-fs@FreeBSD.ORG Wed Apr 26 20:23:57 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0F7FF16A405 for ; Wed, 26 Apr 2006 20:23:57 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh2.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 98EA043D49 for ; Wed, 26 Apr 2006 20:23:56 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.20.100.242] (setupw2.centtech.com [10.20.100.242]) by mh2.centtech.com (8.13.1/8.13.1) with ESMTP id k3QKNq2Q088553; Wed, 26 Apr 2006 15:23:55 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <444FD6CB.2080805@centtech.com> Date: Wed, 26 Apr 2006 15:23:39 -0500 From: Eric Anderson User-Agent: Thunderbird 1.5 (X11/20060402) MIME-Version: 1.0 To: Kent Ho References: <444FA4CF.7040507@outblaze.com> In-Reply-To: <444FA4CF.7040507@outblaze.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1426/Wed Apr 26 13:03:01 2006 on mh2.centtech.com X-Virus-Status: Clean Cc: freebsd-fs@freebsd.org Subject: Re: Do I need to reserve disk space for UFS snapshots? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2006 20:23:57 -0000 Kent Ho wrote: > Hi, > > I'm planing to use FreeBSD snapshots. It seems to be the snapshop image > is placed on the same file system. The question is how do I manage or > reserve space for the snapshots? Can someone give me some guidelines or > pointers. > > Here's my netapp it has a separate area allocated for the snapshots, I'm > keeping 2 weekly snapshots in there(weekly.0 & weekly.1) using around 30G. > > Filesystem kbytes used avail capacity Mounted on > /vol/vol0/ 305052552 272495320 32557232 89% /vol/vol0/ > /vol/vol0/.snapshot 76263136 30658028 45605108 40% > /vol/vol0/.snapshot > > Filesystem iused ifree %iused Mounted on > /vol/vol0/ 10802387 89822586 11% /vol/vol0/ > > If copy all content in vol0 to a FreeBSD and make 2 snapshot will it be > around the same? 272G + 30G = 302G? So if I df on the FreeBSD box > around 302G will be used? > > Any help and information is highly appreciated. FreeBSD snapshots do not work the same way as NetApp snapshots. First, they must reside on the same filesystem as the snapshotted filesystem. They will initially eat up some space upon creation equal to the space used by the cylinder group summaries and superblocks, but it isn't a whole lot. You'll need to have however much space is changed weekly for each snapshot, so if 10Gb per week is changed, then you'll need that much space per snapshot file done. Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-fs@FreeBSD.ORG Wed Apr 26 20:29:51 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0B64B16A401 for ; Wed, 26 Apr 2006 20:29:51 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 935A343D49 for ; Wed, 26 Apr 2006 20:29:47 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 158801A4E6B; Wed, 26 Apr 2006 13:29:47 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id D540D55C11; Wed, 26 Apr 2006 16:29:45 -0400 (EDT) Date: Wed, 26 Apr 2006 16:29:45 -0400 From: Kris Kennaway To: Eric Anderson Message-ID: <20060426202945.GA72171@xor.obsecurity.org> References: <444FA4CF.7040507@outblaze.com> <444FD6CB.2080805@centtech.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="W/nzBZO5zC0uMSeA" Content-Disposition: inline In-Reply-To: <444FD6CB.2080805@centtech.com> User-Agent: Mutt/1.4.2.1i Cc: freebsd-fs@freebsd.org Subject: Re: Do I need to reserve disk space for UFS snapshots? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2006 20:29:51 -0000 --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 26, 2006 at 03:23:39PM -0500, Eric Anderson wrote: > Kent Ho wrote: > >Hi, > > > >I'm planing to use FreeBSD snapshots. It seems to be the snapshop image= =20 > >is placed on the same file system. The question is how do I manage or= =20 > >reserve space for the snapshots? Can someone give me some guidelines or= =20 > >pointers. > > > >Here's my netapp it has a separate area allocated for the snapshots, I'm= =20 > >keeping 2 weekly snapshots in there(weekly.0 & weekly.1) using around 30= G. > > > >Filesystem kbytes used avail capacity Mounted on > >/vol/vol0/ 305052552 272495320 32557232 89% /vol/vol0/ > >/vol/vol0/.snapshot 76263136 30658028 45605108 40%=20 > >/vol/vol0/.snapshot > > > >Filesystem iused ifree %iused Mounted on > >/vol/vol0/ 10802387 89822586 11% /vol/vol0/ > > > >If copy all content in vol0 to a FreeBSD and make 2 snapshot will it be= =20 > >around the same? 272G + 30G =3D 302G? So if I df on the FreeBSD box=20 > >around 302G will be used? > > > >Any help and information is highly appreciated. >=20 >=20 > FreeBSD snapshots do not work the same way as NetApp snapshots. First,= =20 > they must reside on the same filesystem as the snapshotted filesystem.=20 > They will initially eat up some space upon creation equal to the space=20 > used by the cylinder group summaries and superblocks, but it isn't a=20 > whole lot. You'll need to have however much space is changed weekly for= =20 > each snapshot, so if 10Gb per week is changed, then you'll need that=20 > much space per snapshot file done. Also be aware that bad things happen (panics, etc) if your filesystem fills up while snapshots are active! This will hopefully be addressed in a future release. Kris --W/nzBZO5zC0uMSeA Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFET9g4Wry0BWjoQKURAggUAJ9dUZ1sjgUEI0AN/cu1QMnMPHnwcQCgq1OI jFGdc9E8mde7Zp9Ma/YuC/Y= =wr4q -----END PGP SIGNATURE----- --W/nzBZO5zC0uMSeA-- From owner-freebsd-fs@FreeBSD.ORG Wed Apr 26 21:07:50 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 99A9916A40B for ; Wed, 26 Apr 2006 21:07:50 +0000 (UTC) (envelope-from robert@mhi-tx.com) Received: from mail.mhi-tx.com (mail.mhi-tx.com [207.71.0.244]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5BD8B43D97 for ; Wed, 26 Apr 2006 21:07:34 +0000 (GMT) (envelope-from robert@mhi-tx.com) Received: from localhost ([127.0.0.1]) by mail.mhi-tx.com (Kerio MailServer 5.7.10) (using TLSv1/SSLv3 with cipher AES256-SHA (256 bits)) for freebsd-fs@freebsd.org; Wed, 26 Apr 2006 16:01:56 -0500 Message-ID: <444FE114.7010106@mhi-tx.com> Date: Wed, 26 Apr 2006 16:07:32 -0500 From: Robert User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: suspend writes for external snapshot X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2006 21:07:50 -0000 Greetings, I am trying to determine if there is a way to suspend write activity on a FreeBSD filesystem (currently 6.0R) in order to take a snapshot with external SAN software (Falconstor IPStor)? Falconstor does not "support" FreeBSD but I am trying to make it work. I am guessing that if the fs can be put into a state as in "During steps three through six, all write activity on the filesystem is suspended." (http://www.usenix.org/publications/library/proceedings/bsdcon02/mckusick/mckusick_html/index.html) then an external snapshot could be taken of the system using IPStor or any other SAN software? Perhaps a tool that uses vn_start_write() and vn_write_finished() that a sysadmin could use without mucking things up. Am I reading too much into this, should I not worry about the filesystem state and simply allow background fsck to run when booting from any of the inconsistent snapshots? TIA Robert From owner-freebsd-fs@FreeBSD.ORG Wed Apr 26 21:11:02 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 769C116A40A for ; Wed, 26 Apr 2006 21:11:02 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 39EF943D46 for ; Wed, 26 Apr 2006 21:11:02 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 1C8AA1A4E6B; Wed, 26 Apr 2006 14:11:02 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 8D7A255C1F; Wed, 26 Apr 2006 17:11:00 -0400 (EDT) Date: Wed, 26 Apr 2006 17:10:59 -0400 From: Kris Kennaway To: Robert Message-ID: <20060426211059.GA85780@xor.obsecurity.org> References: <444FE114.7010106@mhi-tx.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cNdxnHkX5QqsyA0e" Content-Disposition: inline In-Reply-To: <444FE114.7010106@mhi-tx.com> User-Agent: Mutt/1.4.2.1i Cc: freebsd-fs@freebsd.org Subject: Re: suspend writes for external snapshot X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2006 21:11:02 -0000 --cNdxnHkX5QqsyA0e Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 26, 2006 at 04:07:32PM -0500, Robert wrote: > Greetings, > I am trying to determine if there is a way to suspend write activity on= =20 > a FreeBSD filesystem (currently 6.0R) in order to take a snapshot with=20 > external SAN software (Falconstor IPStor)? Use a FreeBSD snapshot and then image that? Kris --cNdxnHkX5QqsyA0e Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFET+HjWry0BWjoQKURAtCAAJ0W/0tABHEA9rCoaZ2Tn7O8uyWTTACbBT/h WQlsRHb9f/o7IO8lyTNqbtk= =XQlo -----END PGP SIGNATURE----- --cNdxnHkX5QqsyA0e-- From owner-freebsd-fs@FreeBSD.ORG Wed Apr 26 22:23:02 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 19CC016A407 for ; Wed, 26 Apr 2006 22:23:02 +0000 (UTC) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D31243D45 for ; Wed, 26 Apr 2006 22:23:01 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.19.131]) ([10.251.19.131]) by a50.ironport.com with ESMTP; 26 Apr 2006 15:23:00 -0700 Message-ID: <444FF2C4.3040804@elischer.org> Date: Wed, 26 Apr 2006 15:23:00 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Eric Anderson References: <444FA4CF.7040507@outblaze.com> <444FD6CB.2080805@centtech.com> <20060426202945.GA72171@xor.obsecurity.org> In-Reply-To: <20060426202945.GA72171@xor.obsecurity.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org Subject: Re: Do I need to reserve disk space for UFS snapshots? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2006 22:23:02 -0000 Kris Kennaway wrote: >On Wed, Apr 26, 2006 at 03:23:39PM -0500, Eric Anderson wrote: > > >>Kent Ho wrote: >> >> >>>Hi, >>> >>>I'm planing to use FreeBSD snapshots. It seems to be the snapshop image >>>is placed on the same file system. The question is how do I manage or >>>reserve space for the snapshots? Can someone give me some guidelines or >>>pointers. >>> >>>Here's my netapp it has a separate area allocated for the snapshots, I'm >>>keeping 2 weekly snapshots in there(weekly.0 & weekly.1) using around 30G. >>> >>>Filesystem kbytes used avail capacity Mounted on >>>/vol/vol0/ 305052552 272495320 32557232 89% /vol/vol0/ >>>/vol/vol0/.snapshot 76263136 30658028 45605108 40% >>>/vol/vol0/.snapshot >>> >>>Filesystem iused ifree %iused Mounted on >>>/vol/vol0/ 10802387 89822586 11% /vol/vol0/ >>> >>>If copy all content in vol0 to a FreeBSD and make 2 snapshot will it be >>>around the same? 272G + 30G = 302G? So if I df on the FreeBSD box >>>around 302G will be used? >>> >>>Any help and information is highly appreciated. >>> >>> >>FreeBSD snapshots do not work the same way as NetApp snapshots. First, >>they must reside on the same filesystem as the snapshotted filesystem. >>They will initially eat up some space upon creation equal to the space >>used by the cylinder group summaries and superblocks, but it isn't a >>whole lot. You'll need to have however much space is changed weekly for >>each snapshot, so if 10Gb per week is changed, then you'll need that >>much space per snapshot file done. >> >> Kent, The best way to think of UFS snapshots is to consider that there are two filesystems on the same media. They share a lot of data when they are in sync (just after the snapshot is created) so there is very little overhead.. (think of it as a bit like having all the files linked). As the files on the live filesystem are changed, the blocks that hold the original data are unlinked from the live filesystem, and replaced by new blocks that hold the new data. They continue to be linked into the snapshot filesystem however. So the overhead grows to be the size of the difference between the live filesystem, and the snapshot. From owner-freebsd-fs@FreeBSD.ORG Thu Apr 27 03:17:26 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BBD0516A400 for ; Thu, 27 Apr 2006 03:17:26 +0000 (UTC) (envelope-from kent@outblaze.com) Received: from corpmail.outblaze.com (corpmail.outblaze.com [203.86.166.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F59E43D48 for ; Thu, 27 Apr 2006 03:17:26 +0000 (GMT) (envelope-from kent@outblaze.com) Received: from vexira-out.outblaze.com (unknown [210.17.191.253]) by corpmail.outblaze.com (Postfix) with SMTP id 35A7037C88 for ; Thu, 27 Apr 2006 03:16:18 +0000 (GMT) Received: from [192.168.2.177] (210-177-227-130.outblaze.com [210.177.227.130]) by corpmail.outblaze.com (Postfix) with ESMTP id 7A0D516DD83 for ; Thu, 27 Apr 2006 03:16:17 +0000 (GMT) Message-ID: <44503865.4040809@outblaze.com> Date: Thu, 27 Apr 2006 11:20:05 +0800 From: Kent Ho User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: freebsd-fs@freebsd.org References: <444FA4CF.7040507@outblaze.com> <444FD6CB.2080805@centtech.com> In-Reply-To: <444FD6CB.2080805@centtech.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiVirus: Checked by VAMS 1.57.2 Build 1.57.2-21 VDB 8.1162 Subject: Re: Do I need to reserve disk space for UFS snapshots? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Apr 2006 03:17:26 -0000 > FreeBSD snapshots do not work the same way as NetApp snapshots. First, > they must reside on the same filesystem as the snapshotted filesystem. > They will initially eat up some space upon creation equal to the space > used by the cylinder group summaries and superblocks, but it isn't a > whole lot. You'll need to have however much space is changed weekly for > each snapshot, so if 10Gb per week is changed, then you'll need that > much space per snapshot file done. Thanks. FreeBSD cost less in terms of space required to keep snapshots? > > > Eric > > > From owner-freebsd-fs@FreeBSD.ORG Thu Apr 27 12:06:24 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 64E0616A403 for ; Thu, 27 Apr 2006 12:06:24 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh1.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id ECC4D43D4C for ; Thu, 27 Apr 2006 12:06:23 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh1.centtech.com (8.13.1/8.13.1) with ESMTP id k3RC6K8S034943; Thu, 27 Apr 2006 07:06:23 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <4450B3B1.8070704@centtech.com> Date: Thu, 27 Apr 2006 07:06:09 -0500 From: Eric Anderson User-Agent: Thunderbird 1.5 (X11/20060402) MIME-Version: 1.0 To: Kris Kennaway References: <444FE114.7010106@mhi-tx.com> <20060426211059.GA85780@xor.obsecurity.org> In-Reply-To: <20060426211059.GA85780@xor.obsecurity.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1426/Wed Apr 26 13:03:01 2006 on mh1.centtech.com X-Virus-Status: Clean Cc: freebsd-fs@freebsd.org, Robert Subject: Re: suspend writes for external snapshot X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Apr 2006 12:06:24 -0000 Kris Kennaway wrote: > On Wed, Apr 26, 2006 at 04:07:32PM -0500, Robert wrote: >> Greetings, >> I am trying to determine if there is a way to suspend write activity on >> a FreeBSD filesystem (currently 6.0R) in order to take a snapshot with >> external SAN software (Falconstor IPStor)? > > Use a FreeBSD snapshot and then image that? He can't do it that way because the Falconstor is a raw block device and has no idea the difference between a snapshot and other filesystem bits. Robert - we have some very alpha patches in house that allow suspension of UFS filesystems for things like this (also working on online UFS growing). I'm not sure how close we really are to letting it loose in the wild, but we will definitely be making all the patches available to whomever wants it. Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-fs@FreeBSD.ORG Thu Apr 27 14:13:35 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C2C3E16A408 for ; Thu, 27 Apr 2006 14:13:35 +0000 (UTC) (envelope-from robert@mhi-tx.com) Received: from mail.mhi-tx.com (mail.mhi-tx.com [207.71.0.244]) by mx1.FreeBSD.org (Postfix) with ESMTP id 28AA443D49 for ; Thu, 27 Apr 2006 14:13:35 +0000 (GMT) (envelope-from robert@mhi-tx.com) Received: from localhost ([127.0.0.1]) by mail.mhi-tx.com (Kerio MailServer 5.7.10) (using TLSv1/SSLv3 with cipher AES256-SHA (256 bits)); Thu, 27 Apr 2006 09:07:55 -0500 Message-ID: <4450D18D.9060101@mhi-tx.com> Date: Thu, 27 Apr 2006 09:13:33 -0500 From: Robert User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: anderson@centtech.com References: <444FE114.7010106@mhi-tx.com> <20060426211059.GA85780@xor.obsecurity.org> <4450B3B1.8070704@centtech.com> In-Reply-To: <4450B3B1.8070704@centtech.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org Subject: Re: suspend writes for external snapshot X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Apr 2006 14:13:35 -0000 Eric Anderson wrote: > Kris Kennaway wrote: > >> On Wed, Apr 26, 2006 at 04:07:32PM -0500, Robert wrote: >> >>> Greetings, >>> I am trying to determine if there is a way to suspend write activity >>> on a FreeBSD filesystem (currently 6.0R) in order to take a snapshot >>> with external SAN software (Falconstor IPStor)? >> >> >> Use a FreeBSD snapshot and then image that? > > > He can't do it that way because the Falconstor is a raw block device and > has no idea the difference between a snapshot and other filesystem bits. > > > Robert - we have some very alpha patches in house that allow suspension > of UFS filesystems for things like this (also working on online UFS > growing). I'm not sure how close we really are to letting it loose in > the wild, but we will definitely be making all the patches available to > whomever wants it. > > > Eric > > > Sounds great thank you, I will keep an eye out for the patches. I am still unclear as to the necessity of suspending writes based on the following information from http://www.mckusick.com/softdep/ "By ensuring that the only inconsistencies are unclaimed blocks or inodes, soft updates can eliminate the need to run a filesystem check program after every system crash. Instead, the system is brought up immediately. When it is convenient, a snapshot is taken and a background task can be run on on that snapshot to reclaim any lost blocks and inodes. The use of a snapshot allows normal filesystem activity to continue concurrently. " Does this mean that I can take a snapshot of an in use filesystem and the only ill effects will be the lost blocks and inodes which can be reclaimed with background fsck once the snapshot is booted? Robert From owner-freebsd-fs@FreeBSD.ORG Thu Apr 27 14:17:41 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F54716A400 for ; Thu, 27 Apr 2006 14:17:41 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh2.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 049DB43D4C for ; Thu, 27 Apr 2006 14:17:40 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh2.centtech.com (8.13.1/8.13.1) with ESMTP id k3REHe9m032247; Thu, 27 Apr 2006 09:17:40 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <4450D278.5000802@centtech.com> Date: Thu, 27 Apr 2006 09:17:28 -0500 From: Eric Anderson User-Agent: Thunderbird 1.5 (X11/20060402) MIME-Version: 1.0 To: Robert References: <444FE114.7010106@mhi-tx.com> <20060426211059.GA85780@xor.obsecurity.org> <4450B3B1.8070704@centtech.com> <4450D18D.9060101@mhi-tx.com> In-Reply-To: <4450D18D.9060101@mhi-tx.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1426/Wed Apr 26 13:03:01 2006 on mh2.centtech.com X-Virus-Status: Clean Cc: freebsd-fs@freebsd.org Subject: Re: suspend writes for external snapshot X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Apr 2006 14:17:41 -0000 Robert wrote: > Eric Anderson wrote: >> Kris Kennaway wrote: >> >>> On Wed, Apr 26, 2006 at 04:07:32PM -0500, Robert wrote: >>> >>>> Greetings, >>>> I am trying to determine if there is a way to suspend write activity >>>> on a FreeBSD filesystem (currently 6.0R) in order to take a snapshot >>>> with external SAN software (Falconstor IPStor)? >>> >>> >>> Use a FreeBSD snapshot and then image that? >> >> >> He can't do it that way because the Falconstor is a raw block device >> and has no idea the difference between a snapshot and other filesystem >> bits. >> >> >> Robert - we have some very alpha patches in house that allow >> suspension of UFS filesystems for things like this (also working on >> online UFS growing). I'm not sure how close we really are to letting >> it loose in the wild, but we will definitely be making all the patches >> available to whomever wants it. >> >> >> Eric >> >> >> > > Sounds great thank you, I will keep an eye out for the patches. > > I am still unclear as to the necessity of suspending writes based on the > following information from http://www.mckusick.com/softdep/ > > "By ensuring that the only inconsistencies are unclaimed blocks or > inodes, soft updates can eliminate the need to run a filesystem check > program after every system crash. Instead, the system is brought up > immediately. > > When it is convenient, a snapshot is taken and a background task can be > run on on that snapshot to reclaim any lost blocks and inodes. The use > of a snapshot allows normal filesystem activity to continue concurrently. " > > Does this mean that I can take a snapshot of an in use filesystem and > the only ill effects will be the lost blocks and inodes which can be > reclaimed with background fsck once the snapshot is booted? I believe so, yes. Someone correct me here if I am wrong. Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-fs@FreeBSD.ORG Thu Apr 27 15:23:53 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 79CA616A401 for ; Thu, 27 Apr 2006 15:23:53 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id C14C243D55 for ; Thu, 27 Apr 2006 15:23:50 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id k3RFNdW4000898; Thu, 27 Apr 2006 09:23:39 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <4450E1FD.7040008@samsco.org> Date: Thu, 27 Apr 2006 09:23:41 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20051230 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Eric Anderson References: <444FE114.7010106@mhi-tx.com> <20060426211059.GA85780@xor.obsecurity.org> <4450B3B1.8070704@centtech.com> <4450D18D.9060101@mhi-tx.com> <4450D278.5000802@centtech.com> In-Reply-To: <4450D278.5000802@centtech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.org Cc: freebsd-fs@freebsd.org, Robert Subject: Re: suspend writes for external snapshot X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Apr 2006 15:23:53 -0000 Eric Anderson wrote: > Robert wrote: > >> Eric Anderson wrote: >> >>> Kris Kennaway wrote: >>> >>>> On Wed, Apr 26, 2006 at 04:07:32PM -0500, Robert wrote: >>>> >>>>> Greetings, >>>>> I am trying to determine if there is a way to suspend write >>>>> activity on a FreeBSD filesystem (currently 6.0R) in order to take >>>>> a snapshot with external SAN software (Falconstor IPStor)? >>>> >>>> >>>> >>>> Use a FreeBSD snapshot and then image that? >>> >>> >>> >>> He can't do it that way because the Falconstor is a raw block device >>> and has no idea the difference between a snapshot and other >>> filesystem bits. >>> >>> >>> Robert - we have some very alpha patches in house that allow >>> suspension of UFS filesystems for things like this (also working on >>> online UFS growing). I'm not sure how close we really are to letting >>> it loose in the wild, but we will definitely be making all the >>> patches available to whomever wants it. >>> >>> >>> Eric >>> >>> >>> >> >> Sounds great thank you, I will keep an eye out for the patches. >> >> I am still unclear as to the necessity of suspending writes based on >> the following information from http://www.mckusick.com/softdep/ >> >> "By ensuring that the only inconsistencies are unclaimed blocks or >> inodes, soft updates can eliminate the need to run a filesystem check >> program after every system crash. Instead, the system is brought up >> immediately. >> >> When it is convenient, a snapshot is taken and a background task can >> be run on on that snapshot to reclaim any lost blocks and inodes. The >> use of a snapshot allows normal filesystem activity to continue >> concurrently. " >> >> Does this mean that I can take a snapshot of an in use filesystem and >> the only ill effects will be the lost blocks and inodes which can be >> reclaimed with background fsck once the snapshot is booted? > > > I believe so, yes. Someone correct me here if I am wrong. > > Ideally, yes. But for the purposes of snapshots, you want the filesystem to be flushed. Otherwise you might catch an in-progress operation like a file add/delete/truncate that would be better off finished before taking the snapshot Scott From owner-freebsd-fs@FreeBSD.ORG Fri Apr 28 12:09:02 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E529316A400 for ; Fri, 28 Apr 2006 12:09:02 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from fw.zoral.com.ua (ll-227.216.82.212.sovam.net.ua [212.82.216.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 064B543D45 for ; Fri, 28 Apr 2006 12:09:01 +0000 (GMT) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id k3SC8tVf018161 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 28 Apr 2006 15:08:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.6/8.13.6) with ESMTP id k3SC8txY001876 for ; Fri, 28 Apr 2006 15:08:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.6/8.13.6/Submit) id k3SC8t9I001875 for freebsd-fs@freebsd.org; Fri, 28 Apr 2006 15:08:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 28 Apr 2006 15:08:55 +0300 From: Kostik Belousov To: freebsd-fs@freebsd.org Message-ID: <20060428120855.GB1270@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NMuMz9nt05w80d4+" Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.88.1, clamav-milter version 0.88.1 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on fw.zoral.com.ua Subject: vn_start_write(9) recursion ? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Apr 2006 12:09:03 -0000 --NMuMz9nt05w80d4+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline vn_start_write(9) shall not be called recursively (at least, not without V_NOWAIT flag). Otherwise, system may deadlock if vn_write_suspend(9) is called between. Am I right ? --NMuMz9nt05w80d4+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFEUgXWC3+MBN1Mb4gRAq5/AKCVpOTqwuFqPt15PLpZkNMgorm7lQCfTvor mHKwnG5FQ3y9wC4LUTHdIig= =7jtk -----END PGP SIGNATURE----- --NMuMz9nt05w80d4+-- From owner-freebsd-fs@FreeBSD.ORG Fri Apr 28 13:00:38 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 18DD716A401 for ; Fri, 28 Apr 2006 13:00:38 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from fw.zoral.com.ua (ll-227.216.82.212.sovam.net.ua [212.82.216.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 36B8943D45 for ; Fri, 28 Apr 2006 13:00:36 +0000 (GMT) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id k3SD0VWw024180 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 28 Apr 2006 16:00:31 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.6/8.13.6) with ESMTP id k3SD0UPU002874 for ; Fri, 28 Apr 2006 16:00:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.6/8.13.6/Submit) id k3SD0UPr002873 for freebsd-fs@freebsd.org; Fri, 28 Apr 2006 16:00:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 28 Apr 2006 16:00:30 +0300 From: Kostik Belousov To: freebsd-fs@freebsd.org Message-ID: <20060428130030.GC1270@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.88.1, clamav-milter version 0.88.1 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on fw.zoral.com.ua Subject: vn_lock & ffs_snapremove X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Apr 2006 13:00:38 -0000 Look at the two code fragments 1. from vn_lock(9): error = VOP_LOCK(vp, flags | LK_INTERLOCK, td); flags &= ~LK_INTERLOCK; KASSERT((flags & LK_RETRY) == 0 || error == 0, ("LK_RETRY set with incompatible flags %d\n", flags)); /* * Callers specify LK_RETRY if they wish to get dead vnodes. * If RETRY is not set, we return ENOENT instead. */ if (error == 0 && vp->v_iflag & VI_DOOMED && (flags & LK_RETRY) == 0) { VOP_UNLOCK(vp, 0, td); error = ENOENT; break; } 2. ffs_snapremove(9): (vp->v_vnlock for snapshot vnode vp points to sn_snlock) lkp = vp->v_vnlock; vp->v_vnlock = &vp->v_lock; Is there anything that would prevent these two fragments to intervene ? Esp. bad looks the situation where VOP_LOCK() from vn_lock executed and locked doomed snapshot vnode, after that ffs_snapremove replaces vnode lock and VOP_UNLOCK attempted on _another_ lock. If this scenario can happen (as it seems), then, probably, some measures like transferlockers(9) are needed ? From owner-freebsd-fs@FreeBSD.ORG Fri Apr 28 14:03:40 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1716016A400 for ; Fri, 28 Apr 2006 14:03:40 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7865D43D4C for ; Fri, 28 Apr 2006 14:03:38 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id C289352C6D; Fri, 28 Apr 2006 16:03:36 +0200 (CEST) Received: from localhost (ana50.internetdsl.tpnet.pl [83.17.82.50]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 816F150B0D; Fri, 28 Apr 2006 16:03:30 +0200 (CEST) Date: Fri, 28 Apr 2006 16:02:05 +0200 From: Pawel Jakub Dawidek To: Kostik Belousov Message-ID: <20060428140205.GD864@garage.freebsd.pl> References: <20060428120855.GB1270@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oj4kGyHlBMXGt3Le" Content-Disposition: inline In-Reply-To: <20060428120855.GB1270@deviant.kiev.zoral.com.ua> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r535 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-fs@freebsd.org Subject: Re: vn_start_write(9) recursion ? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Apr 2006 14:03:40 -0000 --oj4kGyHlBMXGt3Le Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 28, 2006 at 03:08:55PM +0300, Kostik Belousov wrote: +> vn_start_write(9) shall not be called recursively (at least, not without +> V_NOWAIT flag). Otherwise, system may deadlock if vn_write_suspend(9) +> is called between. Yes, you are right. Nice catch, actually. I hacked this patch to detect it: http://people.freebsd.org/~pjd/patches/vn_start_write_recursion.patch And it panics on boot. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --oj4kGyHlBMXGt3Le Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFEUiBdForvXbEpPzQRArhaAKC1iepGOeOKxIQi1CUZ4E94pvZ7wgCfUkJR zeDv3i7W4PvcOzhL4Lgy65Y= =DMT9 -----END PGP SIGNATURE----- --oj4kGyHlBMXGt3Le-- From owner-freebsd-fs@FreeBSD.ORG Fri Apr 28 14:16:25 2006 Return-Path: X-Original-To: freebsd-fs@FreeBSD.org Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5381F16A401; Fri, 28 Apr 2006 14:16:25 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from fw.zoral.com.ua (ll-227.216.82.212.sovam.net.ua [212.82.216.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 44C7943D48; Fri, 28 Apr 2006 14:16:24 +0000 (GMT) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id k3SEGIIs026350 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 28 Apr 2006 17:16:18 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.6/8.13.6) with ESMTP id k3SEGHFI004418; Fri, 28 Apr 2006 17:16:17 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.6/8.13.6/Submit) id k3SEGHQX004417; Fri, 28 Apr 2006 17:16:17 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 28 Apr 2006 17:16:17 +0300 From: Kostik Belousov To: Pawel Jakub Dawidek Message-ID: <20060428141617.GD1270@deviant.kiev.zoral.com.ua> References: <20060428120855.GB1270@deviant.kiev.zoral.com.ua> <20060428140205.GD864@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lMM8JwqTlfDpEaS6" Content-Disposition: inline In-Reply-To: <20060428140205.GD864@garage.freebsd.pl> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.88.1, clamav-milter version 0.88.1 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on fw.zoral.com.ua Cc: freebsd-fs@FreeBSD.org Subject: Re: vn_start_write(9) recursion ? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Apr 2006 14:16:25 -0000 --lMM8JwqTlfDpEaS6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 28, 2006 at 04:02:05PM +0200, Pawel Jakub Dawidek wrote: > On Fri, Apr 28, 2006 at 03:08:55PM +0300, Kostik Belousov wrote: > +> vn_start_write(9) shall not be called recursively (at least, not witho= ut > +> V_NOWAIT flag). Otherwise, system may deadlock if vn_write_suspend(9) > +> is called between. >=20 > Yes, you are right. Nice catch, actually. >=20 > I hacked this patch to detect it: >=20 > http://people.freebsd.org/~pjd/patches/vn_start_write_recursion.patch >=20 > And it panics on boot. Incredible ! Please, commit it ! This would save me at least a day starring at struct mount with mnt_writeopcount and (still) no writers. For instance, such situation occurs in quotactl/quotaoff case. --lMM8JwqTlfDpEaS6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFEUiOwC3+MBN1Mb4gRAofgAJ0RQhUZXXCpeTtDRRYBb8Ns1LHonACcClsv Tl4ySvRSgtKG6r//UtZhyxg= =uRKi -----END PGP SIGNATURE----- --lMM8JwqTlfDpEaS6-- From owner-freebsd-fs@FreeBSD.ORG Fri Apr 28 14:25:29 2006 Return-Path: X-Original-To: freebsd-fs@FreeBSD.org Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 560A616A401 for ; Fri, 28 Apr 2006 14:25:29 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 076E943D58 for ; Fri, 28 Apr 2006 14:25:22 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 72D2E52C6D; Fri, 28 Apr 2006 16:25:21 +0200 (CEST) Received: from localhost (ana50.internetdsl.tpnet.pl [83.17.82.50]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 9BCE851D2C; Fri, 28 Apr 2006 16:25:14 +0200 (CEST) Date: Fri, 28 Apr 2006 16:23:49 +0200 From: Pawel Jakub Dawidek To: Kostik Belousov Message-ID: <20060428142349.GE864@garage.freebsd.pl> References: <20060428120855.GB1270@deviant.kiev.zoral.com.ua> <20060428140205.GD864@garage.freebsd.pl> <20060428141617.GD1270@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3O1VwFp74L81IIeR" Content-Disposition: inline In-Reply-To: <20060428141617.GD1270@deviant.kiev.zoral.com.ua> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r535 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-fs@FreeBSD.org Subject: Re: vn_start_write(9) recursion ? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Apr 2006 14:25:29 -0000 --3O1VwFp74L81IIeR Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 28, 2006 at 05:16:17PM +0300, Kostik Belousov wrote: +> On Fri, Apr 28, 2006 at 04:02:05PM +0200, Pawel Jakub Dawidek wrote: +> > On Fri, Apr 28, 2006 at 03:08:55PM +0300, Kostik Belousov wrote: +> > +> vn_start_write(9) shall not be called recursively (at least, not wi= thout +> > +> V_NOWAIT flag). Otherwise, system may deadlock if vn_write_suspend(= 9) +> > +> is called between. +> >=20 +> > Yes, you are right. Nice catch, actually. +> >=20 +> > I hacked this patch to detect it: +> >=20 +> > http://people.freebsd.org/~pjd/patches/vn_start_write_recursion.patch +> >=20 +> > And it panics on boot. +>=20 +> Incredible ! Please, commit it ! Not sure if this is good idea to abuse td_pflags for debugging purpose... But we have plenty of room in there, so maybe its worth it. I'll ask few other guys what they think about it. +> This would save me at least a day starring at struct mount with +> mnt_writeopcount and (still) no writers. +>=20 +> For instance, such situation occurs in quotactl/quotaoff case. This could be the hang I'm chasing, btw:) --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --3O1VwFp74L81IIeR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFEUiV1ForvXbEpPzQRAjyWAJ9xjLxIpOzDQUvKvu5mgqxRE23bxgCcCcVd fqu4s9HlHqarZ2T6KYBqHM8= =2Hw3 -----END PGP SIGNATURE----- --3O1VwFp74L81IIeR-- From owner-freebsd-fs@FreeBSD.ORG Fri Apr 28 14:48:49 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2C4CF16A403; Fri, 28 Apr 2006 14:48:49 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from fw.zoral.com.ua (ll-227.216.82.212.sovam.net.ua [212.82.216.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 14F9543D46; Fri, 28 Apr 2006 14:48:47 +0000 (GMT) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id k3SEmfRP027149 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 28 Apr 2006 17:48:41 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.6/8.13.6) with ESMTP id k3SEmfYM005021; Fri, 28 Apr 2006 17:48:41 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.6/8.13.6/Submit) id k3SEme4A005020; Fri, 28 Apr 2006 17:48:40 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 28 Apr 2006 17:48:40 +0300 From: Kostik Belousov To: Pawel Jakub Dawidek Message-ID: <20060428144840.GA4436@deviant.kiev.zoral.com.ua> References: <20060428120855.GB1270@deviant.kiev.zoral.com.ua> <20060428140205.GD864@garage.freebsd.pl> <20060428141617.GD1270@deviant.kiev.zoral.com.ua> <20060428142349.GE864@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="azLHFNyN32YCQGCU" Content-Disposition: inline In-Reply-To: <20060428142349.GE864@garage.freebsd.pl> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.88.1, clamav-milter version 0.88.1 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on fw.zoral.com.ua Cc: freebsd-fs@freebsd.org Subject: Re: vn_start_write(9) recursion ? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Apr 2006 14:48:49 -0000 --azLHFNyN32YCQGCU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 28, 2006 at 04:23:49PM +0200, Pawel Jakub Dawidek wrote: > On Fri, Apr 28, 2006 at 05:16:17PM +0300, Kostik Belousov wrote: > +> On Fri, Apr 28, 2006 at 04:02:05PM +0200, Pawel Jakub Dawidek wrote: > +> > On Fri, Apr 28, 2006 at 03:08:55PM +0300, Kostik Belousov wrote: > +> > +> vn_start_write(9) shall not be called recursively (at least, not = without > +> > +> V_NOWAIT flag). Otherwise, system may deadlock if vn_write_suspen= d(9) > +> > +> is called between. > +> >=20 > +> > Yes, you are right. Nice catch, actually. > +> >=20 > +> > I hacked this patch to detect it: > +> >=20 > +> > http://people.freebsd.org/~pjd/patches/vn_start_write_recursion.pat= ch > +> >=20 > +> > And it panics on boot. > +>=20 > +> Incredible ! Please, commit it ! >=20 > Not sure if this is good idea to abuse td_pflags for debugging > purpose... But we have plenty of room in there, so maybe its worth it. > I'll ask few other guys what they think about it. >=20 > +> This would save me at least a day starring at struct mount with > +> mnt_writeopcount and (still) no writers. > +>=20 > +> For instance, such situation occurs in quotactl/quotaoff case. >=20 > This could be the hang I'm chasing, btw:) This deadlock manifests itself as bunch of processes in "suspfs" state and (usually) mksnap_ffs in "suspwt" state, without any other blocks. One of the "suspfs"-blocked processes called vn_start_write recursively. It seems that for the main tree there is no other way to produce the deadlock situation except running mksnap. --azLHFNyN32YCQGCU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFEUitHC3+MBN1Mb4gRAq13AJ0fSvOCvucqemobYmyAsJNzKc2MPwCg2Ca5 UxBuqTSuOK0FF/GGk4WNqLs= =XkZF -----END PGP SIGNATURE----- --azLHFNyN32YCQGCU-- From owner-freebsd-fs@FreeBSD.ORG Fri Apr 28 22:57:58 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 375A116A403 for ; Fri, 28 Apr 2006 22:57:58 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.239]) by mx1.FreeBSD.org (Postfix) with ESMTP id A688E43D45 for ; Fri, 28 Apr 2006 22:57:57 +0000 (GMT) (envelope-from kabaev@gmail.com) Received: by wproxy.gmail.com with SMTP id 67so211058wri for ; Fri, 28 Apr 2006 15:57:57 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type; b=W6YSTd7AwmFrIo/6YHwxu19MYLCDhqW/FflBbQ3aeThLyyuwFp1+UYAAlnQeC+gV3+WQQe7eBANftIlCbUROY93a8hS1wuwy8npsHlSVtWesemSJa3aJ6bOvR0AGMpytVzcBoweGZcvmBMSpdeSZp0bmaR3vFNbLY5M3cHzgz0I= Received: by 10.54.132.6 with SMTP id f6mr1403809wrd; Fri, 28 Apr 2006 15:57:57 -0700 (PDT) Received: from kan.dnsalias.net ( [24.63.93.195]) by mx.gmail.com with ESMTP id g2sm470467wra.2006.04.28.15.57.55; Fri, 28 Apr 2006 15:57:56 -0700 (PDT) Date: Fri, 28 Apr 2006 18:57:49 -0400 From: Alexander Kabaev To: Kostik Belousov Message-ID: <20060428185749.171da2bc@kan.dnsalias.net> In-Reply-To: <20060428130030.GC1270@deviant.kiev.zoral.com.ua> References: <20060428130030.GC1270@deviant.kiev.zoral.com.ua> X-Mailer: Sylpheed-Claws 2.0.0 (GTK+ 2.8.16; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Sig_BsjT3F45573+LDgRIER.bfC; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: freebsd-fs@freebsd.org Subject: Re: vn_lock & ffs_snapremove X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Apr 2006 22:57:58 -0000 --Sig_BsjT3F45573+LDgRIER.bfC Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable On Fri, 28 Apr 2006 16:00:30 +0300 Kostik Belousov wrote: > Look at the two code fragments >=20 > 1. from vn_lock(9): >=20 > error =3D VOP_LOCK(vp, flags | LK_INTERLOCK, td); > flags &=3D ~LK_INTERLOCK; > KASSERT((flags & LK_RETRY) =3D=3D 0 || error =3D=3D 0, > ("LK_RETRY set with incompatible flags %d\n", > flags)); /* > * Callers specify LK_RETRY if they wish to get dead > vnodes. > * If RETRY is not set, we return ENOENT instead. > */ > if (error =3D=3D 0 && vp->v_iflag & VI_DOOMED && > (flags & LK_RETRY) =3D=3D 0) { > VOP_UNLOCK(vp, 0, td); > error =3D ENOENT; > break; > } >=20 > 2. ffs_snapremove(9): >=20 > (vp->v_vnlock for snapshot vnode vp points to sn_snlock) > lkp =3D vp->v_vnlock; > vp->v_vnlock =3D &vp->v_lock; >=20 > Is there anything that would prevent these two fragments to > intervene ? Esp. bad looks the situation where VOP_LOCK() from > vn_lock executed and locked doomed snapshot vnode, after that > ffs_snapremove replaces vnode lock and VOP_UNLOCK attempted on > _another_ lock. >=20 > If this scenario can happen (as it seems), then, probably, > some measures like transferlockers(9) are needed ? > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" =F0=D2=C9=D7=C5=D4, =D4=D5=D4 =D7=CF=DA=CE=C9=CB=CC=CF =D0=D2=C5=C4=CC=CF=D6=C5=CE=C9=C5 =CE=C1= =CB=C1=DA=C1=D4=D8 =D4=C5=C2=D1 commit bit-=CF=CD. =E9=CE=D4=C5=D2=C5=D3=D5= =C5=D4 =CD=CE=C5=CE=C9=C5 =D3=C1=CD=CF=C7=CF =CE=C1=CB=C1=DA=D5=C5=CD=CF=C7=CF =CE=C1 =DC=D4=CF =D0= =D2=C5=C4=CC=CF=D6=C5=CE=C9=C5 :) --=20 Alexander Kabaev --Sig_BsjT3F45573+LDgRIER.bfC Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFEUp3zQ6z1jMm+XZYRAoEWAJ9VtwZg94ZLbvmlsUPOYsxLUmfG+gCg1Zq4 ioRpw9kTRUfSlqW4KQV/hIc= =bk5j -----END PGP SIGNATURE----- --Sig_BsjT3F45573+LDgRIER.bfC-- From owner-freebsd-fs@FreeBSD.ORG Fri Apr 28 23:06:26 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D55C116A400 for ; Fri, 28 Apr 2006 23:06:26 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 261BB43D46 for ; Fri, 28 Apr 2006 23:06:26 +0000 (GMT) (envelope-from kabaev@gmail.com) Received: by wproxy.gmail.com with SMTP id 67so211920wri for ; Fri, 28 Apr 2006 16:06:25 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type; b=kGuVIXe7FnWIeyIWL7GvrBP3azphHvhdmw3OkUtwTXGB/PmN8kYzy30mK+Ucx8zyeuUxt/0Lc3ATPu8RZ5yy84WAjve+bKe34UBIXFVnmh7uSpSEfqvHQp6WiKiWTDUbLRy9ldDwUffZXL9XXRsaGo9ymTlyQHcWd9T4m/tylGs= Received: by 10.54.132.6 with SMTP id f6mr1412617wrd; Fri, 28 Apr 2006 16:06:25 -0700 (PDT) Received: from kan.dnsalias.net ( [24.63.93.195]) by mx.gmail.com with ESMTP id 27sm2968345wrl.2006.04.28.16.06.24; Fri, 28 Apr 2006 16:06:24 -0700 (PDT) Date: Fri, 28 Apr 2006 19:06:13 -0400 From: Alexander Kabaev To: Alexander Kabaev Message-ID: <20060428190613.45f72f84@kan.dnsalias.net> In-Reply-To: <20060428185749.171da2bc@kan.dnsalias.net> References: <20060428130030.GC1270@deviant.kiev.zoral.com.ua> <20060428185749.171da2bc@kan.dnsalias.net> X-Mailer: Sylpheed-Claws 2.0.0 (GTK+ 2.8.16; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Sig_.YN5kr1+mMa.icmu778WIth; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: freebsd-fs@freebsd.org Subject: Re: vn_lock & ffs_snapremove X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Apr 2006 23:06:27 -0000 --Sig_.YN5kr1+mMa.icmu778WIth Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable On Fri, 28 Apr 2006 18:57:49 -0400 Alexander Kabaev wrote: > On Fri, 28 Apr 2006 16:00:30 +0300 > Kostik Belousov wrote: >=20 > > Look at the two code fragments > >=20 > > 1. from vn_lock(9): > >=20 > > error =3D VOP_LOCK(vp, flags | LK_INTERLOCK, td); > > flags &=3D ~LK_INTERLOCK; > > KASSERT((flags & LK_RETRY) =3D=3D 0 || error =3D=3D 0, > > ("LK_RETRY set with incompatible flags %d\n", > > flags)); /* > > * Callers specify LK_RETRY if they wish to get dead > > vnodes. > > * If RETRY is not set, we return ENOENT instead. > > */ > > if (error =3D=3D 0 && vp->v_iflag & VI_DOOMED && > > (flags & LK_RETRY) =3D=3D 0) { > > VOP_UNLOCK(vp, 0, td); > > error =3D ENOENT; > > break; > > } > >=20 > > 2. ffs_snapremove(9): > >=20 > > (vp->v_vnlock for snapshot vnode vp points to sn_snlock) > > lkp =3D vp->v_vnlock; > > vp->v_vnlock =3D &vp->v_lock; > >=20 > > Is there anything that would prevent these two fragments to > > intervene ? Esp. bad looks the situation where VOP_LOCK() from > > vn_lock executed and locked doomed snapshot vnode, after that > > ffs_snapremove replaces vnode lock and VOP_UNLOCK attempted on > > _another_ lock. > >=20 > > If this scenario can happen (as it seems), then, probably, > > some measures like transferlockers(9) are needed ? > > _______________________________________________ > > freebsd-fs@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > > To unsubscribe, send any mail to > > "freebsd-fs-unsubscribe@freebsd.org" >=20 > =F0=D2=C9=D7=C5=D4, >=20 > =D4=D5=D4 =D7=CF=DA=CE=C9=CB=CC=CF =D0=D2=C5=C4=CC=CF=D6=C5=CE=C9=C5 =CE= =C1=CB=C1=DA=C1=D4=D8 =D4=C5=C2=D1 commit bit-=CF=CD. =E9=CE=D4=C5=D2=C5=D3= =D5=C5=D4 > =CD=CE=C5=CE=C9=C5 =D3=C1=CD=CF=C7=CF =CE=C1=CB=C1=DA=D5=C5=CD=CF=C7=CF = =CE=C1 =DC=D4=CF =D0=D2=C5=C4=CC=CF=D6=C5=CE=C9=C5 :) >=20 > --=20 > Alexander Kabaev Sorry for wide distribution. Throw stones in my direction, please. --=20 Alexander Kabaev --Sig_.YN5kr1+mMa.icmu778WIth Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFEUp/vQ6z1jMm+XZYRAmeKAJsF6QubAgB9sdO4Sd37hIuktXYjtgCgp/zz pbUDz2A1hjBSaa9nE6yrzEk= =9REo -----END PGP SIGNATURE----- --Sig_.YN5kr1+mMa.icmu778WIth--