From owner-freebsd-fs@FreeBSD.ORG  Sun Aug 31 06:42:31 2008
Return-Path: <owner-freebsd-fs@FreeBSD.ORG>
Delivered-To: freebsd-fs@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1FEA8106567D
	for <freebsd-fs@freebsd.org>; Sun, 31 Aug 2008 06:42:31 +0000 (UTC)
	(envelope-from kostikbel@gmail.com)
Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147])
	by mx1.freebsd.org (Postfix) with ESMTP id B9A8C8FC18
	for <freebsd-fs@freebsd.org>; Sun, 31 Aug 2008 06:42:30 +0000 (UTC)
	(envelope-from kostikbel@gmail.com)
Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua)
	by mail.terabit.net.ua with esmtp (Exim 4.63 (FreeBSD))
	(envelope-from <kostikbel@gmail.com>)
	id 1KZgAg-00064S-0L; Sun, 31 Aug 2008 09:12:22 +0300
Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua
	[10.1.1.148])
	by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m7V6CJE4011330
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Sun, 31 Aug 2008 09:12:19 +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.14.2/8.14.2) with ESMTP id
	m7V6CITn044520; Sun, 31 Aug 2008 09:12:18 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: (from kostik@localhost)
	by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id m7V6CIrQ044519; 
	Sun, 31 Aug 2008 09:12:18 +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: Sun, 31 Aug 2008 09:12:18 +0300
From: Kostik Belousov <kostikbel@gmail.com>
To: Rick Macklem <rmacklem@uoguelph.ca>
Message-ID: <20080831061218.GJ2038@deviant.kiev.zoral.com.ua>
References: <Pine.GSO.4.63.0808301922050.21141@muncher.cs.uoguelph.ca>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="YtWd7p+F4osuzCU+"
Content-Disposition: inline
In-Reply-To: <Pine.GSO.4.63.0808301922050.21141@muncher.cs.uoguelph.ca>
User-Agent: Mutt/1.4.2.3i
X-Virus-Scanned: ClamAV version 0.93.3,
	clamav-milter version 0.93.3 on skuns.kiev.zoral.com.ua
X-Virus-Status: Clean
X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00
	autolearn=ham version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	skuns.kiev.zoral.com.ua
X-Virus-Scanned: mail.terabit.net.ua 1KZgAg-00064S-0L
	afd2ba53c9f4ab3ec2121edc2843955f
X-Terabit: YES
Cc: freebsd-fs@freebsd.org
Subject: Re: Is curthread always valid in a VOP call?
X-BeenThere: freebsd-fs@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Filesystems <freebsd-fs.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs>
List-Post: <mailto:freebsd-fs@freebsd.org>
List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 31 Aug 2008 06:42:31 -0000


--YtWd7p+F4osuzCU+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Aug 30, 2008 at 07:23:07PM -0400, Rick Macklem wrote:
> Since VOP_GETATTR() and VOP_SETATTR() lost the thread argument in=20
> -current, I did the obvious and used "curthread" instead. Is this
> safe to do?

Yes. Does the change forced you to use curthread often ?

--YtWd7p+F4osuzCU+
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEARECAAYFAki6NkIACgkQC3+MBN1Mb4jR3gCdFHsr5WxcTzEZP2lSajwD05/K
PWkAoIRUnPbz8GUVsls2OKBpShadsXR+
=H9tj
-----END PGP SIGNATURE-----

--YtWd7p+F4osuzCU+--

From owner-freebsd-fs@FreeBSD.ORG  Sun Aug 31 18:46:16 2008
Return-Path: <owner-freebsd-fs@FreeBSD.ORG>
Delivered-To: freebsd-fs@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A08091065675
	for <freebsd-fs@freebsd.org>; Sun, 31 Aug 2008 18:46:16 +0000 (UTC)
	(envelope-from rmacklem@uoguelph.ca)
Received: from mailhub.cs.uoguelph.ca (mailhub.cs.uoguelph.ca [131.104.94.205])
	by mx1.freebsd.org (Postfix) with ESMTP id 468068FC1E
	for <freebsd-fs@freebsd.org>; Sun, 31 Aug 2008 18:46:16 +0000 (UTC)
	(envelope-from rmacklem@uoguelph.ca)
Received: from muncher.cs.uoguelph.ca (muncher.cs.uoguelph.ca [131.104.91.102])
	by mailhub.cs.uoguelph.ca (8.13.1/8.13.1) with ESMTP id m7VIkFu9030972; 
	Sun, 31 Aug 2008 14:46:15 -0400
Received: from localhost (rmacklem@localhost)
	by muncher.cs.uoguelph.ca (8.11.7p3+Sun/8.11.6) with ESMTP id
	m7VIwY402680; Sun, 31 Aug 2008 14:58:34 -0400 (EDT)
X-Authentication-Warning: muncher.cs.uoguelph.ca: rmacklem owned process doing
	-bs
Date: Sun, 31 Aug 2008 14:58:34 -0400 (EDT)
From: Rick Macklem <rmacklem@uoguelph.ca>
X-X-Sender: rmacklem@muncher.cs.uoguelph.ca
To: Kostik Belousov <kostikbel@gmail.com>
In-Reply-To: <20080831061218.GJ2038@deviant.kiev.zoral.com.ua>
Message-ID: <Pine.GSO.4.63.0808311446230.685@muncher.cs.uoguelph.ca>
References: <Pine.GSO.4.63.0808301922050.21141@muncher.cs.uoguelph.ca>
	<20080831061218.GJ2038@deviant.kiev.zoral.com.ua>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-Scanned-By: MIMEDefang 2.63 on 131.104.94.205
Cc: freebsd-fs@freebsd.org
Subject: Re: Is curthread always valid in a VOP call?
X-BeenThere: freebsd-fs@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Filesystems <freebsd-fs.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs>
List-Post: <mailto:freebsd-fs@freebsd.org>
List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 31 Aug 2008 18:46:16 -0000



On Sun, 31 Aug 2008, Kostik Belousov wrote:

> On Sat, Aug 30, 2008 at 07:23:07PM -0400, Rick Macklem wrote:
>> Since VOP_GETATTR() and VOP_SETATTR() lost the thread argument in
>> -current, I did the obvious and used "curthread" instead. Is this
>> safe to do?
>
> Yes. Does the change forced you to use curthread often ?
>
Ok, thanks. How often? 7 (or 2 if I "struct thread *td = curthread; at
the beginning of nfs_getattr() and nfs_setattr() like the vanilla
nfsclient has done). Basically, any NFS
VOP is going to end up doing an RPC sooner or later (if it's lucky, it
hits a cache, but...) and the RPC currently likes to have a thread/proc
pointer so it can check for termination signals for interruptible
mounts. Personally, I'm not fond of interruptible mounts (they're hard
to get right and almost impossible to do correctly for NFS4) and prefer
hard mounts + forced dismounts when a server is dead. But, I'm not sure
others would be ready to get rid of them.

So, until interruptible mounts go away, I can't see avoiding a thread
pointer for the RPC and that means either pass it down the calling
chain or use curthread at some point. (Doesn't matter to me which it is,
so long as it works.)

rick

From owner-freebsd-fs@FreeBSD.ORG  Mon Sep  1 11:06:55 2008
Return-Path: <owner-freebsd-fs@FreeBSD.ORG>
Delivered-To: freebsd-fs@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 14F06106567D
	for <freebsd-fs@FreeBSD.org>; Mon,  1 Sep 2008 11:06:55 +0000 (UTC)
	(envelope-from owner-bugmaster@FreeBSD.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
	[IPv6:2001:4f8:fff6::28])
	by mx1.freebsd.org (Postfix) with ESMTP id 059038FC1E
	for <freebsd-fs@FreeBSD.org>; Mon,  1 Sep 2008 11:06:55 +0000 (UTC)
	(envelope-from owner-bugmaster@FreeBSD.org)
Received: from freefall.freebsd.org (localhost [127.0.0.1])
	by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m81B6sjg068419
	for <freebsd-fs@FreeBSD.org>; Mon, 1 Sep 2008 11:06:54 GMT
	(envelope-from owner-bugmaster@FreeBSD.org)
Received: (from gnats@localhost)
	by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m81B6sR8068415
	for freebsd-fs@FreeBSD.org; Mon, 1 Sep 2008 11:06:54 GMT
	(envelope-from owner-bugmaster@FreeBSD.org)
Date: Mon, 1 Sep 2008 11:06:54 GMT
Message-Id: <200809011106.m81B6sR8068415@freefall.freebsd.org>
X-Authentication-Warning: freefall.freebsd.org: gnats set sender to
	owner-bugmaster@FreeBSD.org using -f
From: FreeBSD bugmaster <bugmaster@FreeBSD.org>
To: freebsd-fs@FreeBSD.org
Cc: 
Subject: Current problem reports assigned to freebsd-fs@FreeBSD.org
X-BeenThere: freebsd-fs@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Filesystems <freebsd-fs.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs>
List-Post: <mailto:freebsd-fs@freebsd.org>
List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 01 Sep 2008 11:06:55 -0000

Current FreeBSD problem reports
Critical problems
Serious problems

S Tracker      Resp.      Description
--------------------------------------------------------------------------------
o kern/93942   fs         [vfs] [patch] panic: ufs_dirbad: bad dir (patch from D
o kern/112658  fs         [smbfs] [patch] smbfs and caching problems (resolves b
o kern/114676  fs         [ufs] snapshot creation panics: snapacct_ufs2: bad blo
o kern/116170  fs         [panic] Kernel panic when mounting /tmp
o bin/121072   fs         [smbfs] mount_smbfs(8) cannot normally convert the cha
o bin/122172   fs         [fs]: amd(8) automount daemon dies on 6.3-STABLE i386,
o kern/122888  fs         [zfs] zfs hang w/ prefetch on, zil off while running t

7 problems total.

Non-critical problems

S Tracker      Resp.      Description
--------------------------------------------------------------------------------
o bin/113049   fs         [patch] [request] make quot(8) use getopt(3) and show 
o bin/113838   fs         [patch] [request] mount(8): add support for relative p
o bin/114468   fs         [patch] [request] add -d option to umount(8) to detach
o kern/114847  fs         [ntfs] [patch] [request] dirmask support for NTFS ala 
o kern/114955  fs         [cd9660] [patch] [request] support for mask,dirmask,ui
o bin/118249   fs         mv(1): moving a directory changes its mtime
o kern/124621  fs         [ext3] Cannot mount ext2fs partition
o kern/125536  fs         [ext2fs] ext 2 mounts cleanly but fails on commands li
o kern/126287  fs         [ufs] [panic] Kernel panics while mounting an UFS file

9 problems total.


From owner-freebsd-fs@FreeBSD.ORG  Tue Sep  2 06:33:55 2008
Return-Path: <owner-freebsd-fs@FreeBSD.ORG>
Delivered-To: freebsd-fs@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7FB2B1065679
	for <freebsd-fs@freebsd.org>; Tue,  2 Sep 2008 06:33:55 +0000 (UTC)
	(envelope-from proace@gmail.com)
Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.31])
	by mx1.freebsd.org (Postfix) with ESMTP id 37D838FC17
	for <freebsd-fs@freebsd.org>; Tue,  2 Sep 2008 06:33:55 +0000 (UTC)
	(envelope-from proace@gmail.com)
Received: by yw-out-2324.google.com with SMTP id 9so275291ywe.13
	for <freebsd-fs@freebsd.org>; Mon, 01 Sep 2008 23:33:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:message-id:date:from:to
	:subject:mime-version:content-type:content-transfer-encoding
	:content-disposition;
	bh=gHSZBT6OgiAGX0GIk2sBg15bz4EdRDbM/ywJESTYAOA=;
	b=wWAhmUFf9khRsGTuMMeB/2HCa7pyD7ReZxTkIdWd7ND9x3x8F7xXW2lZku+lhqHTiw
	ESMvvRg1ZJDKGWPpBwrB6C3JX+CD8/L3ItOzOoD0kKrTxzddTPEzU9AkOFpzFcCkUlDy
	L3o6Zb4lUh1cQez/UAJ6C95DESlYin9DQ10JI=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=message-id:date:from:to:subject:mime-version:content-type
	:content-transfer-encoding:content-disposition;
	b=J2ywt6/QFQpiKvl3MZsrT//WzkBY1/v7C64oIVJIHc9fBmzDE8jecjraS+k4pK0GQJ
	tOP07SNVN/gRqpjmg6FSDKcCA5UETac90sSWXDysWL5y2Zyw56/HeKt4TZLWmwLUCNcb
	cCKXTsiao781todXd7XaJ5tgc/Zqw413m41W0=
Received: by 10.151.9.1 with SMTP id m1mr9829549ybi.219.1220335780098;
	Mon, 01 Sep 2008 23:09:40 -0700 (PDT)
Received: by 10.150.148.11 with HTTP; Mon, 1 Sep 2008 23:09:40 -0700 (PDT)
Message-ID: <737a6d270809012309w2be16ba3s8937623841107557@mail.gmail.com>
Date: Tue, 2 Sep 2008 14:09:40 +0800
From: ProAce <proace@gmail.com>
To: freebsd-fs@freebsd.org
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Subject: how to cache nfs file in local disk
X-BeenThere: freebsd-fs@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Filesystems <freebsd-fs.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs>
List-Post: <mailto:freebsd-fs@freebsd.org>
List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 02 Sep 2008 06:33:55 -0000

The question I posted on freebsd-question last week, maybe I post
wrong mailing list. I describe the question here again.   :)

In order to reduce the throughput and ops for nas server, I just want
to cache file from nfs to nfs client's local disk.
And the cache system can controller the total size of cache file
automatically ( the capacity of nas is more more more larger than
local disk ).

There are the cachefs on Solaris and FS-Cache on RedHat can cache file
from nfs to local disk, does any similar software can be run on
FreeBSD?

From owner-freebsd-fs@FreeBSD.ORG  Wed Sep  3 14:00:44 2008
Return-Path: <owner-freebsd-fs@FreeBSD.ORG>
Delivered-To: freebsd-fs@hub.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B83DA106567F;
	Wed,  3 Sep 2008 14:00:44 +0000 (UTC)
	(envelope-from remko@FreeBSD.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
	[IPv6:2001:4f8:fff6::28])
	by mx1.freebsd.org (Postfix) with ESMTP id 8AA468FC2A;
	Wed,  3 Sep 2008 14:00:44 +0000 (UTC)
	(envelope-from remko@FreeBSD.org)
Received: from freefall.freebsd.org (remko@localhost [127.0.0.1])
	by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m83E0iaj094343;
	Wed, 3 Sep 2008 14:00:44 GMT
	(envelope-from remko@freefall.freebsd.org)
Received: (from remko@localhost)
	by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m83E0isq094339;
	Wed, 3 Sep 2008 14:00:44 GMT (envelope-from remko)
Date: Wed, 3 Sep 2008 14:00:44 GMT
Message-Id: <200809031400.m83E0isq094339@freefall.freebsd.org>
To: remko@FreeBSD.org, freebsd-i386@FreeBSD.org, freebsd-fs@FreeBSD.org
From: remko@FreeBSD.org
Cc: 
Subject: Re: i386/127029: trying to mount a write prptected zip disk panics
	the machine (unless the -r flag is used)
X-BeenThere: freebsd-fs@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Filesystems <freebsd-fs.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs>
List-Post: <mailto:freebsd-fs@freebsd.org>
List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 03 Sep 2008 14:00:44 -0000

Synopsis: trying to mount a write prptected zip disk panics the machine (unless the -r flag is used)

Responsible-Changed-From-To: freebsd-i386->freebsd-fs
Responsible-Changed-By: remko
Responsible-Changed-When: Wed Sep 3 14:00:44 UTC 2008
Responsible-Changed-Why: 
Over to maintainer.

http://www.freebsd.org/cgi/query-pr.cgi?pr=127029

From owner-freebsd-fs@FreeBSD.ORG  Wed Sep  3 14:19:37 2008
Return-Path: <owner-freebsd-fs@FreeBSD.ORG>
Delivered-To: freebsd-fs@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D0FBE1065670
	for <freebsd-fs@freebsd.org>; Wed,  3 Sep 2008 14:19:37 +0000 (UTC)
	(envelope-from rmacklem@uoguelph.ca)
Received: from aeryn.cs.uoguelph.ca (aeryn.cs.uoguelph.ca [131.104.20.160])
	by mx1.freebsd.org (Postfix) with ESMTP id 73CD48FC28
	for <freebsd-fs@freebsd.org>; Wed,  3 Sep 2008 14:19:37 +0000 (UTC)
	(envelope-from rmacklem@uoguelph.ca)
Received: from muncher.cs.uoguelph.ca (muncher.cs.uoguelph.ca [131.104.91.102])
	by aeryn.cs.uoguelph.ca (8.13.1/8.13.1) with ESMTP id m83EJabV028196;
	Wed, 3 Sep 2008 10:19:36 -0400
Received: from localhost (rmacklem@localhost)
	by muncher.cs.uoguelph.ca (8.11.7p3+Sun/8.11.6) with ESMTP id
	m83EW1c00289; Wed, 3 Sep 2008 10:32:01 -0400 (EDT)
X-Authentication-Warning: muncher.cs.uoguelph.ca: rmacklem owned process doing
	-bs
Date: Wed, 3 Sep 2008 10:32:01 -0400 (EDT)
From: Rick Macklem <rmacklem@uoguelph.ca>
X-X-Sender: rmacklem@muncher.cs.uoguelph.ca
To: ProAce <proace@gmail.com>
In-Reply-To: <737a6d270809012309w2be16ba3s8937623841107557@mail.gmail.com>
Message-ID: <Pine.GSO.4.63.0809031027170.29474@muncher.cs.uoguelph.ca>
References: <737a6d270809012309w2be16ba3s8937623841107557@mail.gmail.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-Scanned-By: MIMEDefang 2.63 on 131.104.20.161
Cc: freebsd-fs@freebsd.org
Subject: Re: how to cache nfs file in local disk
X-BeenThere: freebsd-fs@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Filesystems <freebsd-fs.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs>
List-Post: <mailto:freebsd-fs@freebsd.org>
List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 03 Sep 2008 14:19:37 -0000



On Tue, 2 Sep 2008, ProAce wrote:

> The question I posted on freebsd-question last week, maybe I post
> wrong mailing list. I describe the question here again.   :)
>
> In order to reduce the throughput and ops for nas server, I just want
> to cache file from nfs to nfs client's local disk.
> And the cache system can controller the total size of cache file
> automatically ( the capacity of nas is more more more larger than
> local disk ).
>
> There are the cachefs on Solaris and FS-Cache on RedHat can cache file
> from nfs to local disk, does any similar software can be run on
> FreeBSD?
Since no one else has answered, I toss out "None that I am aware of".

I am planning on doing some work caching files on local disk when they
are delegated to the client, but that will be NFSv4 specific and at least
next summer before it is available. I also consider it experimental work,
so it may never end up usable in a near production environment.

To be honest, for LAN environments, ny hunch is that local disk caching
will only help if the client keeps accessing the same files over and over
again. But that's just a hunch at this point.

rick


From owner-freebsd-fs@FreeBSD.ORG  Wed Sep  3 16:25:29 2008
Return-Path: <owner-freebsd-fs@FreeBSD.ORG>
Delivered-To: freebsd-fs@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 409921067103
	for <freebsd-fs@freebsd.org>; Wed,  3 Sep 2008 16:25:29 +0000 (UTC)
	(envelope-from jh@saunalahti.fi)
Received: from emh06.mail.saunalahti.fi (emh06.mail.saunalahti.fi
	[62.142.5.116]) by mx1.freebsd.org (Postfix) with ESMTP id A80608FC24
	for <freebsd-fs@freebsd.org>; Wed,  3 Sep 2008 16:25:28 +0000 (UTC)
	(envelope-from jh@saunalahti.fi)
Received: from saunalahti-vams (vs3-11.mail.saunalahti.fi [62.142.5.95])
	by emh06-2.mail.saunalahti.fi (Postfix) with SMTP id 08926C89CB;
	Wed,  3 Sep 2008 19:07:40 +0300 (EEST)
Received: from emh01.mail.saunalahti.fi ([62.142.5.107])
	by vs3-11.mail.saunalahti.fi ([62.142.5.95])
	with SMTP (gateway) id A0288404E27; Wed, 03 Sep 2008 19:07:40 +0300
Received: from a91-153-122-179.elisa-laajakaista.fi
	(a91-153-122-179.elisa-laajakaista.fi [91.153.122.179])
	by emh01.mail.saunalahti.fi (Postfix) with SMTP id 8DF6E4BB46;
	Wed,  3 Sep 2008 19:07:37 +0300 (EEST)
Date: Wed, 3 Sep 2008 19:07:37 +0300
From: Jaakko Heinonen <jh@saunalahti.fi>
To: Bruce Evans <brde@optusnet.com.au>
Message-ID: <20080903160736.GA12587@a91-153-122-179.elisa-laajakaista.fi>
References: <200806020800.m528038T072838@freefall.freebsd.org>
	<20080722075718.GA1881@a91-153-120-204.elisa-laajakaista.fi>
	<20080722215249.K17453@delplex.bde.org>
	<20080723103424.GA1856@a91-153-120-204.elisa-laajakaista.fi>
	<20080724000618.Q16961@besplex.bde.org>
	<20080725072314.GA807@a91-153-120-204.elisa-laajakaista.fi>
	<20080725192315.D27178@delplex.bde.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20080725192315.D27178@delplex.bde.org>
User-Agent: Mutt/1.5.18 (2008-05-17)
X-Antivirus: VAMS
Cc: freebsd-fs@freebsd.org
Subject: Re: birthtime initialization
X-BeenThere: freebsd-fs@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Filesystems <freebsd-fs.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs>
List-Post: <mailto:freebsd-fs@freebsd.org>
List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 03 Sep 2008 16:25:29 -0000


Hi,

I further updated the patch.

On 2008-07-25, Bruce Evans wrote:
> On Fri, 25 Jul 2008, Jaakko Heinonen wrote:
> > On 2008-07-24, Bruce Evans wrote:
> >> First, the fields shouldn't be initialized using VATTR_NULL() in
> >> VOP_GETATTR().

I removed VATTR_NULL() from xfs, mqueuefs, pseudofs, tmpfs, devfs
fdescfs and vattr_null() from devfs and portalfs. I also removed zeroing
from nfs.

> > What do you think that is a proper default value for va_rdev? Some file
> > systems set it to 0 and some to VNOVAL.
> 
> Either NODEV or VNOVAL explicitly translated late to NODEV.

I changed following file systems to initialize va_rdev to NODEV instead
of 0 or VNOVAL (when appropriate): mqueuefs, tmpfs, portalfs, smbfs,
ntfs, fdescfs and msdosfs. Also in vn_stat() va_rdev is now initialized
to VNOVAL and explicitly translated to NODEV after the VOP_GETATTR()
call.

I have tested the patch with these file systems: UFS2, UFS1, ext2fs,
ntfs, cd9660, udf, procfs, devfs, xfs, reiserfs, fdescfs, msdosfs,
mqueuefs, nfs, smbfs, portalfs.

%%%
Index: sys/nfsclient/nfs_vnops.c
===================================================================
--- sys/nfsclient/nfs_vnops.c	(revision 182592)
+++ sys/nfsclient/nfs_vnops.c	(working copy)
@@ -631,6 +631,8 @@ nfs_getattr(struct vop_getattr_args *ap)
 	struct vnode *vp = ap->a_vp;
 	struct nfsnode *np = VTONFS(vp);
 	struct thread *td = curthread;
+	struct vattr *vap = ap->a_vap;
+	struct vattr vattr;
 	caddr_t bpos, dpos;
 	int error = 0;
 	struct mbuf *mreq, *mrep, *md, *mb;
@@ -646,12 +648,12 @@ nfs_getattr(struct vop_getattr_args *ap)
 	/*
 	 * First look in the cache.
 	 */
-	if (nfs_getattrcache(vp, ap->a_vap) == 0)
+	if (nfs_getattrcache(vp, &vattr) == 0)
 		goto nfsmout;
 	if (v3 && nfsaccess_cache_timeout > 0) {
 		nfsstats.accesscache_misses++;
 		nfs3_access_otw(vp, NFSV3ACCESS_ALL, td, ap->a_cred);
-		if (nfs_getattrcache(vp, ap->a_vap) == 0)
+		if (nfs_getattrcache(vp, &vattr) == 0)
 			goto nfsmout;
 	}
 	nfsstats.rpccnt[NFSPROC_GETATTR]++;
@@ -661,10 +663,27 @@ nfs_getattr(struct vop_getattr_args *ap)
 	nfsm_fhtom(vp, v3);
 	nfsm_request(vp, NFSPROC_GETATTR, td, ap->a_cred);
 	if (!error) {
-		nfsm_loadattr(vp, ap->a_vap);
+		nfsm_loadattr(vp, &vattr);
 	}
 	m_freem(mrep);
 nfsmout:
+	vap->va_type = vattr.va_type;
+	vap->va_mode = vattr.va_mode;
+	vap->va_nlink = vattr.va_nlink;
+	vap->va_uid = vattr.va_uid;
+	vap->va_gid = vattr.va_gid;
+	vap->va_fsid = vattr.va_fsid;
+	vap->va_fileid = vattr.va_fileid;
+	vap->va_size = vattr.va_size;
+	vap->va_blocksize = vattr.va_blocksize;
+	vap->va_atime = vattr.va_atime;
+	vap->va_mtime = vattr.va_mtime;
+	vap->va_ctime = vattr.va_ctime;
+	vap->va_gen = vattr.va_gen;
+	vap->va_flags = vattr.va_flags;
+	vap->va_rdev = vattr.va_rdev;
+	vap->va_bytes = vattr.va_bytes;
+
 	return (error);
 }
 
Index: sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c
===================================================================
--- sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c	(revision 182592)
+++ sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c	(working copy)
@@ -240,7 +240,6 @@ _xfs_getattr(
 	/* extract the xfs vnode from the private data */
 	//xfs_vnode_t	*xvp = (xfs_vnode_t *)vp->v_data;
 
-	VATTR_NULL(vap);
 	memset(&va,0,sizeof(xfs_vattr_t));
 	va.va_mask = XFS_AT_STAT|XFS_AT_GENCOUNT|XFS_AT_XFLAGS;
 
@@ -273,15 +272,9 @@ _xfs_getattr(
 
 	/*
 	 * Fields with no direct equivalent in XFS
-	 * leave initialized by VATTR_NULL
 	 */
-#if 0
 	vap->va_filerev = 0;
-	vap->va_birthtime = va.va_ctime;
-	vap->va_vaflags = 0;
 	vap->va_flags = 0;
-	vap->va_spare = 0;
-#endif
 
 	return (0);
 }
Index: sys/ufs/ufs/ufs_vnops.c
===================================================================
--- sys/ufs/ufs/ufs_vnops.c	(revision 182592)
+++ sys/ufs/ufs/ufs_vnops.c	(working copy)
@@ -434,8 +434,6 @@ ufs_getattr(ap)
 		vap->va_mtime.tv_nsec = ip->i_din1->di_mtimensec;
 		vap->va_ctime.tv_sec = ip->i_din1->di_ctime;
 		vap->va_ctime.tv_nsec = ip->i_din1->di_ctimensec;
-		vap->va_birthtime.tv_sec = 0;
-		vap->va_birthtime.tv_nsec = 0;
 		vap->va_bytes = dbtob((u_quad_t)ip->i_din1->di_blocks);
 	} else {
 		vap->va_rdev = ip->i_din2->di_rdev;
Index: sys/kern/uipc_mqueue.c
===================================================================
--- sys/kern/uipc_mqueue.c	(revision 182592)
+++ sys/kern/uipc_mqueue.c	(working copy)
@@ -1128,7 +1128,6 @@ mqfs_getattr(struct vop_getattr_args *ap
 	struct vattr *vap = ap->a_vap;
 	int error = 0;
 
-	VATTR_NULL(vap);
 	vap->va_type = vp->v_type;
 	vap->va_mode = pn->mn_mode;
 	vap->va_nlink = 1;
@@ -1145,7 +1144,7 @@ mqfs_getattr(struct vop_getattr_args *ap
 	vap->va_birthtime = pn->mn_birth;
 	vap->va_gen = 0;
 	vap->va_flags = 0;
-	vap->va_rdev = 0;
+	vap->va_rdev = NODEV;
 	vap->va_bytes = 0;
 	vap->va_filerev = 0;
 	vap->va_vaflags = 0;
Index: sys/kern/vfs_vnops.c
===================================================================
--- sys/kern/vfs_vnops.c	(revision 182592)
+++ sys/kern/vfs_vnops.c	(working copy)
@@ -703,6 +703,17 @@ vn_stat(vp, sb, active_cred, file_cred, 
 #endif
 
 	vap = &vattr;
+
+	/*
+	 * Initialize defaults for new and unusual fields, so that file      
+	 * systems which don't support these fields don't need to know          
+	 * about them.
+	 */
+	vap->va_birthtime.tv_sec = -1;
+	vap->va_birthtime.tv_nsec = 0;
+	vap->va_fsid = VNOVAL;
+	vap->va_rdev = VNOVAL;
+
 	error = VOP_GETATTR(vp, vap, active_cred);
 	if (error)
 		return (error);
@@ -750,7 +761,10 @@ vn_stat(vp, sb, active_cred, file_cred, 
 	sb->st_nlink = vap->va_nlink;
 	sb->st_uid = vap->va_uid;
 	sb->st_gid = vap->va_gid;
-	sb->st_rdev = vap->va_rdev;
+	if (vap->va_rdev == VNOVAL)
+		sb->st_rdev = NODEV;
+	else
+		sb->st_rdev = vap->va_rdev;
 	if (vap->va_size > OFF_MAX)
 		return (EOVERFLOW);
 	sb->st_size = vap->va_size;
Index: sys/fs/pseudofs/pseudofs_vnops.c
===================================================================
--- sys/fs/pseudofs/pseudofs_vnops.c	(revision 182592)
+++ sys/fs/pseudofs/pseudofs_vnops.c	(working copy)
@@ -191,7 +191,6 @@ pfs_getattr(struct vop_getattr_args *va)
 	if (!pfs_visible(curthread, pn, pvd->pvd_pid, &proc))
 		PFS_RETURN (ENOENT);
 
-	VATTR_NULL(vap);
 	vap->va_type = vn->v_type;
 	vap->va_fileid = pn_fileno(pn, pvd->pvd_pid);
 	vap->va_flags = 0;
Index: sys/fs/tmpfs/tmpfs_vnops.c
===================================================================
--- sys/fs/tmpfs/tmpfs_vnops.c	(revision 182592)
+++ sys/fs/tmpfs/tmpfs_vnops.c	(working copy)
@@ -351,8 +351,6 @@ tmpfs_getattr(struct vop_getattr_args *v
 
 	node = VP_TO_TMPFS_NODE(vp);
 
-	VATTR_NULL(vap);
-
 	tmpfs_update(vp);
 
 	vap->va_type = vp->v_type;
@@ -371,11 +369,9 @@ tmpfs_getattr(struct vop_getattr_args *v
 	vap->va_gen = node->tn_gen;
 	vap->va_flags = node->tn_flags;
 	vap->va_rdev = (vp->v_type == VBLK || vp->v_type == VCHR) ?
-		node->tn_rdev : VNOVAL;
+		node->tn_rdev : NODEV;
 	vap->va_bytes = round_page(node->tn_size);
-	vap->va_filerev = VNOVAL;
-	vap->va_vaflags = 0;
-	vap->va_spare = VNOVAL; /* XXX */
+	vap->va_filerev = 0;
 
 	return 0;
 }
Index: sys/fs/portalfs/portal_vnops.c
===================================================================
--- sys/fs/portalfs/portal_vnops.c	(revision 182592)
+++ sys/fs/portalfs/portal_vnops.c	(working copy)
@@ -452,8 +452,6 @@ portal_getattr(ap)
 	struct vnode *vp = ap->a_vp;
 	struct vattr *vap = ap->a_vap;
 
-	bzero(vap, sizeof(*vap));
-	vattr_null(vap);
 	vap->va_uid = 0;
 	vap->va_gid = 0;
 	vap->va_size = DEV_BSIZE;
@@ -463,7 +461,7 @@ portal_getattr(ap)
 	vap->va_ctime = vap->va_mtime;
 	vap->va_gen = 0;
 	vap->va_flags = 0;
-	vap->va_rdev = 0;
+	vap->va_rdev = NODEV;
 	/* vap->va_qbytes = 0; */
 	vap->va_bytes = 0;
 	/* vap->va_qsize = 0; */
Index: sys/fs/devfs/devfs_vnops.c
===================================================================
--- sys/fs/devfs/devfs_vnops.c	(revision 182592)
+++ sys/fs/devfs/devfs_vnops.c	(working copy)
@@ -499,8 +499,6 @@ devfs_getattr(struct vop_getattr_args *a
 		KASSERT(de != NULL,
 		    ("Null dir dirent in devfs_getattr vp=%p", vp));
 	}
-	bzero((caddr_t) vap, sizeof(*vap));
-	vattr_null(vap);
 	vap->va_uid = de->de_uid;
 	vap->va_gid = de->de_gid;
 	vap->va_mode = de->de_mode;
Index: sys/fs/smbfs/smbfs_node.c
===================================================================
--- sys/fs/smbfs/smbfs_node.c	(revision 182592)
+++ sys/fs/smbfs/smbfs_node.c	(working copy)
@@ -438,7 +438,7 @@ smbfs_attr_cachelookup(struct vnode *vp,
 	va->va_atime = va->va_ctime = va->va_mtime;	/* time file changed */
 	va->va_gen = VNOVAL;		/* generation number of file */
 	va->va_flags = 0;		/* flags defined for file */
-	va->va_rdev = VNOVAL;		/* device the special file represents */
+	va->va_rdev = NODEV;		/* device the special file represents */
 	va->va_bytes = va->va_size;	/* bytes of disk space held by file */
 	va->va_filerev = 0;		/* file modification number */
 	va->va_vaflags = 0;		/* operations flags */
Index: sys/fs/ntfs/ntfs_vnops.c
===================================================================
--- sys/fs/ntfs/ntfs_vnops.c	(revision 182592)
+++ sys/fs/ntfs/ntfs_vnops.c	(working copy)
@@ -191,7 +191,7 @@ ntfs_getattr(ap)
 	vap->va_nlink = (ip->i_nlink || ip->i_flag & IN_LOADED ? ip->i_nlink : 1);
 	vap->va_uid = ip->i_mp->ntm_uid;
 	vap->va_gid = ip->i_mp->ntm_gid;
-	vap->va_rdev = 0;				/* XXX UNODEV ? */
+	vap->va_rdev = NODEV;
 	vap->va_size = fp->f_size;
 	vap->va_bytes = fp->f_allocated;
 	vap->va_atime = ntfs_nttimetounix(fp->f_times.t_access);
Index: sys/fs/fdescfs/fdesc_vnops.c
===================================================================
--- sys/fs/fdescfs/fdesc_vnops.c	(revision 182592)
+++ sys/fs/fdescfs/fdesc_vnops.c	(working copy)
@@ -391,8 +391,6 @@ fdesc_getattr(ap)
 
 	switch (VTOFDESC(vp)->fd_type) {
 	case Froot:
-		VATTR_NULL(vap);
-
 		vap->va_mode = S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH;
 		vap->va_type = VDIR;
 		vap->va_nlink = 2;
@@ -407,7 +405,7 @@ fdesc_getattr(ap)
 		vap->va_ctime = vap->va_mtime;
 		vap->va_gen = 0;
 		vap->va_flags = 0;
-		vap->va_rdev = 0;
+		vap->va_rdev = NODEV;
 		vap->va_bytes = 0;
 		break;
 
@@ -421,7 +419,6 @@ fdesc_getattr(ap)
 		error = fo_stat(fp, &stb, td->td_ucred, td);
 		fdrop(fp, td);
 		if (error == 0) {
-			VATTR_NULL(vap);
 			vap->va_type = IFTOVT(stb.st_mode);
 			vap->va_mode = stb.st_mode;
 #define FDRX (VREAD|VEXEC)
Index: sys/fs/msdosfs/msdosfs_vnops.c
===================================================================
--- sys/fs/msdosfs/msdosfs_vnops.c	(revision 182592)
+++ sys/fs/msdosfs/msdosfs_vnops.c	(working copy)
@@ -334,7 +334,7 @@ msdosfs_getattr(ap)
 	vap->va_uid = pmp->pm_uid;
 	vap->va_gid = pmp->pm_gid;
 	vap->va_nlink = 1;
-	vap->va_rdev = 0;
+	vap->va_rdev = NODEV;
 	vap->va_size = dep->de_FileSize;
 	fattime2timespec(dep->de_MDate, dep->de_MTime, 0, 0, &vap->va_mtime);
 	vap->va_ctime = vap->va_mtime;
%%%

-- 
Jaakko

From owner-freebsd-fs@FreeBSD.ORG  Wed Sep  3 18:30:05 2008
Return-Path: <owner-freebsd-fs@FreeBSD.ORG>
Delivered-To: freebsd-fs@hub.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 499A81065900
	for <freebsd-fs@hub.freebsd.org>; Wed,  3 Sep 2008 18:30:05 +0000 (UTC)
	(envelope-from gnats@FreeBSD.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
	[IPv6:2001:4f8:fff6::28])
	by mx1.freebsd.org (Postfix) with ESMTP id 385C68FC16
	for <freebsd-fs@hub.freebsd.org>; Wed,  3 Sep 2008 18:30:05 +0000 (UTC)
	(envelope-from gnats@FreeBSD.org)
Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1])
	by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m83IU4Hn030985
	for <freebsd-fs@freefall.freebsd.org>; Wed, 3 Sep 2008 18:30:04 GMT
	(envelope-from gnats@freefall.freebsd.org)
Received: (from gnats@localhost)
	by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m83IU4OK030982;
	Wed, 3 Sep 2008 18:30:04 GMT (envelope-from gnats)
Date: Wed, 3 Sep 2008 18:30:04 GMT
Message-Id: <200809031830.m83IU4OK030982@freefall.freebsd.org>
To: freebsd-fs@FreeBSD.org
From: "Josh Carroll" <josh.carroll@gmail.com>
Cc: 
Subject: Re: kern/124621: [ext3] Cannot mount ext2fs partition
X-BeenThere: freebsd-fs@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: Josh Carroll <josh.carroll@gmail.com>
List-Id: Filesystems <freebsd-fs.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs>
List-Post: <mailto:freebsd-fs@freebsd.org>
List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 03 Sep 2008 18:30:05 -0000

The following reply was made to PR kern/124621; it has been noted by GNATS.

From: "Josh Carroll" <josh.carroll@gmail.com>
To: bug-followup@FreeBSD.org, paulf@free.fr
Cc:  
Subject: Re: kern/124621: [ext3] Cannot mount ext2fs partition
Date: Wed, 3 Sep 2008 14:28:58 -0400

 Here is a simple patch that queries the inode size, rather than assuming 128.
 
 This may be a rather naive way to do this (querying it every time from
 (s)->s_es->s_inode_size), but it does seem to work. Perhaps there is a
 smarter way of doing this (setting something at mount time?).
 
 I tested this with mke2fs -I 128, mke2fs (defaults to -I 256 with the
 latest e2fsprogs port), and -I 512.
 
 Thanks,
 Josh
 
 
 diff -ud ext2fs.orig/ext2_fs.h ext2fs/ext2_fs.h
 --- ext2fs.orig/ext2_fs.h       2005-06-16 06:51:38.000000000 +0000
 +++ ext2fs/ext2_fs.h    2008-09-03 14:10:27.000000000 +0000
 @@ -150,7 +150,7 @@
  #else /* !notyet */
  #define        EXT2_INODES_PER_BLOCK(s)        ((s)->s_inodes_per_block)
  /* Should be sizeof(struct ext2_inode): */
 -#define EXT2_INODE_SIZE                        128
 +#define EXT2_INODE_SIZE(s)             ((s)->s_es->s_inode_size)
  #define EXT2_FIRST_INO                 11
  #endif /* notyet */
 
 diff -ud ext2fs.orig/ext2_inode.c ext2fs/ext2_inode.c
 --- ext2fs.orig/ext2_inode.c    2006-09-26 04:15:58.000000000 +0000
 +++ ext2fs/ext2_inode.c 2008-09-03 13:54:49.000000000 +0000
 @@ -91,7 +91,7 @@
                 return (error);
         }
         ext2_i2ei(ip, (struct ext2_inode *)((char *)bp->b_data +
 -           EXT2_INODE_SIZE * ino_to_fsbo(fs, ip->i_number)));
 +           EXT2_INODE_SIZE(fs) * ino_to_fsbo(fs, ip->i_number)));
         if (waitfor && (vp->v_mount->mnt_kern_flag & MNTK_ASYNC) == 0)
                 return (bwrite(bp));
         else {
 diff -ud ext2fs.orig/ext2_vfsops.c ext2fs/ext2_vfsops.c
 --- ext2fs.orig/ext2_vfsops.c   2008-04-03 18:51:13.000000000 +0000
 +++ ext2fs/ext2_vfsops.c        2008-09-03 13:55:37.000000000 +0000
 @@ -424,7 +424,7 @@
      V(s_frags_per_group)
      fs->s_inodes_per_group = es->s_inodes_per_group;
      V(s_inodes_per_group)
 -    fs->s_inodes_per_block = fs->s_blocksize / EXT2_INODE_SIZE;
 +    fs->s_inodes_per_block = fs->s_blocksize / EXT2_INODE_SIZE(fs);
      V(s_inodes_per_block)
      fs->s_itb_per_group = fs->s_inodes_per_group /fs->s_inodes_per_block;
      V(s_itb_per_group)
 @@ -578,7 +578,7 @@
                         return (error);
                 }
                 ext2_ei2i((struct ext2_inode *) ((char *)bp->b_data +
 -                   EXT2_INODE_SIZE * ino_to_fsbo(fs, ip->i_number)), ip);
 +                   EXT2_INODE_SIZE(fs) * ino_to_fsbo(fs, ip->i_number)), ip);
                 brelse(bp);
                 VOP_UNLOCK(vp, 0, td);
                 vrele(vp);
 @@ -1013,7 +1013,7 @@
                 return (error);
         }
         /* convert ext2 inode to dinode */
 -       ext2_ei2i((struct ext2_inode *) ((char *)bp->b_data + EXT2_INODE_SIZE *
 +       ext2_ei2i((struct ext2_inode *) ((char *)bp->b_data +
 EXT2_INODE_SIZE(fs) *
                         ino_to_fsbo(fs, ino)), ip);
         ip->i_block_group = ino_to_cg(fs, ino);
         ip->i_next_alloc_block = 0;

From owner-freebsd-fs@FreeBSD.ORG  Wed Sep  3 23:11:13 2008
Return-Path: <owner-freebsd-fs@FreeBSD.ORG>
Delivered-To: freebsd-fs@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3E22C106567D
	for <freebsd-fs@freebsd.org>; Wed,  3 Sep 2008 23:11:13 +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 162D78FC0A
	for <freebsd-fs@freebsd.org>; Wed,  3 Sep 2008 23:11:13 +0000 (UTC)
	(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 0A6EE46C06;
	Wed,  3 Sep 2008 19:11:11 -0400 (EDT)
Date: Thu, 4 Sep 2008 00:11:11 +0100 (BST)
From: Robert Watson <rwatson@FreeBSD.org>
X-X-Sender: robert@fledge.watson.org
To: Rick Macklem <rmacklem@uoguelph.ca>
In-Reply-To: <Pine.GSO.4.63.0809031027170.29474@muncher.cs.uoguelph.ca>
Message-ID: <alpine.BSF.1.10.0809040008430.74719@fledge.watson.org>
References: <737a6d270809012309w2be16ba3s8937623841107557@mail.gmail.com>
	<Pine.GSO.4.63.0809031027170.29474@muncher.cs.uoguelph.ca>
User-Agent: Alpine 1.10 (BSF 962 2008-03-14)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: freebsd-fs@freebsd.org, ProAce <proace@gmail.com>
Subject: Re: how to cache nfs file in local disk
X-BeenThere: freebsd-fs@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Filesystems <freebsd-fs.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs>
List-Post: <mailto:freebsd-fs@freebsd.org>
List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 03 Sep 2008 23:11:13 -0000


On Wed, 3 Sep 2008, Rick Macklem wrote:

> On Tue, 2 Sep 2008, ProAce wrote:
>
>> The question I posted on freebsd-question last week, maybe I post wrong 
>> mailing list. I describe the question here again.  :)
>> 
>> In order to reduce the throughput and ops for nas server, I just want to 
>> cache file from nfs to nfs client's local disk. And the cache system can 
>> controller the total size of cache file automatically ( the capacity of nas 
>> is more more more larger than local disk ).
>> 
>> There are the cachefs on Solaris and FS-Cache on RedHat can cache file from 
>> nfs to local disk, does any similar software can be run on FreeBSD?
>
> Since no one else has answered, I toss out "None that I am aware of".
>
> I am planning on doing some work caching files on local disk when they are 
> delegated to the client, but that will be NFSv4 specific and at least next 
> summer before it is available. I also consider it experimental work, so it 
> may never end up usable in a near production environment.
>
> To be honest, for LAN environments, ny hunch is that local disk caching will 
> only help if the client keeps accessing the same files over and over again. 
> But that's just a hunch at this point.

The AFS argument may be relevant here: persistent client-side caching is as 
much about indirectly improving client performance through greater server 
scalability as about directly improving client performance through local disk 
I/O speed.

Robert N M Watson
Computer Laboratory
University of Cambridge

From owner-freebsd-fs@FreeBSD.ORG  Thu Sep  4 01:34:25 2008
Return-Path: <owner-freebsd-fs@FreeBSD.ORG>
Delivered-To: freebsd-fs@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B43971069B62
	for <freebsd-fs@freebsd.org>; Thu,  4 Sep 2008 01:34:25 +0000 (UTC)
	(envelope-from proace@gmail.com)
Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.29])
	by mx1.freebsd.org (Postfix) with ESMTP id 6E1F18FC16
	for <freebsd-fs@freebsd.org>; Thu,  4 Sep 2008 01:34:25 +0000 (UTC)
	(envelope-from proace@gmail.com)
Received: by yx-out-2324.google.com with SMTP id 8so1716064yxb.13
	for <freebsd-fs@freebsd.org>; Wed, 03 Sep 2008 18:34:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:message-id:date:from:to
	:subject:cc:in-reply-to:mime-version:content-type
	:content-transfer-encoding:content-disposition:references;
	bh=dPf3r2qrQCCQW0Qtt+FrIU9lCJwXDNGDhu2ijyEcuhI=;
	b=iVvUFqkV2g7Z8A4ITu0i8hYC2VUCPcbEKhT/GCYUXal4IpfbLUKy/T7MNYK3fY2e7J
	aEtSYtAraKTG8J74dZVjRHwNnmbIlnQ9EthB3iF87OY9+X3GaZu2Rjti+9OohcrI4Vvw
	gFSMb9cWVcXk7ARGl/NSXR2AFUYHdJoTrMdls=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=message-id:date:from:to:subject:cc:in-reply-to:mime-version
	:content-type:content-transfer-encoding:content-disposition
	:references;
	b=dluCSCGOzJSOqFwOsiQBBaFTSFO/KzMV025bEs+iyu40HcUmlCb8CAjGg5HrSmvHqn
	V/CrtBz3Vo/qxvWYfYAP9NMuhSqef/p2vZ7ytudmLzNW4uQVQOVssfpFnwYwxMI+8Lqi
	HIbESFoj9zPZ5/DMAas3UYZe1aL1t4L6PMJFU=
Received: by 10.150.181.11 with SMTP id d11mr7549109ybf.32.1220492064645;
	Wed, 03 Sep 2008 18:34:24 -0700 (PDT)
Received: by 10.150.148.11 with HTTP; Wed, 3 Sep 2008 18:34:24 -0700 (PDT)
Message-ID: <737a6d270809031834v54bab15bwb535b126cd36f38e@mail.gmail.com>
Date: Thu, 4 Sep 2008 09:34:24 +0800
From: ProAce <proace@gmail.com>
To: "Rick Macklem" <rmacklem@uoguelph.ca>
In-Reply-To: <Pine.GSO.4.63.0809031027170.29474@muncher.cs.uoguelph.ca>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <737a6d270809012309w2be16ba3s8937623841107557@mail.gmail.com>
	<Pine.GSO.4.63.0809031027170.29474@muncher.cs.uoguelph.ca>
Cc: freebsd-fs@freebsd.org
Subject: Re: how to cache nfs file in local disk
X-BeenThere: freebsd-fs@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Filesystems <freebsd-fs.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs>
List-Post: <mailto:freebsd-fs@freebsd.org>
List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 04 Sep 2008 01:34:25 -0000

>
> 2008/9/3, Rick Macklem <rmacklem@uoguelph.ca>:
>
>
> Since no one else has answered, I toss out "None that I am aware of".
>
> I am planning on doing some work caching files on local disk when they
> are delegated to the client, but that will be NFSv4 specific and at least
> next summer before it is available. I also consider it experimental work,
> so it may never end up usable in a near production environment.
>
> To be honest, for LAN environments, ny hunch is that local disk caching
> will only help if the client keeps accessing the same files over and over
> again. But that's just a hunch at this point.
>
> rick
>
>

Bingo!
Currently, the bigest problem for me is client access some files over
and over again.

From owner-freebsd-fs@FreeBSD.ORG  Thu Sep  4 02:04:30 2008
Return-Path: <owner-freebsd-fs@FreeBSD.ORG>
Delivered-To: freebsd-fs@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5BE5A1065694
	for <freebsd-fs@freebsd.org>; Thu,  4 Sep 2008 02:04:30 +0000 (UTC)
	(envelope-from proace@gmail.com)
Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.29])
	by mx1.freebsd.org (Postfix) with ESMTP id 137B78FC14
	for <freebsd-fs@freebsd.org>; Thu,  4 Sep 2008 02:04:29 +0000 (UTC)
	(envelope-from proace@gmail.com)
Received: by yx-out-2324.google.com with SMTP id 8so1721127yxb.13
	for <freebsd-fs@freebsd.org>; Wed, 03 Sep 2008 19:04:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:message-id:date:from:to
	:subject:cc:in-reply-to:mime-version:content-type
	:content-transfer-encoding:content-disposition:references;
	bh=VMlOhzvbc76Ru+1EAioKbzU4mKEgLZPD72lGc11YYHU=;
	b=Z5o9ZT4LOE7DO+srR5GpM+yXkdHl6ojUipoO9140k7/px7+0mkJQkkt4bUfc/soO6c
	OshSJkJpOSmQDlXzCKGW8nsXzlMInjk9OylON08na5iND9wHiLi6TxBZ/E7oDg5r2sOl
	8KJuvu9DxLvycD8MexizH/1b8b3LQf/YaHMMo=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=message-id:date:from:to:subject:cc:in-reply-to:mime-version
	:content-type:content-transfer-encoding:content-disposition
	:references;
	b=R4x/1RbvzmkwkFl0EBaqYleB/IXIAhmY0n8uhwBxDLWo6ybEek8KsOiv0LfqaP0YDR
	Kxhg9mY/58yGMfU+B6a/LFPnWVYrTgilLzMmj0jnxfN5ecOm7MATLd2FUL14qNl+gADi
	gG5uDWa3Oflc3lYJpbeCO8lVC42OoWPNY+Exk=
Received: by 10.151.141.16 with SMTP id t16mr13470341ybn.167.1220493868169;
	Wed, 03 Sep 2008 19:04:28 -0700 (PDT)
Received: by 10.150.148.11 with HTTP; Wed, 3 Sep 2008 19:04:28 -0700 (PDT)
Message-ID: <737a6d270809031904u31963f7au752e6fadae4536c3@mail.gmail.com>
Date: Thu, 4 Sep 2008 10:04:28 +0800
From: ProAce <proace@gmail.com>
To: "Robert Watson" <rwatson@freebsd.org>
In-Reply-To: <alpine.BSF.1.10.0809040008430.74719@fledge.watson.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <737a6d270809012309w2be16ba3s8937623841107557@mail.gmail.com>
	<Pine.GSO.4.63.0809031027170.29474@muncher.cs.uoguelph.ca>
	<alpine.BSF.1.10.0809040008430.74719@fledge.watson.org>
Cc: freebsd-fs@freebsd.org
Subject: Re: how to cache nfs file in local disk
X-BeenThere: freebsd-fs@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Filesystems <freebsd-fs.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs>
List-Post: <mailto:freebsd-fs@freebsd.org>
List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 04 Sep 2008 02:04:30 -0000

>
> 2008/9/4, Robert Watson <rwatson@freebsd.org>:
>
> The AFS argument may be relevant here: persistent client-side caching is as
> much about indirectly improving client performance through greater server
> scalability as about directly improving client performance through local
> disk I/O speed.
>
> Robert N M Watson
> Computer Laboratory
> University of Cambridge
>

But change fs from nfs to afs maybe more complex, and need more
evaluations for the production environment.

If my cognition for AFS is wrong, could you give me more hints?   :)

From owner-freebsd-fs@FreeBSD.ORG  Thu Sep  4 07:22:53 2008
Return-Path: <owner-freebsd-fs@FreeBSD.ORG>
Delivered-To: freebsd-fs@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F2DAC1065681
	for <freebsd-fs@freebsd.org>; Thu,  4 Sep 2008 07:22:53 +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 C56248FC1E
	for <freebsd-fs@freebsd.org>; Thu,  4 Sep 2008 07:22:53 +0000 (UTC)
	(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 6EB9746BB3;
	Thu,  4 Sep 2008 03:22:51 -0400 (EDT)
Date: Thu, 4 Sep 2008 08:22:52 +0100 (BST)
From: Robert Watson <rwatson@FreeBSD.org>
X-X-Sender: robert@fledge.watson.org
To: ProAce <proace@gmail.com>
In-Reply-To: <737a6d270809031904u31963f7au752e6fadae4536c3@mail.gmail.com>
Message-ID: <alpine.BSF.1.10.0809040817270.37109@fledge.watson.org>
References: <737a6d270809012309w2be16ba3s8937623841107557@mail.gmail.com>
	<Pine.GSO.4.63.0809031027170.29474@muncher.cs.uoguelph.ca>
	<alpine.BSF.1.10.0809040008430.74719@fledge.watson.org>
	<737a6d270809031904u31963f7au752e6fadae4536c3@mail.gmail.com>
User-Agent: Alpine 1.10 (BSF 962 2008-03-14)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: freebsd-fs@freebsd.org
Subject: Re: how to cache nfs file in local disk
X-BeenThere: freebsd-fs@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Filesystems <freebsd-fs.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs>
List-Post: <mailto:freebsd-fs@freebsd.org>
List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 04 Sep 2008 07:22:54 -0000

On Thu, 4 Sep 2008, ProAce wrote:

>> 2008/9/4, Robert Watson <rwatson@freebsd.org>:
>>
>> The AFS argument may be relevant here: persistent client-side caching is as 
>> much about indirectly improving client performance through greater server 
>> scalability as about directly improving client performance through local 
>> disk I/O speed.
>
> But change fs from nfs to afs maybe more complex, and need more evaluations 
> for the production environment.
>
> If my cognition for AFS is wrong, could you give me more hints?  :)

Right, this is not an argument that you should switch to AFS, rather, an 
argument that the design approach of persistent client-side caching first 
adopted in AFS isn't just about raw bandwidth or latency to the client, but 
about improving the ability of the server to scale to large numbers of 
clients.

All that said, I'm really pleased that Arla is working much beter on FreeBSD 
lately, and that significant work has gone into an OpenAFS port for 7.x and 
8.x.

Robert N M Watson
Computer Laboratory
University of Cambridge

From owner-freebsd-fs@FreeBSD.ORG  Thu Sep  4 17:20:03 2008
Return-Path: <owner-freebsd-fs@FreeBSD.ORG>
Delivered-To: freebsd-fs@hub.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F2B25106566B
	for <freebsd-fs@hub.freebsd.org>; Thu,  4 Sep 2008 17:20:03 +0000 (UTC)
	(envelope-from gnats@FreeBSD.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
	[IPv6:2001:4f8:fff6::28])
	by mx1.freebsd.org (Postfix) with ESMTP id E05318FC27
	for <freebsd-fs@hub.freebsd.org>; Thu,  4 Sep 2008 17:20:03 +0000 (UTC)
	(envelope-from gnats@FreeBSD.org)
Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1])
	by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m84HK3PG031380
	for <freebsd-fs@freefall.freebsd.org>; Thu, 4 Sep 2008 17:20:03 GMT
	(envelope-from gnats@freefall.freebsd.org)
Received: (from gnats@localhost)
	by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m84HK3nw031379;
	Thu, 4 Sep 2008 17:20:03 GMT (envelope-from gnats)
Date: Thu, 4 Sep 2008 17:20:03 GMT
Message-Id: <200809041720.m84HK3nw031379@freefall.freebsd.org>
To: freebsd-fs@FreeBSD.org
From: "Josh Carroll" <josh.carroll@gmail.com>
Cc: 
Subject: Re: kern/124621: [ext3] Cannot mount ext2fs partition
X-BeenThere: freebsd-fs@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: Josh Carroll <josh.carroll@gmail.com>
List-Id: Filesystems <freebsd-fs.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs>
List-Post: <mailto:freebsd-fs@freebsd.org>
List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 04 Sep 2008 17:20:04 -0000

The following reply was made to PR kern/124621; it has been noted by GNATS.

From: "Josh Carroll" <josh.carroll@gmail.com>
To: bug-followup@FreeBSD.org, paulf@free.fr
Cc:  
Subject: Re: kern/124621: [ext3] Cannot mount ext2fs partition
Date: Thu, 4 Sep 2008 13:16:55 -0400

 ------=_Part_61122_6937983.1220548615546
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 Sorry, it appears the previous patch was munged by gmail.
 
 I'm trying it as an attachment this time. I apologize in advance if
 this attempt is also munged.
 
 Josh
 
 ------=_Part_61122_6937983.1220548615546
 Content-Type: application/octet-stream; name=ext2fs.diff
 Content-Transfer-Encoding: base64
 X-Attachment-Id: f_fkpn4bhq0
 Content-Disposition: attachment; filename=ext2fs.diff
 
 ZGlmZiAtdWQgZXh0MmZzLm9yaWcvZXh0Ml9mcy5oIGV4dDJmcy9leHQyX2ZzLmgKLS0tIGV4dDJm
 cy5vcmlnL2V4dDJfZnMuaAkyMDA1LTA2LTE2IDA2OjUxOjM4LjAwMDAwMDAwMCArMDAwMAorKysg
 ZXh0MmZzL2V4dDJfZnMuaAkyMDA4LTA5LTAzIDE0OjEwOjI3LjAwMDAwMDAwMCArMDAwMApAQCAt
 MTUwLDcgKzE1MCw3IEBACiAjZWxzZSAvKiAhbm90eWV0ICovCiAjZGVmaW5lCUVYVDJfSU5PREVT
 X1BFUl9CTE9DSyhzKQkoKHMpLT5zX2lub2Rlc19wZXJfYmxvY2spCiAvKiBTaG91bGQgYmUgc2l6
 ZW9mKHN0cnVjdCBleHQyX2lub2RlKTogKi8KLSNkZWZpbmUgRVhUMl9JTk9ERV9TSVpFCQkJMTI4
 CisjZGVmaW5lIEVYVDJfSU5PREVfU0laRShzKQkJKChzKS0+c19lcy0+c19pbm9kZV9zaXplKQog
 I2RlZmluZSBFWFQyX0ZJUlNUX0lOTwkJCTExCiAjZW5kaWYgLyogbm90eWV0ICovCiAKZGlmZiAt
 dWQgZXh0MmZzLm9yaWcvZXh0Ml9pbm9kZS5jIGV4dDJmcy9leHQyX2lub2RlLmMKLS0tIGV4dDJm
 cy5vcmlnL2V4dDJfaW5vZGUuYwkyMDA2LTA5LTI2IDA0OjE1OjU4LjAwMDAwMDAwMCArMDAwMAor
 KysgZXh0MmZzL2V4dDJfaW5vZGUuYwkyMDA4LTA5LTAzIDEzOjU0OjQ5LjAwMDAwMDAwMCArMDAw
 MApAQCAtOTEsNyArOTEsNyBAQAogCQlyZXR1cm4gKGVycm9yKTsKIAl9CiAJZXh0Ml9pMmVpKGlw
 LCAoc3RydWN0IGV4dDJfaW5vZGUgKikoKGNoYXIgKilicC0+Yl9kYXRhICsKLQkgICAgRVhUMl9J
 Tk9ERV9TSVpFICogaW5vX3RvX2ZzYm8oZnMsIGlwLT5pX251bWJlcikpKTsKKwkgICAgRVhUMl9J
 Tk9ERV9TSVpFKGZzKSAqIGlub190b19mc2JvKGZzLCBpcC0+aV9udW1iZXIpKSk7CiAJaWYgKHdh
 aXRmb3IgJiYgKHZwLT52X21vdW50LT5tbnRfa2Vybl9mbGFnICYgTU5US19BU1lOQykgPT0gMCkK
 IAkJcmV0dXJuIChid3JpdGUoYnApKTsKIAllbHNlIHsKZGlmZiAtdWQgZXh0MmZzLm9yaWcvZXh0
 Ml92ZnNvcHMuYyBleHQyZnMvZXh0Ml92ZnNvcHMuYwotLS0gZXh0MmZzLm9yaWcvZXh0Ml92ZnNv
 cHMuYwkyMDA4LTA0LTAzIDE4OjUxOjEzLjAwMDAwMDAwMCArMDAwMAorKysgZXh0MmZzL2V4dDJf
 dmZzb3BzLmMJMjAwOC0wOS0wMyAxMzo1NTozNy4wMDAwMDAwMDAgKzAwMDAKQEAgLTQyNCw3ICs0
 MjQsNyBAQAogICAgIFYoc19mcmFnc19wZXJfZ3JvdXApCiAgICAgZnMtPnNfaW5vZGVzX3Blcl9n
 cm91cCA9IGVzLT5zX2lub2Rlc19wZXJfZ3JvdXA7CiAgICAgVihzX2lub2Rlc19wZXJfZ3JvdXAp
 Ci0gICAgZnMtPnNfaW5vZGVzX3Blcl9ibG9jayA9IGZzLT5zX2Jsb2Nrc2l6ZSAvIEVYVDJfSU5P
 REVfU0laRTsKKyAgICBmcy0+c19pbm9kZXNfcGVyX2Jsb2NrID0gZnMtPnNfYmxvY2tzaXplIC8g
 RVhUMl9JTk9ERV9TSVpFKGZzKTsKICAgICBWKHNfaW5vZGVzX3Blcl9ibG9jaykKICAgICBmcy0+
 c19pdGJfcGVyX2dyb3VwID0gZnMtPnNfaW5vZGVzX3Blcl9ncm91cCAvZnMtPnNfaW5vZGVzX3Bl
 cl9ibG9jazsKICAgICBWKHNfaXRiX3Blcl9ncm91cCkKQEAgLTU3OCw3ICs1NzgsNyBAQAogCQkJ
 cmV0dXJuIChlcnJvcik7CiAJCX0KIAkJZXh0Ml9laTJpKChzdHJ1Y3QgZXh0Ml9pbm9kZSAqKSAo
 KGNoYXIgKilicC0+Yl9kYXRhICsKLQkJICAgIEVYVDJfSU5PREVfU0laRSAqIGlub190b19mc2Jv
 KGZzLCBpcC0+aV9udW1iZXIpKSwgaXApOworCQkgICAgRVhUMl9JTk9ERV9TSVpFKGZzKSAqIGlu
 b190b19mc2JvKGZzLCBpcC0+aV9udW1iZXIpKSwgaXApOwogCQlicmVsc2UoYnApOwogCQlWT1Bf
 VU5MT0NLKHZwLCAwLCB0ZCk7CiAJCXZyZWxlKHZwKTsKQEAgLTEwMTMsNyArMTAxMyw3IEBACiAJ
 CXJldHVybiAoZXJyb3IpOwogCX0KIAkvKiBjb252ZXJ0IGV4dDIgaW5vZGUgdG8gZGlub2RlICov
 Ci0JZXh0Ml9laTJpKChzdHJ1Y3QgZXh0Ml9pbm9kZSAqKSAoKGNoYXIgKilicC0+Yl9kYXRhICsg
 RVhUMl9JTk9ERV9TSVpFICoKKwlleHQyX2VpMmkoKHN0cnVjdCBleHQyX2lub2RlICopICgoY2hh
 ciAqKWJwLT5iX2RhdGEgKyBFWFQyX0lOT0RFX1NJWkUoZnMpICoKIAkJCWlub190b19mc2JvKGZz
 LCBpbm8pKSwgaXApOwogCWlwLT5pX2Jsb2NrX2dyb3VwID0gaW5vX3RvX2NnKGZzLCBpbm8pOwog
 CWlwLT5pX25leHRfYWxsb2NfYmxvY2sgPSAwOwo=
 ------=_Part_61122_6937983.1220548615546--

From owner-freebsd-fs@FreeBSD.ORG  Thu Sep  4 17:50:05 2008
Return-Path: <owner-freebsd-fs@FreeBSD.ORG>
Delivered-To: freebsd-fs@hub.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C11E7106564A
	for <freebsd-fs@hub.freebsd.org>; Thu,  4 Sep 2008 17:50:05 +0000 (UTC)
	(envelope-from gnats@FreeBSD.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
	[IPv6:2001:4f8:fff6::28])
	by mx1.freebsd.org (Postfix) with ESMTP id 959AF8FC15
	for <freebsd-fs@hub.freebsd.org>; Thu,  4 Sep 2008 17:50:05 +0000 (UTC)
	(envelope-from gnats@FreeBSD.org)
Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1])
	by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m84Ho53H034360
	for <freebsd-fs@freefall.freebsd.org>; Thu, 4 Sep 2008 17:50:05 GMT
	(envelope-from gnats@freefall.freebsd.org)
Received: (from gnats@localhost)
	by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m84Ho5Af034359;
	Thu, 4 Sep 2008 17:50:05 GMT (envelope-from gnats)
Date: Thu, 4 Sep 2008 17:50:05 GMT
Message-Id: <200809041750.m84Ho5Af034359@freefall.freebsd.org>
To: freebsd-fs@FreeBSD.org
From: "Josh Carroll" <josh.carroll@gmail.com>
Cc: 
Subject: Re: kern/124621: [ext3] Cannot mount ext2fs partition
X-BeenThere: freebsd-fs@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: Josh Carroll <josh.carroll@gmail.com>
List-Id: Filesystems <freebsd-fs.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs>
List-Post: <mailto:freebsd-fs@freebsd.org>
List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 04 Sep 2008 17:50:05 -0000

The following reply was made to PR kern/124621; it has been noted by GNATS.

From: "Josh Carroll" <josh.carroll@gmail.com>
To: bug-followup@FreeBSD.org, paulf@free.fr
Cc:  
Subject: Re: kern/124621: [ext3] Cannot mount ext2fs partition
Date: Thu, 4 Sep 2008 13:42:36 -0400

 Sigh. Apologies again.
 
 Let's try it this way. Here is the patch:
 
 http://pflog.net/~floyd/ext2fs.diff
 
 Thanks,
 Josh

From owner-freebsd-fs@FreeBSD.ORG  Thu Sep  4 17:50:07 2008
Return-Path: <owner-freebsd-fs@FreeBSD.ORG>
Delivered-To: freebsd-fs@hub.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F0DFE1065671
	for <freebsd-fs@hub.freebsd.org>; Thu,  4 Sep 2008 17:50:07 +0000 (UTC)
	(envelope-from gnats@FreeBSD.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
	[IPv6:2001:4f8:fff6::28])
	by mx1.freebsd.org (Postfix) with ESMTP id DF0638FC1D
	for <freebsd-fs@hub.freebsd.org>; Thu,  4 Sep 2008 17:50:07 +0000 (UTC)
	(envelope-from gnats@FreeBSD.org)
Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1])
	by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m84Ho7E9034376
	for <freebsd-fs@freefall.freebsd.org>; Thu, 4 Sep 2008 17:50:07 GMT
	(envelope-from gnats@freefall.freebsd.org)
Received: (from gnats@localhost)
	by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m84Ho74B034375;
	Thu, 4 Sep 2008 17:50:07 GMT (envelope-from gnats)
Date: Thu, 4 Sep 2008 17:50:07 GMT
Message-Id: <200809041750.m84Ho74B034375@freefall.freebsd.org>
To: freebsd-fs@FreeBSD.org
From: Wesley Shields <wxs@FreeBSD.org>
Cc: 
Subject: Re: kern/124621: [ext3] Cannot mount ext2fs partition
X-BeenThere: freebsd-fs@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: Wesley Shields <wxs@FreeBSD.org>
List-Id: Filesystems <freebsd-fs.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs>
List-Post: <mailto:freebsd-fs@freebsd.org>
List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
	<mailto:freebsd-fs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 04 Sep 2008 17:50:08 -0000

The following reply was made to PR kern/124621; it has been noted by GNATS.

From: Wesley Shields <wxs@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc: josh.carroll@gmail.com
Subject: Re: kern/124621: [ext3] Cannot mount ext2fs partition
Date: Thu, 4 Sep 2008 13:50:07 -0400

 From reading of the release notes it looks like this change was made in
 January 2008.
 
 http://e2fsprogs.sourceforge.net/e2fsprogs-release.html#1.40.10
 
 I tested the patch that is online from Josh and it works.  Is anyone
 willing to step up and commit this?  Seems like a simple enough fix and
 will start to hit more and more people as updated versions of e2fsprogs
 becomes more common.
 
 Thanks, Josh, for providing a fix for this.
 
 -- WXS