From owner-freebsd-fs Mon Aug 21 21:15:47 2000 Delivered-To: freebsd-fs@freebsd.org Received: from server.accelica.com (w068.z208176151.sjc-ca.dsl.cnc.net [208.176.151.68]) by hub.freebsd.org (Postfix) with SMTP id ABF7A37B424 for ; Mon, 21 Aug 2000 21:15:45 -0700 (PDT) Received: (qmail 13460 invoked from network); 22 Aug 2000 04:17:07 -0000 Received: from server.heavytech.com (HELO merc.heavytech.com) (209.31.32.65) by 10.99.5.2 with SMTP; 22 Aug 2000 04:17:07 -0000 Date: Mon, 21 Aug 2000 21:16:09 -0700 (PDT) From: Nick Popoff X-Sender: nick@localhost To: freebsd-fs@freebsd.org Subject: Strange MSDOS fs behavior Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org This took me a while to figure out, so I figured I might as well report it in case it made sense to anyone else. I'm running FreeBSD 4.1-STABLE on a Sony Vaio Laptop. What I'm seeing is that a Win98 partition I've mounted is garbling MP3 files I'm storing there when they are played. The file is unchanged, but when I play the file it always cuts off with about 1 minute left to play. If I copy that file out of the Win98 partition to my Unix home directory, it plays fine. If I FTP it to my Windows box it plays fine. However, if I mount that Win98 partition with Samba on that Windows box, an play it on the Windows box, it screws up. The only conclusion I can draw is that the FreeBSD fs driver for the msdos partition is corrupting data as it reads it for applications... and in a predictable way for each file, since the song will cut off at the same place every time I play it. I'm mounting that msdos partition by a script in rc.d that says: mount_msdos -u nick -g nick -m 755 -l /dev/ad0s1 /usr/msdos And then I am accessing the files by a symbolic link like so: /home/nick/mp3 -> /usr/msdos/mp3 Hopefully the message will turn up in search results if someone else runs into this very wierd problem! Please e-mail me directly if I can provide any more info, as I am not subscribed to this list. Thanks. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Tue Aug 22 9:54:33 2000 Delivered-To: freebsd-fs@freebsd.org Received: from hotmail.com (f72.pav1.hotmail.com [64.4.31.72]) by hub.freebsd.org (Postfix) with ESMTP id 7A69A37B423 for ; Tue, 22 Aug 2000 09:54:31 -0700 (PDT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 22 Aug 2000 09:54:31 -0700 Received: from 216.122.0.208 by pv1fd.pav1.hotmail.msn.com with HTTP; Tue, 22 Aug 2000 GMT X-Originating-IP: [216.122.0.208] From: "Chris Jones" To: freebsd-fs@freebsd.org Subject: Inode/DQuot locking problem with vnode disk Date: Tue, 22 Aug 2000 09:54:30 PDT Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 22 Aug 2000 16:54:31.0172 (UTC) FILETIME=[A4227C40:01C00C59] Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I am currently trying to get quotas to work inside of a vnode disk (filesystem in a file (using UFS)). The problem is that I want the quotas to work inside of a jail which is running with the vnode disk as it's "root" directory. The problem that I'm having is that after turning on the quotas (this must be done outside of the jail), if I try to access a file which already has a quota, or I try to modify the quota using edquota (from inside of the jail), the process locks. Once the process is locked, there is no way to kill it, and any subsequent accesses to the vnode disk also locks. These processes will stop in 1 of 5 different tsleep statements (inode, chkdq1, chkdq2, chkiq1, or chkiq2). I am assuming that the problems is that the main filesystem puts a lock on the vnode disk file, and subsequently tries to lock the indoe inside of the file and is unable b/c of the previous lock on the vnode disk file. Has anyone else seen this? Any pointers would be greatly appreciated. Oh, yeah, the version is 4.0-STABLE. Thank you, Christophe ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Tue Aug 22 11:32:15 2000 Delivered-To: freebsd-fs@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id 70DC037B424 for ; Tue, 22 Aug 2000 11:32:11 -0700 (PDT) Received: from fledge.watson.org (robert@fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.9.3/8.9.3) with SMTP id OAA07643; Tue, 22 Aug 2000 14:32:09 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Tue, 22 Aug 2000 14:32:08 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Chris Jones Cc: freebsd-fs@FreeBSD.org Subject: Re: Inode/DQuot locking problem with vnode disk In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Any chance I could get you to file a problem report for this, using send-pr? I am interested in the problem, having both some familiarity with the UFS quota/extended attribute implementations, and having worked on the jail code, but won't have a chance to work on this for a week or two due to travel and moving from Maryland to Massachusetts in two weeks. I don't want the problem getting lost in the fray, and the gnats database is a good way of keeping track of this. Forward me a copy of the response you get from gnats (with the PR number) and I'll grab ownership of the problem, assuming no one else solves it first. I'm actually also interested in whether or not the same problem occurs with the UFS extended attribute code: it uses a similar backing file mechanism as the kernel does, and as a result might be subject to the same deadlocks. Yor analysis of the problem sounds good to me, but I'm not sure why it would manifest only in the jail environment -- perhaps some sort of race, or due to locking order starting at the process root vnode. Thanks, On Tue, 22 Aug 2000, Chris Jones wrote: > I am currently trying to get quotas to work inside of a vnode disk > (filesystem in a file (using UFS)). The problem is that I want the quotas > to work inside of a jail which is running with the vnode disk as it's "root" > directory. The problem that I'm having is that after turning on the quotas > (this must be done outside of the jail), if I try to access a file which > already has a quota, or I try to modify the quota using edquota (from inside > of the jail), the process locks. Once the process is locked, there is no > way to kill it, and any subsequent accesses to the vnode disk also locks. > These processes will stop in 1 of 5 different tsleep statements (inode, > chkdq1, chkdq2, chkiq1, or chkiq2). I am assuming that the problems is that > the main filesystem puts a lock on the vnode disk file, and subsequently > tries to lock the indoe inside of the file and is unable b/c of the previous > lock on the vnode disk file. Has anyone else seen this? Any pointers would > be greatly appreciated. Oh, yeah, the version is 4.0-STABLE. > > Thank you, > > Christophe > ________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-fs" in the body of the message > Robert N M Watson robert@fledge.watson.org http://www.watson.org/~robert/ PGP key fingerprint: AF B5 5F FF A6 4A 79 37 ED 5F 55 E9 58 04 6A B1 TIS Labs at Network Associates, Safeport Network Services To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Thu Aug 24 11:39:13 2000 Delivered-To: freebsd-fs@freebsd.org Received: from wally.eecs.harvard.edu (wally.eecs.harvard.edu [140.247.60.30]) by hub.freebsd.org (Postfix) with ESMTP id 5C0EA37B422 for ; Thu, 24 Aug 2000 11:39:11 -0700 (PDT) Received: from localhost (stein@localhost) by wally.eecs.harvard.edu (8.10.0/8.10.0) with ESMTP id e7OIdAx25881 for ; Thu, 24 Aug 2000 14:39:10 -0400 (EDT) Date: Thu, 24 Aug 2000 14:39:10 -0400 (EDT) From: Christopher Stein X-Sender: stein@wally To: freebsd-fs@freebsd.org Subject: file system type Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, It seems to me there are 2 ways to discover the file system type from the mount structure. Both involve accessing the vfsconf substructure (mp->mnt_vfc). The first is a numeric identifier mp->mnt_vfc->vfc_typenum and the second is a string vfc_name, also in vfsconf. Which is the preferred way to identify the fs type? Some comments indicate that the vfc_typenum is deprecated, but for ops that require frequent identification a strcmp call will begin to be expensive. -Chris To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Thu Aug 24 17:27:27 2000 Delivered-To: freebsd-fs@freebsd.org Received: from smtp04.primenet.com (smtp04.primenet.com [206.165.6.134]) by hub.freebsd.org (Postfix) with ESMTP id B2B5B37B42C for ; Thu, 24 Aug 2000 17:27:24 -0700 (PDT) Received: (from daemon@localhost) by smtp04.primenet.com (8.9.3/8.9.3) id RAA04225; Thu, 24 Aug 2000 17:25:29 -0700 (MST) Received: from usr01.primenet.com(206.165.6.201) via SMTP by smtp04.primenet.com, id smtpdAAA_9aOhi; Thu Aug 24 17:25:21 2000 Received: (from tlambert@localhost) by usr01.primenet.com (8.8.5/8.8.5) id RAA27526; Thu, 24 Aug 2000 17:27:08 -0700 (MST) From: Terry Lambert Message-Id: <200008250027.RAA27526@usr01.primenet.com> Subject: Re: Strange MSDOS fs behavior To: nick@accelica.com (Nick Popoff) Date: Fri, 25 Aug 2000 00:27:07 +0000 (GMT) Cc: freebsd-fs@FreeBSD.ORG In-Reply-To: from "Nick Popoff" at Aug 21, 2000 09:16:09 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > What I'm seeing is that a Win98 partition I've mounted is garbling MP3 > files I'm storing there when they are played. The file is unchanged, but > when I play the file it always cuts off with about 1 minute left to > play. > > If I copy that file out of the Win98 partition to my Unix home directory, > it plays fine. If I FTP it to my Windows box it plays fine. However, if > I mount that Win98 partition with Samba on that Windows box, an play it on > the Windows box, it screws up. The only conclusion I can draw is that the > FreeBSD fs driver for the msdos partition is corrupting data as it reads > it for applications... and in a predictable way for each file, since the > song will cut off at the same place every time I play it. An alternative is that it is mmap'ing the file as it attempts to play it, and there is a bug in the MSDOSFS getpages. To test this theory, copy the file to a normal partition (where it will normally not screw up); then: dd if=my.mp3 bs=4096 of=/dev/null If it doesn't give you an even number of buffers copies, then it is not exactly an even number of pages long. Example: dd if=my.mpg bs=4096 of=/dev/null 478+1 records in 478+1 records out 1959713 bytes transferred in 0.263275 secs (7443600 bytes/sec) Then, given the remainder above, give the same block count to truncate the file to a page boundary: dd if=my.mp3 bs=4096 count=478 of=new_my.mp3 Then take the new file, and play it off the normal partition... does it cut off in the same place? If so, you've identified the problem as a page boundary error. If not, you have verified that page boundaries are not the problem. Try with FS block size boundaries instead (1k, 512b, etc.) to see if it's the disk I/O rather than the mmap code. Further debugging is left as an exercise for the reader. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Thu Aug 24 21:22:16 2000 Delivered-To: freebsd-fs@freebsd.org Received: from mail.cise.ufl.edu (beach.cise.ufl.edu [128.227.205.211]) by hub.freebsd.org (Postfix) with ESMTP id 055F637B424 for ; Thu, 24 Aug 2000 21:22:14 -0700 (PDT) Received: from cise.ufl.edu (cave.cise.ufl.edu [128.227.205.51]) by mail.cise.ufl.edu (Postfix) with ESMTP id E43CADCE2; Fri, 25 Aug 2000 00:22:08 -0400 (EDT) To: Christopher Stein Cc: freebsd-fs@freebsd.org Subject: Re: file system type In-Reply-To: Message from Christopher Stein of "Thu, 24 Aug 2000 14:39:10 EDT." Date: Fri, 25 Aug 2000 00:22:08 -0400 From: "James F. Hranicky" Message-Id: <20000825042208.E43CADCE2@mail.cise.ufl.edu> Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Christopher Stein wrote: > > Which is the preferred way to identify the fs type? > Some comments indicate that the vfc_typenum is deprecated, > but for ops that require frequent identification a strcmp > call will begin to be expensive. Is the statfs system call what you're looking for? ---------------------------------------------------------------------- | Jim Hranicky, Senior SysAdmin UF/CISE Department | | E314D CSE Building Phone (352) 392-1499 | | jfh@cise.ufl.edu http://www.cise.ufl.edu/~jfh | ---------------------------------------------------------------------- - Encryption: its use by criminals is far less - - frightening than its banishment by governments - - Vote for Privacy - To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message