From owner-freebsd-fs Mon Dec 3 8:53:19 2001
Delivered-To: freebsd-fs@freebsd.org
Received: from D00015.dialonly.kemerovo.su (www2.svzserv.kemerovo.su [213.184.65.86])
by hub.freebsd.org (Postfix) with ESMTP
id 58B9E37B416; Mon, 3 Dec 2001 08:53:10 -0800 (PST)
Received: (from eugen@localhost)
by D00015.dialonly.kemerovo.su (8.11.6/8.11.4) id fB3Gq3t00699;
Mon, 3 Dec 2001 23:52:03 +0700 (KRAT)
(envelope-from eugen)
Date: Mon, 3 Dec 2001 23:52:03 +0700
From: Eugene Grosbein
To: freebsd-fs@freebsd.org
Cc: jkh@freebsd.org
Subject: [PATCH] msdosfs_vfsops.c: some kind of FAT32 incompatibility?
Message-ID: <20011203235203.A435@grosbein.pp.ru>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Sender: owner-freebsd-fs@FreeBSD.ORG
Precedence: bulk
List-ID:
List-Archive: (Web Archive)
List-Help: (List Instructions)
List-Subscribe:
List-Unsubscribe:
X-Loop: FreeBSD.org
Hi!
FreeBSD has obtained FAT32 support with jkh's commit 3 years, 9 months ago
(see revision 1.24). FAT32 checks has not changed since then basically.
Here are problem description and patch suggested for discussion.
First I have to explain partitioning of my 6.4G hard drive.
Slice 1: Primary DOS partition, FAT16 500Mb (C: for DOS)
Slice 2: Extended DOS partition, 1500Mb single "disk D:", FAT32.
No free space in the slice for new DOS disks.
Slice 3: 3G for FreeBSD.
The rest is free and the last record in the MBR is not occupied.
This was intentionally left blank as space for testing of
unstable OS versions and used for it for some time.
Once I decided to use some of this space for Windows95 residing
at the beginning of drive but there was no standard tools to make it
visible for Win95. So I used Norton Utilities 3.01 for Win95 and
its Disk Editor to create new "Extended Partition" residing
at the end of drive and to link it to existing Extended Partition.
Disk Editor has feature named 'Recalculate partition' that should
guarantee correctness of new partition record.
I'm not sure if similar chain of "partitions" is completely correct,
at least this worked for me over a year with one remark: Norton Disk Doctor
did not like the last partition but agreed it to exist and
proposed "to mark" it so that it will not complain every time it is run.
Then all worked very well and this new "disk E:" was formatted as FAT32 and
used as usual.
Now we are back to FreeBSD. "Disk D:" can be mounted as /dev/ad0s5.
If I do not allow NDD to touch "Disk E:" it can be mounted as /dev/ad0s6
and used by FreeBSD. However, when NDD "marks" it, FreeBSD cannot mount this
"disk" anymore. Diagnostic is "mountmsdosfs(): bad FAT32 filesystem".
The reason is that NDD changes the only byte in FAT32 signature:
it changes BOOTSIG2 from 0 to 0x52. The filesystem is still usable
by Windows but cannot be mounted by FreeBSD.
Well, I can live with this, applying the following patch before each
"buildworld". I just think that somebody else can hit this hole too.
So I propose the patch that handles this situation.
The patch is for RELENG_4 but that piece of code has not changed for
long time so it should apply to CURRENT cleanly in spite of different
file locations.
diff -ur ./bootsect.h /usr/src/sys/msdosfs/bootsect.h
--- ./bootsect.h Sat Aug 28 08:48:06 1999
+++ /usr/src/sys/msdosfs/bootsect.h Mon Dec 3 22:27:13 2001
@@ -69,6 +69,7 @@
#define BOOTSIG0 0x55
#define BOOTSIG1 0xaa
#define BOOTSIG2 0
+#define BOOTSIG2_COMPAT 0x52
#define BOOTSIG3 0
};
#ifdef atari
diff -ur ./msdosfs_vfsops.c /usr/src/sys/msdosfs/msdosfs_vfsops.c
--- ./msdosfs_vfsops.c Mon Nov 5 01:57:51 2001
+++ /usr/src/sys/msdosfs/msdosfs_vfsops.c Mon Dec 3 22:28:30 2001
@@ -524,7 +524,8 @@
}
if (pmp->pm_RootDirEnts == 0) {
- if (bsp->bs710.bsBootSectSig2 != BOOTSIG2
+ if ((bsp->bs710.bsBootSectSig2 != BOOTSIG2
+ && bsp->bs710.bsBootSectSig2 != BOOTSIG2_COMPAT)
|| bsp->bs710.bsBootSectSig3 != BOOTSIG3
|| pmp->pm_Sectors
|| pmp->pm_FATsecs
Please CC me when replying. Thank you.
Eugene Grosbein
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message
From owner-freebsd-fs Tue Dec 4 0:32:52 2001
Delivered-To: freebsd-fs@freebsd.org
Received: from finch-post-12.mail.demon.net (finch-post-12.mail.demon.net [194.217.242.41])
by hub.freebsd.org (Postfix) with ESMTP id CFEF437B405
for ; Tue, 4 Dec 2001 00:32:46 -0800 (PST)
Received: from ubik.demon.co.uk ([194.222.125.229])
by finch-post-12.mail.demon.net with esmtp (Exim 2.12 #1)
id 16BB0O-000DTO-0C; Tue, 4 Dec 2001 08:32:45 +0000
Message-ID:
Date: Tue, 4 Dec 2001 08:31:30 +0000
To: freebsd-fs@freebsd.org
Cc: Eugene Grosbein
From: Tony
Subject: Re: [PATCH] msdosfs_vfsops.c: some kind of FAT32 incompatibility?
References: <20011203235203.A435@grosbein.pp.ru>
In-Reply-To: <20011203235203.A435@grosbein.pp.ru>
MIME-Version: 1.0
X-Mailer: Turnpike Integrated Version 5.01 U
Sender: owner-freebsd-fs@FreeBSD.ORG
Precedence: bulk
List-ID:
List-Archive: (Web Archive)
List-Help: (List Instructions)
List-Subscribe:
List-Unsubscribe:
X-Loop: FreeBSD.org
In article <20011203235203.A435@grosbein.pp.ru>, Eugene Grosbein
writes
>Hi!
Hi
>FreeBSD has obtained FAT32 support with jkh's commit 3 years, 9 months ago
>(see revision 1.24). FAT32 checks has not changed since then basically.
>Here are problem description and patch suggested for discussion.
>
>First I have to explain partitioning of my 6.4G hard drive.
>
>Slice 1: Primary DOS partition, FAT16 500Mb (C: for DOS)
>Slice 2: Extended DOS partition, 1500Mb single "disk D:", FAT32.
> No free space in the slice for new DOS disks.
>Slice 3: 3G for FreeBSD.
>
>The rest is free and the last record in the MBR is not occupied.
>This was intentionally left blank as space for testing of
>unstable OS versions and used for it for some time.
Okay.
>Once I decided to use some of this space for Windows95 residing
>at the beginning of drive but there was no standard tools to make it
>visible for Win95. So I used Norton Utilities 3.01 for Win95 and
>its Disk Editor to create new "Extended Partition" residing
>at the end of drive
I think you would have been better to create another Primary Partition.
Windows 9x and NT cannot create more than one Primary Partition on a
drive, but they are perfectly happy to use them.
>and to link it to existing Extended Partition.
>Disk Editor has feature named 'Recalculate partition' that should
>guarantee correctness of new partition record.
This really sounds messy to your extended partition fragmented like
this. It will certainly cause problems with disk checking tools, as you
have found.
>I'm not sure if similar chain of "partitions" is completely correct,
>at least this worked for me over a year with one remark: Norton Disk Doctor
>did not like the last partition but agreed it to exist and
>proposed "to mark" it so that it will not complain every time it is run.
>Then all worked very well and this new "disk E:" was formatted as FAT32 and
>used as usual.
>
>Now we are back to FreeBSD. "Disk D:" can be mounted as /dev/ad0s5.
>If I do not allow NDD to touch "Disk E:" it can be mounted as /dev/ad0s6
>and used by FreeBSD. However, when NDD "marks" it, FreeBSD cannot mount this
>"disk" anymore. Diagnostic is "mountmsdosfs(): bad FAT32 filesystem".
>
>The reason is that NDD changes the only byte in FAT32 signature:
>it changes BOOTSIG2 from 0 to 0x52. The filesystem is still usable
>by Windows but cannot be mounted by FreeBSD.
>
>Well, I can live with this, applying the following patch before each
>"buildworld". I just think that somebody else can hit this hole too.
I think very few people will do anything similar to you with extended
partitions.
On the other hand as NDD has a feature for tagging strange partitions
some other people may also find their FAT32 partitions ignored by
FreeBSD. I expect NDD is mostly right that the partition information
should be complained about, but if the user has been made aware and told
NDD to ignore it FreeBSD should ignore it too.
>So I propose the patch that handles this situation.
>The patch is for RELENG_4 but that piece of code has not changed for
>long time so it should apply to CURRENT cleanly in spite of different
>file locations.
>
>diff -ur ./bootsect.h /usr/src/sys/msdosfs/bootsect.h
>--- ./bootsect.h Sat Aug 28 08:48:06 1999
>+++ /usr/src/sys/msdosfs/bootsect.h Mon Dec 3 22:27:13 2001
>@@ -69,6 +69,7 @@
> #define BOOTSIG0 0x55
> #define BOOTSIG1 0xaa
> #define BOOTSIG2 0
>+#define BOOTSIG2_COMPAT 0x52
Please, please if this is committed comment clearly what this is for.
> #define BOOTSIG3 0
> };
> #ifdef atari
>diff -ur ./msdosfs_vfsops.c /usr/src/sys/msdosfs/msdosfs_vfsops.c
>--- ./msdosfs_vfsops.c Mon Nov 5 01:57:51 2001
>+++ /usr/src/sys/msdosfs/msdosfs_vfsops.c Mon Dec 3 22:28:30 2001
>@@ -524,7 +524,8 @@
> }
>
> if (pmp->pm_RootDirEnts == 0) {
>- if (bsp->bs710.bsBootSectSig2 != BOOTSIG2
>+ if ((bsp->bs710.bsBootSectSig2 != BOOTSIG2
>+ && bsp->bs710.bsBootSectSig2 != BOOTSIG2_COMPAT)
> || bsp->bs710.bsBootSectSig3 != BOOTSIG3
> || pmp->pm_Sectors
> || pmp->pm_FATsecs
>
>
>Please CC me when replying. Thank you.
>Eugene Grosbein
Tony
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message
From owner-freebsd-fs Tue Dec 4 2: 8:32 2001
Delivered-To: freebsd-fs@freebsd.org
Received: from www.svzserv.kemerovo.su (www.svzserv.kemerovo.su [213.184.65.80])
by hub.freebsd.org (Postfix) with ESMTP id 714FA37B416
for ; Tue, 4 Dec 2001 02:08:26 -0800 (PST)
Received: (from eugen@localhost)
by www.svzserv.kemerovo.su (8.11.6/8.11.6) id fB4A8Ik57682;
Tue, 4 Dec 2001 17:08:18 +0700 (KRAT)
(envelope-from eugen)
Date: Tue, 4 Dec 2001 17:08:18 +0700
From: Eugene Grosbein
To: Tony
Cc: freebsd-fs@freebsd.org, Eugene Grosbein
Subject: Re: [PATCH] msdosfs_vfsops.c: some kind of FAT32 incompatibility?
Message-ID: <20011204170818.A57192@svzserv.kemerovo.su>
References: <20011203235203.A435@grosbein.pp.ru>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: ; from tony@ubik.demon.co.uk on Tue, Dec 04, 2001 at 08:31:30AM +0000
Sender: owner-freebsd-fs@FreeBSD.ORG
Precedence: bulk
List-ID:
List-Archive: (Web Archive)
List-Help: (List Instructions)
List-Subscribe:
List-Unsubscribe:
X-Loop: FreeBSD.org
On Tue, Dec 04, 2001 at 08:31:30AM +0000, Tony wrote:
> >Once I decided to use some of this space for Windows95 residing
> >at the beginning of drive but there was no standard tools to make it
> >visible for Win95. So I used Norton Utilities 3.01 for Win95 and
> >its Disk Editor to create new "Extended Partition" residing
> >at the end of drive
> I think you would have been better to create another Primary Partition.
> Windows 9x and NT cannot create more than one Primary Partition on a
> drive, but they are perfectly happy to use them.
I tried to have another Primary but there are some problems.
First, it is waste of last entry in MBR - this space really just
does not need to be Primary. Second, there were some problems with
disk checking tools I cannot remember now.
Creating new Extended produced less troubles.
> >and to link it to existing Extended Partition.
> >Disk Editor has feature named 'Recalculate partition' that should
> >guarantee correctness of new partition record.
> This really sounds messy to your extended partition fragmented like
> this. It will certainly cause problems with disk checking tools, as you
> have found.
At the other hand NDD worked just fine when that FAT32 needed fixes.
> >The reason is that NDD changes the only byte in FAT32 signature:
> >it changes BOOTSIG2 from 0 to 0x52. The filesystem is still usable
> >by Windows but cannot be mounted by FreeBSD.
> >Well, I can live with this, applying the following patch before each
> >"buildworld". I just think that somebody else can hit this hole too.
>
> I think very few people will do anything similar to you with extended
> partitions.
>
> On the other hand as NDD has a feature for tagging strange partitions
> some other people may also find their FAT32 partitions ignored by
> FreeBSD. I expect NDD is mostly right that the partition information
> should be complained about, but if the user has been made aware and told
> NDD to ignore it FreeBSD should ignore it too.
>
> >So I propose the patch that handles this situation.
> >The patch is for RELENG_4 but that piece of code has not changed for
> >long time so it should apply to CURRENT cleanly in spite of different
> >file locations.
> >
> >diff -ur ./bootsect.h /usr/src/sys/msdosfs/bootsect.h
> >--- ./bootsect.h Sat Aug 28 08:48:06 1999
> >+++ /usr/src/sys/msdosfs/bootsect.h Mon Dec 3 22:27:13 2001
> >@@ -69,6 +69,7 @@
> > #define BOOTSIG0 0x55
> > #define BOOTSIG1 0xaa
> > #define BOOTSIG2 0
> >+#define BOOTSIG2_COMPAT 0x52
>
> Please, please if this is committed comment clearly what this is for.
I am not a committer but want people to say their pros and contras
so it would be discussed if I find somebody to commit this.
Eugene Grosbein
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message
From owner-freebsd-fs Tue Dec 4 3:24:49 2001
Delivered-To: freebsd-fs@freebsd.org
Received: from lennier.cc.vt.edu (lennier.cc.vt.edu [198.82.162.213])
by hub.freebsd.org (Postfix) with ESMTP id 5400737B417
for ; Tue, 4 Dec 2001 03:24:44 -0800 (PST)
Received: from steiner.cc.vt.edu (IDENT:mirapoint@steiner-lb.cc.vt.edu [10.1.1.14])
by lennier.cc.vt.edu (8.11.4/8.11.4) with ESMTP id fB4BMYj115786;
Tue, 4 Dec 2001 06:22:34 -0500 (EST)
Received: from zathras (zathras.cc.vt.edu [198.82.162.117])
by steiner.cc.vt.edu (Mirapoint)
with ESMTP id AGJ93332;
Tue, 4 Dec 2001 06:22:33 -0500 (EST)
X-WebMail-UserID: gemorga2
Date: Tue, 4 Dec 2001 06:22:33 -0500
From: gemorga2
To: Eugene Grosbein ,
Tony
Cc: freebsd-fs
X-EXP32-SerialNo: 00002964
Subject: RE: [PATCH] msdosfs_vfsops.c: some kind of FAT32 incompatibility?
Message-ID: <3C0CDBFD@zathras>
Mime-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
X-Mailer: WebMail (Hydra) SMTP v3.61
Sender: owner-freebsd-fs@FreeBSD.ORG
Precedence: bulk
List-ID:
List-Archive: (Web Archive)
List-Help: (List Instructions)
List-Subscribe:
List-Unsubscribe:
X-Loop: FreeBSD.org
I have tried a lot of partitioning schemes before I came up with my current
setup (PC-DOS 7.0, Windows NT, OS2 Warp 4.0, Windows NT Wkst 4.0, Freebsd 4.?,
Linux) I have never tried to have more than one Primary partition *visible*
in Windows 9x. I don't think that is what Primary partitions are intended for
since my boot manager always changes the other Primaries in my setup to Hidden
Primary (hidden filesystem?) on my computer. So using an extended partition
seems to be the right thing to do in this case. I am not sure why he had to
use Norton Utilities to create the partition though, but I probably would have
used Partition Magic so I guess I can't comment on that. This partition
marking and *linking* is interesting, but I'm not sure what benefit it is.
This sounds like a very special case which might deserve a quirk which could
be enabled on a per user basis, but I wouldn't enable it by default. BTW, my
current setup is:
Drive 0:
Primary Partition 1: FAT16 (IBM PC-DOS 7.0)
Primary Partition 2: NTFS (Windows NT Wkst 4.0)
Primary Partition 3: HPFS (OS2 Warp 4.0)
Primary Partition 4: FAT32 (Windows 98 -- used to be FAT16b Win95)
Drive 1:
Primary Partition 1: UFS/FFS FreeBSD 4.?
Primary Partition 2: EXT2 Linux
Only the two unix like OSes can read any of the other OSes filesystems in this
setup (with BootMagic). And, yes, I am nuts....
>On Tue, Dec 04, 2001 at 08:31:30AM +0000, Tony wrote:
>
>> >Once I decided to use some of this space for Windows95 residing
>> >at the beginning of drive but there was no standard tools to make it
>> >visible for Win95. So I used Norton Utilities 3.01 for Win95 and
>> >its Disk Editor to create new "Extended Partition" residing
>> >at the end of drive
>> I think you would have been better to create another Primary Partition.
>> Windows 9x and NT cannot create more than one Primary Partition on a
>> drive, but they are perfectly happy to use them.
>
>I tried to have another Primary but there are some problems.
>First, it is waste of last entry in MBR - this space really just
>does not need to be Primary. Second, there were some problems with
>disk checking tools I cannot remember now.
>Creating new Extended produced less troubles.
>
>> >and to link it to existing Extended Partition.
>> >Disk Editor has feature named 'Recalculate partition' that should
>> >guarantee correctness of new partition record.
>> This really sounds messy to your extended partition fragmented like
>> this. It will certainly cause problems with disk checking tools, as you
>> have found.
>
>At the other hand NDD worked just fine when that FAT32 needed fixes.
>
>> >The reason is that NDD changes the only byte in FAT32 signature:
>> >it changes BOOTSIG2 from 0 to 0x52. The filesystem is still usable
>> >by Windows but cannot be mounted by FreeBSD.
>> >Well, I can live with this, applying the following patch before each
>> >"buildworld". I just think that somebody else can hit this hole too.
>>
>> I think very few people will do anything similar to you with extended
>> partitions.
>>
>> On the other hand as NDD has a feature for tagging strange partitions
>> some other people may also find their FAT32 partitions ignored by
>> FreeBSD. I expect NDD is mostly right that the partition information
>> should be complained about, but if the user has been made aware and told
>> NDD to ignore it FreeBSD should ignore it too.
>>
>> >So I propose the patch that handles this situation.
>> >The patch is for RELENG_4 but that piece of code has not changed for
>> >long time so it should apply to CURRENT cleanly in spite of different
>> >file locations.
>> >
>> >diff -ur ./bootsect.h /usr/src/sys/msdosfs/bootsect.h
>> >--- ./bootsect.h Sat Aug 28 08:48:06 1999
>> >+++ /usr/src/sys/msdosfs/bootsect.h Mon Dec 3 22:27:13 2001
>> >@@ -69,6 +69,7 @@
>> > #define BOOTSIG0 0x55
>> > #define BOOTSIG1 0xaa
>> > #define BOOTSIG2 0
>> >+#define BOOTSIG2_COMPAT 0x52
>>
>> Please, please if this is committed comment clearly what this is for.
>
>I am not a committer but want people to say their pros and contras
>so it would be discussed if I find somebody to commit this.
>
>Eugene Grosbein
>
>To Unsubscribe: send mail to majordomo@FreeBSD.org
>with "unsubscribe freebsd-fs" in the body of the message
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message
From owner-freebsd-fs Tue Dec 4 17:29: 3 2001
Delivered-To: freebsd-fs@freebsd.org
Received: from smtp.noos.fr (camus.noos.net [212.198.2.70])
by hub.freebsd.org (Postfix) with ESMTP id B5E0137B417
for ; Tue, 4 Dec 2001 17:28:59 -0800 (PST)
Received: (qmail 131539789 invoked by uid 0); 5 Dec 2001 01:28:58 -0000
Received: from unknown (HELO gits.dyndns.org) ([212.198.229.145]) (envelope-sender )
by 212.198.2.70 (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP
for ; 5 Dec 2001 01:28:58 -0000
Received: (from root@localhost)
by gits.dyndns.org (8.11.6/8.11.6) id fB51SuW19069;
Wed, 5 Dec 2001 02:28:56 +0100 (CET)
(envelope-from root)
Message-Id: <200112050128.fB51SuW19069@gits.dyndns.org>
Subject: Re: tgz filesystem
In-Reply-To: <224030000.1006998892@classic>
To: Marc Blanchet
Date: Wed, 5 Dec 2001 02:28:55 +0100 (CET)
Cc: freebsd-fs@freebsd.org
Reply-To: clefevre@citeweb.net
From: Cyrille Lefevre
Organization: ACME
X-Face:
X-Mailer: ELM [version 2.4ME+ PL95a (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Sender: owner-freebsd-fs@FreeBSD.ORG
Precedence: bulk
List-ID:
List-Archive: (Web Archive)
List-Help: (List Instructions)
List-Subscribe:
List-Unsubscribe:
X-Loop: FreeBSD.org
Marc Blanchet wrote:
> - I would like to use a tar-gzip filesystem that mounts a tgz file. The
> idea here is to browse through some large archives that are tgz. For
[snip]
as I remember me, Midnight Commander (misc/mc) has this feature and many
others (ftp, etc.) through an internal vfs layer.
Cyrille.
--
Cyrille Lefevre mailto:clefevre@citeweb.net
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message
From owner-freebsd-fs Fri Dec 7 13:26:42 2001
Delivered-To: freebsd-fs@freebsd.org
Received: from po10.andrew.cmu.edu (PO10.ANDREW.CMU.EDU [128.2.10.110])
by hub.freebsd.org (Postfix) with ESMTP id 8E52137B405
for ; Fri, 7 Dec 2001 13:25:58 -0800 (PST)
Received: (from postman@localhost)
by po10.andrew.cmu.edu (8.9.3/8.9.3) id QAA00971
for freebsd-fs@freebsd.org; Fri, 7 Dec 2001 16:25:32 -0500 (EST)
Received: via switchmail; Fri, 7 Dec 2001 16:25:31 -0500 (EST)
Received: from sphinx.andrew.cmu.edu via qmail
ID ;
Fri, 7 Dec 2001 16:25:07 -0500 (EST)
Received: from sphinx.andrew.cmu.edu via qmail
ID ;
Fri, 7 Dec 2001 16:25:07 -0500 (EST)
Received: from mms.4.60.Jul.16.2001.15.18.20.i386.Linux.22.EzMail.2.0.CUILIB.3.45.SNAP.NOT.LINKED.sphinx.andrew.cmu.edu.i386.linux22
via MS.5.6.sphinx.andrew.cmu.edu.i386_Linux_22;
Fri, 7 Dec 2001 16:25:07 -0500 (EST)
Message-ID:
Date: Fri, 7 Dec 2001 16:25:07 -0500 (EST)
From: Chaskiel M Grundman
To: freebsd-fs@freebsd.org
Subject: openafs and mmap
Cc:
Sender: owner-freebsd-fs@FreeBSD.ORG
Precedence: bulk
List-ID:
List-Archive: (Web Archive)
List-Help: (List Instructions)
List-Subscribe:
List-Unsubscribe:
X-Loop: FreeBSD.org
I currently have a partially- to mostly-working version of OpenAFS for
freebsd 4.x (I'm working with 4.4. hopefully vm will be mostly
compatible with other 4.x's)
My biggest current problem is that mmap isn't working. cp seems to use
mmap, and it always ends up creating a file full of nulls. It appears as
though my getpages function is never being called, even though it seems
to be properly listed in my vnodeopv_entry_desc (and my other vnodeops
do get called)
source can be viewed at http://www.contrib.andrew.cmu.edu/~cg2v/freebsd-openafs
The interesting files here are osi_vnodeops.c and osi_module.c (which
does initialization; I know that what osi_module.c does is non-standard,
but I can't think of any other way to prevent the filesystem code from
registering if
the syscall installation fails) The afs_vop_read and afs_vop_getpages
files are extracted copies of those particular vnode ops, to make it
easier to examine them.
Any help will be appreciated.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message
From owner-freebsd-fs Fri Dec 7 19:17:10 2001
Delivered-To: freebsd-fs@freebsd.org
Received: from po10.andrew.cmu.edu (PO10.ANDREW.CMU.EDU [128.2.10.110])
by hub.freebsd.org (Postfix) with ESMTP id 38A8B37B417
for ; Fri, 7 Dec 2001 19:17:08 -0800 (PST)
Received: (from postman@localhost)
by po10.andrew.cmu.edu (8.9.3/8.9.3) id WAA01200
for freebsd-fs@freebsd.org; Fri, 7 Dec 2001 22:17:01 -0500 (EST)
Received: via switchmail; Fri, 7 Dec 2001 22:17:01 -0500 (EST)
Received: from sphinx.andrew.cmu.edu via qmail
ID ;
Fri, 7 Dec 2001 22:16:25 -0500 (EST)
Received: from sphinx.andrew.cmu.edu via qmail
ID ;
Fri, 7 Dec 2001 22:16:24 -0500 (EST)
Received: from mms.4.60.Jul.16.2001.15.18.20.i386.Linux.22.EzMail.2.0.CUILIB.3.45.SNAP.NOT.LINKED.sphinx.andrew.cmu.edu.i386.linux22
via MS.5.6.sphinx.andrew.cmu.edu.i386_Linux_22;
Fri, 7 Dec 2001 22:16:24 -0500 (EST)
Message-ID:
Date: Fri, 7 Dec 2001 22:16:24 -0500 (EST)
From: Chaskiel M Grundman
To: freebsd-fs@freebsd.org
Subject: Re: openafs and mmap
Cc:
Sender: owner-freebsd-fs@FreeBSD.ORG
Precedence: bulk
List-ID:
List-Archive: (Web Archive)
List-Help: (List Instructions)
List-Subscribe:
List-Unsubscribe:
X-Loop: FreeBSD.org
> My biggest current problem is that mmap isn't working. cp seems to use
> mmap, and it always ends up creating a file full of nulls. It appears as
> though my getpages function is never being called, even though it seems
> to be properly listed in my vnodeopv_entry_desc (and my other vnodeops
> do get called)
I found the problem with my code that caused this.
In a vain attempt to prevent afs's vnodes from ever being vfree'd
(because they are not acquired from getnewvnode in the first place), I
was foolishly setting VDOOMED in v_flag since it didn't seem to be
referenced anywhere but in the VSHOULDFREE macro. I apparently missed
some references to it in vm/vnode_pager.c. If I don't set VDOOMED, mmap
seems to work ok. Now I'm left with my original problem: preventing vput
and vrele from ever calling vfree.
When I was working on OpenAFS for Darwin, Umesh, on behalf of Apple,
added a new vnode flag for this purpose: VSTANDARD. getnewvnode set
VSTANDARD on all vnodes it returned (and places that did things like
vp->v_flag=VROOT were changed to use |=), and vfree, vgone, and vclean
returned immediately if the flag was not set. If a modification like
this were made to FreeBSD, I think that only VSHOULDFREE and VSHOULDBUSY
would need to test for the flag, as long as the afs code never itself
calls vgone, vclean, or vrecycle (which it does not)
If a special case hack like this is not acceptible (and I can forsee
that being the case.), then it is likely that an OpenAFS client will not
be available for FreeBSD until such time as someone works on divorcing
afs vcache objects from vnodes. Perhaps one of the other openafs/bsd
efforts will do it. (This was done once before, when jtkohl@mit ported
afs 3.3 to NetBSD 1.3 in 1994-1996, but the afs/openafs source has been
heavily restructured since then)
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message
From owner-freebsd-fs Sat Dec 8 4:30:44 2001
Delivered-To: freebsd-fs@freebsd.org
Received: from ctcdns.ctcasic.com.tw (ctcdns.ctcasic.com.tw [210.243.237.170])
by hub.freebsd.org (Postfix) with ESMTP
id 1183037B41E; Sat, 8 Dec 2001 04:30:16 -0800 (PST)
Received: from da001d0349.lax-ca.osd.concentric.net ([64.0.145.94]) by ctcdns.ctcasic.com.tw with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21)
id X435D6SX; Sat, 8 Dec 2001 20:37:39 +0800
From:
Message-Id: <5Foxn4.55oxntUgLZ94.5jYRTf6sy.55oxntUgLab4QKI9.55oxntUgLRu.5jZ.5U7m2iFN.5kWE.5FWEn4wH.5Y1Vl2.5tJvT4A.5jJz@>
Subject: We are SERIOUS about making money on line!
Mime-Version: 1.0
Content-Type: text/html; charset="us-ascii"
Date: Sat, 8 Dec 2001 04:32:32
To: undisclosed-recipients:;
Sender: owner-freebsd-fs@FreeBSD.ORG
Precedence: bulk
List-ID:
List-Archive: (Web Archive)
List-Help: (List Instructions)
List-Subscribe:
List-Unsubscribe:
X-Loop: FreeBSD.org
$10K in 30 Days!!
I'll
Show YOU How To Make At Least....
$10,000
In 30 Days or Less Every Month... NO RISK!!!
|
Would you like to make at least
$10,000
(in 30 days or less) every month?
Here's how you can make that money
(and more... ) every month, and make
your first $10,000
in 30 days or less
- with absolutely no risk!
Click
Here For Complete Details!
|
If you have received this message in error and wish to be
removed from future mailings CLICK
HERE
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message