Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id g0TL16g25607 for linux-xfs-outgoing; Tue, 29 Jan 2002 13:01:06 -0800 Received: from moutng1.schlund.de (moutng1.kundenserver.de [212.227.126.171]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id g0TL0md25580 for ; Tue, 29 Jan 2002 13:00:48 -0800 Received: from [195.20.224.220] (helo=mrvdom04.kundenserver.de) by moutng1.schlund.de with esmtp (Exim 3.22 #2) id 16VeQr-00085F-00; Tue, 29 Jan 2002 21:00:41 +0100 Received: from [80.129.49.43] (helo=kernelpanix.aura.of.mankind) by mrvdom04.kundenserver.de with esmtp (Exim 2.12 #2) id 16VeQq-0007NU-00; Tue, 29 Jan 2002 21:00:41 +0100 Received: (from utz@localhost) by kernelpanix.aura.of.mankind (8.11.2/8.11.2) id g0TJurE13563; Tue, 29 Jan 2002 20:56:53 +0100 X-Authentication-Warning: kernelpanix.aura.of.mankind: utz set sender to xfs@s2y4n2c.de using -f Date: Tue, 29 Jan 2002 20:56:53 +0100 From: utz lehmann To: Andi Kleen Cc: linux-xfs@oss.sgi.com Subject: Re: [PATCH] Re: Reduce XFS footprint (was Re: TAKE - remove a function xfs added to filemap.c Message-ID: <20020129205653.A13502@s2y4n2c.de> References: <200201291751.g0THp897004750@scare.vieo.com> <20020129194001.A16401@wotan.suse.de> <20020129202509.A31370@wotan.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020129202509.A31370@wotan.suse.de> Sender: owner-linux-xfs@oss.sgi.com Precedence: bulk Status: O Content-Length: 4680 Lines: 145 Hi I have a few questions. Is xfs using less 64bit arithmetics when compiled without XFS_BIG_FILESYSTEMS and/or XFS_BIG_FILES? I think this will save some cpu cyles on x86. What happends with old files larger than 2GB, when a kernel without XFS_BIG_FILES is used? utz Andi Kleen [ak@suse.de] wrote: > On Tue, Jan 29, 2002 at 07:40:01PM +0100, Andi Kleen wrote: > > This patch does it. It's very simple and clean. > > Saves another 18K on a xfs with BIG_FILESYSTEMS and BIG_FILES disabled. > > Oops. The patch had a silly mistake. The dep_mbools were missing the third > parameter. It wasn't noticed by make oldconfig, but the more advanced > configurators notice. > > Here is an update. Should probably also write some help text. > > -Andi > > --- linux/fs/xfs/xfs_types.h-V1 Wed Aug 8 16:08:34 2001 > +++ linux/fs/xfs/xfs_types.h Tue Jan 29 18:57:17 2002 > @@ -43,8 +43,17 @@ > * defs files for the normal case. > */ > > +#ifdef CONFIG_XFS_BIG_FILES > #define XFS_BIG_FILES 1 > +#else > +#define XFS_BIG_FILES 0 > +#endif > + > +#ifdef CONFIG_XFS_BIG_FILESYSTEMS > #define XFS_BIG_FILESYSTEMS 1 > +#else > +#define XFS_BIG_FILESYSTEMS 0 > +#endif > > typedef __uint32_t xfs_agblock_t; /* blockno in alloc. group */ > typedef __uint32_t xfs_extlen_t; /* extent length in blocks */ > --- linux/fs/xfs/xfsidbg.c-V1 Sun Jan 27 15:42:22 2002 > +++ linux/fs/xfs/xfsidbg.c Tue Jan 29 19:23:47 2002 > @@ -2475,7 +2475,7 @@ > #else > kdb_printf(" blk %d bp 0x%p blkno 0x%Lx", > #endif > - i, p->blk[i].bp, p->blk[i].blkno); > + i, p->blk[i].bp, (unsigned long long)p->blk[i].blkno); > kdb_printf(" index %d hashval 0x%x ", > p->blk[i].index, (uint_t)p->blk[i].hashval); > switch(p->blk[i].magic) { > @@ -2579,7 +2579,7 @@ > if (bno == NULLFSBLOCK) > sprintf(rval, "NULLFSBLOCK"); > else if (ISNULLSTARTBLOCK(bno)) > - sprintf(rval, "NULLSTARTBLOCK(%Ld)", STARTBLOCKVAL(bno)); > + sprintf(rval, "NULLSTARTBLOCK(%Ld)", (unsigned long long)STARTBLOCKVAL(bno)); > else if (mp) > sprintf(rval, "%Ld[%x:%x]", (xfs_dfsbno_t)bno, > XFS_FSB_TO_AGNO(mp, bno), XFS_FSB_TO_AGBNO(mp, bno)); > @@ -3545,7 +3545,7 @@ > #if XFS_BIG_FILES > kdb_printf(" bp 0x%p blkno 0x%x ", eblk->bp, eblk->blkno); > #else > - kdb_printf(" bp 0x%x blkno 0x%x ", eblk->bp, eblk->blkno); > + kdb_printf(" bp 0x%p blkno 0x%x ", eblk->bp, eblk->blkno); > #endif > kdb_printf("index %d hashval 0x%x\n", eblk->index, (uint_t)eblk->hashval); > } > --- linux/fs/xfs/xfs_mount.c-V1 Sun Jan 27 15:42:22 2002 > +++ linux/fs/xfs/xfs_mount.c Tue Jan 29 18:46:06 2002 > @@ -846,10 +846,18 @@ > /* > * Select the right directory manager. > */ > - mp->m_dirops = > - XFS_SB_VERSION_HASDIRV2(&mp->m_sb) ? > - xfsv2_dirops : > - xfsv1_dirops; > + > + if (!XFS_SB_VERSION_HASDIRV2(&mp->m_sb)) { > +#ifdef CONFIG_XFS_V1_DIR > + mp->m_dirops = xfsv1_dirops; > +#else > + cmn_err(CE_WARN, "XFS: v1 directories not compiled in"); > + goto error1; > +#endif > + } else { > + mp->m_dirops = xfsv2_dirops; > + } > + > > /* > * Initialize directory manager's entries. > --- linux/fs/xfs/Makefile-V1 Tue Jan 29 18:47:03 2002 > +++ linux/fs/xfs/Makefile Tue Jan 29 19:33:41 2002 > @@ -73,6 +73,10 @@ > obj-y += xfs_grio.o > endif > > +ifneq ($(CONFIG_XFS_V1_DIR),) > + obj-y += xfs_dir.o xfs_dir_leaf.o > +endif > + > ifeq ($(CONFIG_HAVE_XFS_DMAPI),) > obj-y += xfsdmapistubs.o > else > @@ -100,7 +104,6 @@ > xfs_btree.o \ > xfs_buf_item.o \ > xfs_da_btree.o \ > - xfs_dir.o \ > xfs_dir2.o \ > xfs_dir2_block.o \ > xfs_dir2_data.o \ > @@ -108,7 +111,6 @@ > xfs_dir2_node.o \ > xfs_dir2_sf.o \ > xfs_dir2_trace.o \ > - xfs_dir_leaf.o \ > xfs_error.o \ > xfs_extfree_item.o \ > xfs_fsops.o \ > --- linux/fs/Config.in-V1 Sun Jan 27 15:42:16 2002 > +++ linux/fs/Config.in Tue Jan 29 20:22:16 2002 > @@ -89,7 +89,10 @@ > > tristate 'SGI XFS filesystem support' CONFIG_XFS_FS > dep_mbool ' Enable XFS Realtime support' CONFIG_XFS_RT $CONFIG_XFS_FS > -dep_mbool ' Enable XFS Quota' CONFIG_XFS_QUOTA $CONFIG_XFS_FS > +dep_mbool ' Enable XFS Quota' CONFIG_XFS_QUOTA $CONFIG_XFS_FS > +dep_mbool ' Enable XFSv1 directories' CONFIG_XFS_V1_DIR $CONFIG_XFS_FS > +dep_mbool ' Enable XFS filesystems greater than 2TB' CONFIG_XFS_BIG_FILESYSTEMS $CONFIG_XFS_FS > +dep_mbool ' Enable XFS files greater than 2GB' CONFIG_XFS_BIG_FILES $CONFIG_XFS_FS > if [ "$CONFIG_XFS_FS" != "n" ]; then > define_bool CONFIG_HAVE_ATTRCTL y > dep_tristate ' Enable XFS DMAPI' CONFIG_XFS_DMAPI $CONFIG_XFS_FS