From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 13 23:57:30 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7646F106566C for ; Sat, 13 Sep 2008 23:57:30 +0000 (UTC) (envelope-from jamesfrancistoy@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.158]) by mx1.freebsd.org (Postfix) with ESMTP id 083988FC14 for ; Sat, 13 Sep 2008 23:57:29 +0000 (UTC) (envelope-from jamesfrancistoy@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so893181fgb.35 for ; Sat, 13 Sep 2008 16:57:28 -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:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=RHZonfRNNs//S0bN43phklkACRsIddxX4oaipi9nds4=; b=Q2VrjV4MYoSZdnA5da0yA9X2qhgLH6/PbGulcnOVVerJLuJEJlFHtiHPXLcriHe0Ed YdvFQJ4CF1Y1GdyWq2pZRNVUDT1sOhWhjpB2y+oZzwigyXzkgnzVEZMpPxAd5+y+Yiab uduCM7F60NGv1AQELm7YblmyhZk497P14DUlQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=G9t7NFyKCv6vQBdABRHn9fH5vqWVSvcgrpYDKkTTE5g7JTgokdTUIHu/WtHBb+yFv5 RQtnUgeLVdVIkFpvSZ7/Zz0oB38prORA+G6SwC9heM7x3aLlA/xage8Pw6p7X9fjAjl3 8s669UYZ8eCt1aZlfgm2RjtvWBQeMDo0RgQzI= Received: by 10.187.191.19 with SMTP id t19mr784460fap.87.1221350248345; Sat, 13 Sep 2008 16:57:28 -0700 (PDT) Received: by 10.187.218.13 with HTTP; Sat, 13 Sep 2008 16:57:28 -0700 (PDT) Message-ID: <9f8af95f0809131657q6c3e2339uebc2a9a4b2e2f5de@mail.gmail.com> Date: Sat, 13 Sep 2008 19:57:28 -0400 From: jT Sender: jamesfrancistoy@gmail.com To: "Wesley Shields" In-Reply-To: <20080909131442.GL62357@atarininja.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <9f8af95f0809061626q22bc8f60i48fd95b32cef3d04@mail.gmail.com> <20080907150747.GB62357@atarininja.org> <20080909115351.GJ39652@deviant.kiev.zoral.com.ua> <20080909122917.GK62357@atarininja.org> <20080909123746.GK39652@deviant.kiev.zoral.com.ua> <20080909131442.GL62357@atarininja.org> X-Google-Sender-Auth: 3f42593129251624 Cc: Kostik Belousov , freebsd-hackers Subject: Re: 256-byte inode support X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2008 23:57:30 -0000 Kostik, Wesley, I've been using this patch since Wesley made me aware of it -- it has been 100% fine for me atm -- there are a few small modifications to it and it applies cleanly to -CURRENT -- a bunch of my friends who run all linux boxen (and i'm changing their minds about that slowly but surely) use it and I have also _not_ heard a peep from them about any failures / weirdness -- and most of their data exists on ext2fs :) -- so thats a good sign -- i've attached the updated patch --- ./ext2_fs.h.orig 2008-09-13 23:25:32.000000000 +0100 +++ ./ext2_fs.h 2008-09-13 23:25:45.000000000 +0100 @@ -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 */ --- ./ext2_inode.c.orig 2008-09-13 23:25:53.000000000 +0100 +++ ./ext2_inode.c 2008-09-13 23:26:06.000000000 +0100 @@ -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 { --- ./ext2_vfsops.c.orig 2008-09-13 23:26:13.000000000 +0100 +++ ./ext2_vfsops.c 2008-09-13 23:26:55.000000000 +0100 @@ -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); 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; /jT http://git.zen-sources.org/?p=kernel/zenmm.git;a=summary On Tue, Sep 9, 2008 at 9:14 AM, Wesley Shields wrote: > On Tue, Sep 09, 2008 at 03:37:47PM +0300, Kostik Belousov wrote: >> On Tue, Sep 09, 2008 at 08:29:17AM -0400, Wesley Shields wrote: >> > On Tue, Sep 09, 2008 at 02:53:51PM +0300, Kostik Belousov wrote: >> > > On Sun, Sep 07, 2008 at 11:07:47AM -0400, Wesley Shields wrote: >> > > > On Sat, Sep 06, 2008 at 07:26:27PM -0400, jT wrote: >> > > > > hackers, >> > > > > >> > > > > since tytso had updated ext3 -- i've noticed that i can't use my >> > > > > 265-byte inode ext3 drives -- is there any effort to update it? If >> > > > > not -- if you know where i should attempt to start please let me know >> > > > > so i can start working on support (i have a few other people i know >> > > > > interested in this) -- thanks and hope everyone is well >> > > > >> > > > There was a PR submitted for it and eventually a patch added to the PR. >> > > > I've tested the patch given in the URL at the port and it works. We >> > > > will start to see more of this as the newer version becomes more common >> > > > in the wild. >> > > > >> > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/124621 >> > > > >> > > > Would be nice to see this fixed in 7.1 but it may be too late for that. >> > > >> > > What was the reason for increasing inode size ? I think it is rather >> > > pointless to increase the size without using newly added space for some >> > > data. Is inode format the same for the first 128 bytes, and does data >> > > at the second 128 bytes should be used to correctly interpret inode ? >> > >> > I honestly don't know the answer. Though I do agree that it is >> > pointless to increase the size without using the new space. >> > >> > All I know is that I was unable to read an ext filesystem made with -I >> > 256 (which is the default when using the most recent >> > sysutils/e2fsprogs). >> >> I think it is too dangerous for the user data to commit this patch, >> without investigating this first. > > I think that's a fair assessment to make. The patch is certainly simple > enough but I'm not familiar with what it's doing to make an accurate > assessment. I know it worked for the simple test case I provided in my > previous message. If I can be of any further assistance please let me > know. > > -- WXS >