From owner-freebsd-fs@FreeBSD.ORG Wed Sep 29 08:14:13 2004 Return-Path: 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 BA40916A4CE; Wed, 29 Sep 2004 08:14:13 +0000 (GMT) Received: from blackwater.lemis.com (wantadilla.lemis.com [192.109.197.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CDC743D2D; Wed, 29 Sep 2004 08:14:12 +0000 (GMT) (envelope-from grog@lemis.com) Received: by blackwater.lemis.com (Postfix, from userid 1004) id 37F4A85658; Wed, 29 Sep 2004 17:44:09 +0930 (CST) Date: Wed, 29 Sep 2004 17:44:09 +0930 From: Greg 'groggy' Lehey To: fs@FreeBSD.org, FreeBSD current users Message-ID: <20040929081409.GH20397@wantadilla.lemis.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qVHblb/y9DPlgkHs" Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 Subject: Daily panic in getnewvnode X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Sep 2004 08:14:14 -0000 --qVHblb/y9DPlgkHs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline For the last month I've been getting a daily panic out of getvnode. A brief summary: - Panic message is "Cleaned vnode isn't". This means that the vnode pulled off the free list and cleaned with vtryrecycle still has the vp->v_data field set. - It happens during the nightly cron jobs. - The program in question is find, going through a large disk (200 GB, several million files). - The disk does not seem to be getting fsck'd. - The test in question is part of the INVARIANTS checking code, so if I turned INVARIANTS off, the panic would no longer occur. I suspect that if I ran fsck on the disk, it would also solve the problem. The reason I haven't done so is because I chose this particular panic to document for my next kernel debugging tutorial. Unfortunately, I'm running out of time, and I'd really like to find the *real* cause of this bug. If anybody's seen anything like this, please let me know. I have a draft of my tutorial notes at http://www.lemis.com/grog/handout.pdf, and the description starts on page 86. If anybody can help me clarify the problem, I'd be very grateful. Greg -- See complete headers for address and phone numbers. --qVHblb/y9DPlgkHs Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBWm7RIubykFB6QiMRAicmAJ9IQHM5Hn6JaUKHykqARalM+XJTLQCfauf+ 2dK6yz7TMrYZCqh7Pmgmnco= =Ca80 -----END PGP SIGNATURE----- --qVHblb/y9DPlgkHs-- From owner-freebsd-fs@FreeBSD.ORG Wed Sep 29 14:10:02 2004 Return-Path: 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 02E5C16A4CE for ; Wed, 29 Sep 2004 14:10:02 +0000 (GMT) Received: from main.dca.nnov.ru (altex-nevsk.mts-nn.ru [213.177.120.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9CE3C43D55 for ; Wed, 29 Sep 2004 14:09:55 +0000 (GMT) (envelope-from tae@altex.nnov.ru) Received: from localhost.nevskogo.texslujba.adm (test.nevskogo.cisco.comers [192.168.10.66]) by main.dca.nnov.ru (8.12.10/8.12.10) with ESMTP id i8TE9rbg030803 for ; Wed, 29 Sep 2004 18:09:53 +0400 (MSD) (envelope-from tae@altex.nnov.ru) To: freebsd-fs@freebsd.org Date: Wed, 29 Sep 2004 18:11:09 +0400 From: "Alexey Tarakanov" Organization: ALTEX Content-Type: text/plain; format=flowed; delsp=yes; charset=koi8-r MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: User-Agent: Opera M2/7.50 (FreeBSD, build 673) Subject: vmware error X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Sep 2004 14:10:02 -0000 Hi, all ! I completed VMWARE 3.2.1 (build 2242) under FreeBSD 4.10- RELEASE. There is an error "Cannot attach shared memory segment is produced: invalid argument. Faild to inizialize SVGA device." The part of my XF86Config is: Section "Device" Identifier "Card0" Driver "ati" VendorName " ATI Technologies Inc " BoardName " Radeon Mobility M7 LW [Radeon Mobility 7500] " BusID "PCI:1:0:0" EndSection In what can be a problem? -- Best regards Alexey Tarakanov mailto:tae@altex.nnov.ru From owner-freebsd-fs@FreeBSD.ORG Wed Sep 29 17:14:07 2004 Return-Path: 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 8BB8E16A4CE for ; Wed, 29 Sep 2004 17:14:07 +0000 (GMT) Received: from pd4mo2so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 284D643D41 for ; Wed, 29 Sep 2004 17:14:07 +0000 (GMT) (envelope-from nehalmistry@gmx.net) Received: from pd5mr8so.prod.shaw.ca (pd5mr8so-qfe3.prod.shaw.ca [10.0.141.184]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0I4T00BM0BV0JQB0@l-daemon> for freebsd-fs@freebsd.org; Wed, 29 Sep 2004 11:13:48 -0600 (MDT) Received: from pn2ml5so.prod.shaw.ca ([10.0.121.149]) by pd5mr8so.prod.shaw.ca (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0I4T00CJGBV0VE40@pd5mr8so.prod.shaw.ca> for freebsd-fs@freebsd.org; Wed, 29 Sep 2004 11:13:48 -0600 (MDT) Received: from nehal (S0106000ae6ceb225.vf.shawcable.net [70.68.12.33]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003)) with SMTP id <0I4T00LJBBV0WV@l-daemon> for freebsd-fs@freebsd.org; Wed, 29 Sep 2004 11:13:48 -0600 (MDT) Date: Wed, 29 Sep 2004 10:14:03 -0700 From: Nehal To: freebsd-fs@freebsd.org Message-id: <20040929101403.000027aa@nehal> MIME-version: 1.0 X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.3.0; Win32) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit Subject: data blocks question X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Sep 2004 17:14:07 -0000 on my ufs2 partition, there is a file that has a size of 65536, and has 2 direct blocks only. the block size of the fs is 16k and fragment block size is 2k. how can this be possible? wouldn't 2 direct blocks mean that the maximum size is 2x16k = 32k? or am i not understanding something correctly? i've made a copy of the file, and the new file has 4 direct blocks. it is a binary file, and i can read it fine (ie, cat it). i've done fsck on the filesystem and it found no problem. Nehal From owner-freebsd-fs@FreeBSD.ORG Wed Sep 29 20:42:40 2004 Return-Path: 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 1537F16A4CE for ; Wed, 29 Sep 2004 20:42:40 +0000 (GMT) Received: from VARK.MIT.EDU (VARK.MIT.EDU [18.95.3.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id C148943D53 for ; Wed, 29 Sep 2004 20:42:39 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (localhost [127.0.0.1]) by VARK.MIT.EDU (8.13.1/8.12.10) with ESMTP id i8TKgXUJ030857; Wed, 29 Sep 2004 16:42:33 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.MIT.EDU (8.13.1/8.12.10/Submit) id i8TKgX03030856; Wed, 29 Sep 2004 16:42:33 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Wed, 29 Sep 2004 16:42:33 -0400 From: David Schultz To: Nehal Message-ID: <20040929204233.GB30629@VARK.MIT.EDU> Mail-Followup-To: Nehal , freebsd-fs@FreeBSD.ORG References: <20040929101403.000027aa@nehal> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040929101403.000027aa@nehal> cc: freebsd-fs@FreeBSD.ORG Subject: Re: data blocks question X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Sep 2004 20:42:40 -0000 On Wed, Sep 29, 2004, Nehal wrote: > on my ufs2 partition, there is a file that has a size of 65536, > and has 2 direct blocks only. the block size of the fs is 16k and > fragment block size is 2k. > > how can this be possible? wouldn't 2 direct blocks mean that the > maximum size is 2x16k = 32k? or am i not understanding something > correctly? > > i've made a copy of the file, and the new file has 4 direct > blocks. > > it is a binary file, and i can read it fine (ie, cat it). i've > done fsck on the filesystem and it found no problem. Yes, UFS supports sparse files. That is, you can have a file with parts you haven't written to, and the blocks for those parts won't be allocated. The cp utility doesn't know about this, though, so copies will have the ``holes'' filled with zeroes. From owner-freebsd-fs@FreeBSD.ORG Wed Sep 29 22:33:14 2004 Return-Path: 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 39EB616A4CE for ; Wed, 29 Sep 2004 22:33:14 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id DEDFA43D1F for ; Wed, 29 Sep 2004 22:33:13 +0000 (GMT) (envelope-from vladgalu@gmail.com) Received: by mproxy.gmail.com with SMTP id 74so135186rnk for ; Wed, 29 Sep 2004 15:33:08 -0700 (PDT) Received: by 10.38.208.53 with SMTP id f53mr2269508rng; Wed, 29 Sep 2004 15:33:06 -0700 (PDT) Received: by 10.39.1.10 with HTTP; Wed, 29 Sep 2004 15:33:06 -0700 (PDT) Message-ID: <79722fad04092915331623fc0d@mail.gmail.com> Date: Thu, 30 Sep 2004 01:33:06 +0300 From: Vlad GALU To: freebsd-fs@freebsd.org In-Reply-To: <79722fad04092915326ac6185e@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <79722fad04092915326ac6185e@mail.gmail.com> Subject: Fwd: vmware error X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Vlad GALU List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Sep 2004 22:33:14 -0000 ---------- Forwarded message ---------- From: Vlad GALU Date: Thu, 30 Sep 2004 01:32:49 +0300 Subject: Re: vmware error To: Alexey Tarakanov Your kernel lacks support for SYSV shared memory. Add SYSVSHM, SYSVSEM and SYSVMSG to your kernel configuration file and recompile. You will now only need the first of the above three options, but it's better to have them all, who knows in the future what software will require them. On Wed, 29 Sep 2004 18:11:09 +0400, Alexey Tarakanov wrote: > Hi, all ! > I completed VMWARE 3.2.1 (build 2242) under FreeBSD 4.10- RELEASE. > There is an error "Cannot attach shared memory segment is produced: > invalid argument. Faild to inizialize SVGA device." > The part of my XF86Config is: > Section "Device" > Identifier "Card0" > Driver "ati" > VendorName " ATI Technologies Inc " > BoardName " Radeon Mobility M7 LW [Radeon Mobility 7500] " > BusID "PCI:1:0:0" > EndSection > In what can be a problem? > -- > Best regards > Alexey Tarakanov > mailto:tae@altex.nnov.ru > _______________________________________________ > 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" > -- If it's there, and you can see it, it's real. If it's not there, and you can see it, it's virtual. If it's there, and you can't see it, it's transparent. If it's not there, and you can't see it, you erased it. -- If it's there, and you can see it, it's real. If it's not there, and you can see it, it's virtual. If it's there, and you can't see it, it's transparent. If it's not there, and you can't see it, you erased it. From owner-freebsd-fs@FreeBSD.ORG Wed Sep 29 22:43:13 2004 Return-Path: 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 702D116A4D0; Wed, 29 Sep 2004 22:43:13 +0000 (GMT) Received: from pd2mo2so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F1A543D54; Wed, 29 Sep 2004 22:43:13 +0000 (GMT) (envelope-from nehalmistry@gmx.net) Received: from pd5mr3so.prod.shaw.ca (pd5mr3so-qfe3.prod.shaw.ca [10.0.141.144]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0I4T00HJZR40LC10@l-daemon>; Wed, 29 Sep 2004 16:43:12 -0600 (MDT) Received: from pn2ml10so.prod.shaw.ca ([10.0.121.80]) by pd5mr3so.prod.shaw.ca (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0I4T00EBFR40LBH0@pd5mr3so.prod.shaw.ca>; Wed, 29 Sep 2004 16:43:12 -0600 (MDT) Received: from nehal (S0106000ae6ceb225.vf.shawcable.net [70.68.12.33]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003)) with SMTP id <0I4T00B1WR40AJ@l-daemon>; Wed, 29 Sep 2004 16:43:12 -0600 (MDT) Date: Wed, 29 Sep 2004 15:43:28 -0700 From: Nehal In-reply-to: <20040929204233.GB30629@VARK.MIT.EDU> To: David Schultz Message-id: <20040929154328.00001444@nehal> MIME-version: 1.0 X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.3.0; Win32) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit References: <20040929101403.000027aa@nehal> <20040929204233.GB30629@VARK.MIT.EDU> cc: freebsd-fs@FreeBSD.ORG Subject: Re: data blocks question X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Sep 2004 22:43:13 -0000 On Wed, 29 Sep 2004 16:42:33 -0400 David Schultz wrote: > On Wed, Sep 29, 2004, Nehal wrote: > > on my ufs2 partition, there is a file that has a size of > > 65536, and has 2 direct blocks only. the block size of the fs > > is 16k and fragment block size is 2k. > > > > how can this be possible? wouldn't 2 direct blocks mean that > > the maximum size is 2x16k = 32k? or am i not understanding > > something correctly? > > > > i've made a copy of the file, and the new file has 4 direct > > blocks. > > > > it is a binary file, and i can read it fine (ie, cat it). i've > > done fsck on the filesystem and it found no problem. > > Yes, UFS supports sparse files. That is, you can have a file > with parts you haven't written to, and the blocks for those > parts won't be allocated. The cp utility doesn't know about > this, though, so copies will have the ``holes'' filled with > zeroes. > how would i determine the offset and length of these 'holes' for sparse files? Nehal From owner-freebsd-fs@FreeBSD.ORG Wed Sep 29 23:09:36 2004 Return-Path: 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 B25A916A4CE for ; Wed, 29 Sep 2004 23:09:36 +0000 (GMT) Received: from VARK.MIT.EDU (VARK.MIT.EDU [18.95.3.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6975043D4C for ; Wed, 29 Sep 2004 23:09:36 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (localhost [127.0.0.1]) by VARK.MIT.EDU (8.13.1/8.12.10) with ESMTP id i8TN9TD7031572; Wed, 29 Sep 2004 19:09:29 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.MIT.EDU (8.13.1/8.12.10/Submit) id i8TN9T8H031571; Wed, 29 Sep 2004 19:09:29 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Wed, 29 Sep 2004 19:09:29 -0400 From: David Schultz To: Nehal Message-ID: <20040929230929.GA31474@VARK.MIT.EDU> Mail-Followup-To: Nehal , freebsd-fs@FreeBSD.ORG References: <20040929101403.000027aa@nehal> <20040929204233.GB30629@VARK.MIT.EDU> <20040929154328.00001444@nehal> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040929154328.00001444@nehal> cc: freebsd-fs@FreeBSD.ORG Subject: Re: data blocks question X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Sep 2004 23:09:36 -0000 On Wed, Sep 29, 2004, Nehal wrote: > On Wed, 29 Sep 2004 16:42:33 -0400 > David Schultz wrote: > > > On Wed, Sep 29, 2004, Nehal wrote: > > > on my ufs2 partition, there is a file that has a size of > > > 65536, and has 2 direct blocks only. the block size of the fs > > > is 16k and fragment block size is 2k. > > > > > > how can this be possible? wouldn't 2 direct blocks mean that > > > the maximum size is 2x16k = 32k? or am i not understanding > > > something correctly? > > > > > > i've made a copy of the file, and the new file has 4 direct > > > blocks. > > > > > > it is a binary file, and i can read it fine (ie, cat it). i've > > > done fsck on the filesystem and it found no problem. > > > > Yes, UFS supports sparse files. That is, you can have a file > > with parts you haven't written to, and the blocks for those > > parts won't be allocated. The cp utility doesn't know about > > this, though, so copies will have the ``holes'' filled with > > zeroes. > > > > how would i determine the offset and length of these 'holes' for > sparse files? It's an implementation detail, so you're not supposed to need to know most of the time. You can use fsdb to find out. From owner-freebsd-fs@FreeBSD.ORG Thu Sep 30 02:49:02 2004 Return-Path: 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 7293716A4CE; Thu, 30 Sep 2004 02:49:02 +0000 (GMT) Received: from pd3mo1so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2463C43D5C; Thu, 30 Sep 2004 02:49:02 +0000 (GMT) (envelope-from nehalmistry@gmx.net) Received: from pd5mr7so.prod.shaw.ca (pd5mr7so-qfe3.prod.shaw.ca [10.0.141.183]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0I4U000GM2HO6FE0@l-daemon>; Wed, 29 Sep 2004 20:49:00 -0600 (MDT) Received: from pn2ml9so.prod.shaw.ca ([10.0.121.7]) by pd5mr7so.prod.shaw.ca (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0I4U004NH2HOHH40@pd5mr7so.prod.shaw.ca>; Wed, 29 Sep 2004 20:49:00 -0600 (MDT) Received: from nehal (S0106000ae6ceb225.vf.shawcable.net [70.68.12.33]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003)) with SMTP id <0I4U001982HO02@l-daemon>; Wed, 29 Sep 2004 20:49:00 -0600 (MDT) Date: Wed, 29 Sep 2004 19:49:16 -0700 From: Nehal In-reply-to: <20040929230929.GA31474@VARK.MIT.EDU> To: David Schultz Message-id: <20040929194916.00000f43@nehal> MIME-version: 1.0 X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.3.0; Win32) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit References: <20040929101403.000027aa@nehal> <20040929204233.GB30629@VARK.MIT.EDU> <20040929154328.00001444@nehal> <20040929230929.GA31474@VARK.MIT.EDU> cc: freebsd-fs@FreeBSD.ORG Subject: Re: data blocks question X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Sep 2004 02:49:02 -0000 On Wed, 29 Sep 2004 19:09:29 -0400 David Schultz wrote: > On Wed, Sep 29, 2004, Nehal wrote: > > On Wed, 29 Sep 2004 16:42:33 -0400 > > David Schultz wrote: > > > > > On Wed, Sep 29, 2004, Nehal wrote: > > > > on my ufs2 partition, there is a file that has a size of > > > > 65536, and has 2 direct blocks only. the block size of the > > > > fs is 16k and fragment block size is 2k. > > > > > > > > how can this be possible? wouldn't 2 direct blocks mean > > > > that the maximum size is 2x16k = 32k? or am i not > > > > understanding something correctly? > > > > > > > > i've made a copy of the file, and the new file has 4 > > > > direct blocks. > > > > > > > > it is a binary file, and i can read it fine (ie, cat it). > > > > i've done fsck on the filesystem and it found no problem. > > > > > > Yes, UFS supports sparse files. That is, you can have a > > > file with parts you haven't written to, and the blocks for > > > those parts won't be allocated. The cp utility doesn't know > > > about this, though, so copies will have the ``holes'' filled > > > with zeroes. > > > > > > > how would i determine the offset and length of these 'holes' > > for sparse files? > > It's an implementation detail, so you're not supposed to need to > know most of the time. You can use fsdb to find out. > i would like to know how it is implemented. is there somewhere in the freebsd source that i can find this info? Nehal From owner-freebsd-fs@FreeBSD.ORG Thu Sep 30 04:09:26 2004 Return-Path: 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 C49A716A4CE for ; Thu, 30 Sep 2004 04:09:26 +0000 (GMT) Received: from VARK.MIT.EDU (VARK.MIT.EDU [18.95.3.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F25643D49 for ; Thu, 30 Sep 2004 04:09:26 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (localhost [127.0.0.1]) by VARK.MIT.EDU (8.13.1/8.12.10) with ESMTP id i8U49ILG032974; Thu, 30 Sep 2004 00:09:18 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.MIT.EDU (8.13.1/8.12.10/Submit) id i8U49Io9032973; Thu, 30 Sep 2004 00:09:18 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Thu, 30 Sep 2004 00:09:18 -0400 From: David Schultz To: Nehal Message-ID: <20040930040918.GA32845@VARK.MIT.EDU> Mail-Followup-To: Nehal , freebsd-fs@FreeBSD.ORG References: <20040929101403.000027aa@nehal> <20040929204233.GB30629@VARK.MIT.EDU> <20040929154328.00001444@nehal> <20040929230929.GA31474@VARK.MIT.EDU> <20040929194916.00000f43@nehal> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040929194916.00000f43@nehal> cc: freebsd-fs@FreeBSD.ORG Subject: Re: data blocks question X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Sep 2004 04:09:26 -0000 On Wed, Sep 29, 2004, Nehal wrote: > On Wed, 29 Sep 2004 19:09:29 -0400 > David Schultz wrote: > > > On Wed, Sep 29, 2004, Nehal wrote: > > > On Wed, 29 Sep 2004 16:42:33 -0400 > > > David Schultz wrote: > > > > > > > On Wed, Sep 29, 2004, Nehal wrote: > > > > > on my ufs2 partition, there is a file that has a size of > > > > > 65536, and has 2 direct blocks only. the block size of the > > > > > fs is 16k and fragment block size is 2k. > > > > > > > > > > how can this be possible? wouldn't 2 direct blocks mean > > > > > that the maximum size is 2x16k = 32k? or am i not > > > > > understanding something correctly? > > > > > > > > > > i've made a copy of the file, and the new file has 4 > > > > > direct blocks. > > > > > > > > > > it is a binary file, and i can read it fine (ie, cat it). > > > > > i've done fsck on the filesystem and it found no problem. > > > > > > > > Yes, UFS supports sparse files. That is, you can have a > > > > file with parts you haven't written to, and the blocks for > > > > those parts won't be allocated. The cp utility doesn't know > > > > about this, though, so copies will have the ``holes'' filled > > > > with zeroes. > > > > > > > > > > how would i determine the offset and length of these 'holes' > > > for sparse files? > > > > It's an implementation detail, so you're not supposed to need to > > know most of the time. You can use fsdb to find out. > > > i would like to know how it is implemented. is there somewhere in > the freebsd source that i can find this info? src/sys/fs/ufs/ffs/ffs_{balloc,inode}.c would probably be most helpful. The code is complicated, but the approach to this problem isn't: When a file is extended via ftruncate(), don't allocate new blocks. Instead, do that lazily as portions of the file are written. On reads, pretend that unallocated blocks are filled with all zeroes. From owner-freebsd-fs@FreeBSD.ORG Thu Sep 30 17:23:26 2004 Return-Path: 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 6794316A4CE for ; Thu, 30 Sep 2004 17:23:26 +0000 (GMT) Received: from web14828.mail.yahoo.com (web14828.mail.yahoo.com [216.136.225.230]) by mx1.FreeBSD.org (Postfix) with SMTP id 3F6D943D49 for ; Thu, 30 Sep 2004 17:23:26 +0000 (GMT) (envelope-from rosti_bsd@yahoo.com) Message-ID: <20040930172326.81894.qmail@web14828.mail.yahoo.com> Received: from [212.143.154.227] by web14828.mail.yahoo.com via HTTP; Thu, 30 Sep 2004 10:23:26 PDT Date: Thu, 30 Sep 2004 10:23:26 -0700 (PDT) From: Rostislav Krasny To: freebsd-fs@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: procfs(5) or pwd(1) bug X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Sep 2004 17:23:26 -0000 Hello. I've found a strange behavior of pwd(1) on procfs(5). See following log: # uname -a FreeBSD vega 5.3-BETA6 FreeBSD 5.3-BETA6 #0: Sat Sep 25 19:41:14 UTC 2004 root@wv1u.samsco.home:/usr/obj/usr/src/sys/GENERIC i386 vega# mount_procfs . /proc vega# cd /proc vega# ls 0 12 16 21 26 32 367 401 439 45 797 1 1244 17 22 27 325 37 41 44 46 8 10 1245 172 23 28 33 379 42 440 47 801 1012 13 18 230 29 34 38 425 441 5 9 1013 1366 19 24 3 35 39 43 442 6 curproc 1014 14 2 25 30 36 4 437 443 7 11 15 20 250 31 363 40 438 444 794 vega# pwd /proc vega# cd 440 vega# pwd pwd: .: No such file or directory vega# pwd -L /proc/440 vega# pwd /proc/440 vega# cd .. vega# pwd /proc vega# cd 440 vega# pwd pwd: .: No such file or directory vega# pwd -P pwd: .: No such file or directory vega# pwd pwd: .: No such file or directory vega# pwd -L /proc/440 vega# pwd /proc/440 vega# pwd -P /proc/440 _______________________________ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com From owner-freebsd-fs@FreeBSD.ORG Thu Sep 30 17:39:41 2004 Return-Path: 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 E7BE216A4CE for ; Thu, 30 Sep 2004 17:39:41 +0000 (GMT) Received: from web14826.mail.yahoo.com (web14826.mail.yahoo.com [216.136.225.197]) by mx1.FreeBSD.org (Postfix) with SMTP id C01AF43D41 for ; Thu, 30 Sep 2004 17:39:41 +0000 (GMT) (envelope-from rosti_bsd@yahoo.com) Message-ID: <20040930173941.77536.qmail@web14826.mail.yahoo.com> Received: from [212.143.154.227] by web14826.mail.yahoo.com via HTTP; Thu, 30 Sep 2004 10:39:41 PDT Date: Thu, 30 Sep 2004 10:39:41 -0700 (PDT) From: Rostislav Krasny To: freebsd-fs@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: procfs(5) or pwd(1) bug X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Sep 2004 17:39:42 -0000 --- Rostislav Krasny wrote: > Hello. > > I've found a strange behavior of pwd(1) on procfs(5). See following log: > > # uname -a > FreeBSD vega 5.3-BETA6 FreeBSD 5.3-BETA6 #0: Sat Sep 25 19:41:14 UTC 2004 > > root@wv1u.samsco.home:/usr/obj/usr/src/sys/GENERIC i386 > vega# mount_procfs . /proc > vega# cd /proc > vega# ls > 0 12 16 21 26 32 367 401 439 > 45 > 797 > 1 1244 17 22 27 325 37 41 44 > 46 > 8 > 10 1245 172 23 28 33 379 42 440 > 47 > 801 > 1012 13 18 230 29 34 38 425 441 5 > > 9 > 1013 1366 19 24 3 35 39 43 442 6 > > curproc > 1014 14 2 25 30 36 4 437 443 7 > 11 15 20 250 31 363 40 438 444 > 794 > vega# pwd > /proc > vega# cd 440 > vega# pwd > pwd: .: No such file or directory > vega# pwd -L > /proc/440 > vega# pwd > /proc/440 > vega# cd .. > vega# pwd > /proc > vega# cd 440 > vega# pwd > pwd: .: No such file or directory > vega# pwd -P > pwd: .: No such file or directory > vega# pwd > pwd: .: No such file or directory > vega# pwd -L > /proc/440 > vega# pwd > /proc/440 > vega# pwd -P > /proc/440 I've just found that if the shell is sh(1) then there is no such a problem. __________________________________ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail