Received: from list by lists.gnu.org with archive (Exim 4.71) id 1YzOk4-0005tk-NX for mharc-grub-devel@gnu.org; Mon, 01 Jun 2015 08:22:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzOk0-0005m0-O5 for grub-devel@gnu.org; Mon, 01 Jun 2015 08:22:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzOju-0007MH-Re for grub-devel@gnu.org; Mon, 01 Jun 2015 08:22:52 -0400 Received: from cantor2.suse.de ([195.135.220.15]:48824 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzOju-0007Lw-LD for grub-devel@gnu.org; Mon, 01 Jun 2015 08:22:46 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 2F563AC8D; Mon, 1 Jun 2015 12:22:46 +0000 (UTC) Received: by quack.suse.cz (Postfix, from userid 1000) id 9B8ED8281E; Mon, 1 Jun 2015 14:22:45 +0200 (CEST) Date: Mon, 1 Jun 2015 14:22:45 +0200 From: Jan Kara To: Andrei Borzenkov Subject: Re: [PATCH 1/2] xfs: Add helpers for inode size Message-ID: <20150601122245.GB20288@quack.suse.cz> References: <1431502368-29422-1-git-send-email-jack@suse.cz> <1431502368-29422-2-git-send-email-jack@suse.cz> <20150530100040.782d9f2b@opensuse.site> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150530100040.782d9f2b@opensuse.site> User-Agent: Mutt/1.5.21 (2010-09-15) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 195.135.220.15 Cc: grub-devel@gnu.org, Jan Kara X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2015 12:22:53 -0000 On Sat 30-05-15 10:00:40, Andrei Borzenkov wrote: > =D0=92 Wed, 13 May 2015 09:32:47 +0200 > Jan Kara =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >=20 > > Add helpers to return size of XFS inode on disk and when loaded in > > memory. > >=20 > > Signed-off-by: Jan Kara > > --- > > grub-core/fs/xfs.c | 35 ++++++++++++++++++++++++----------- > > 1 file changed, 24 insertions(+), 11 deletions(-) > >=20 > > diff --git a/grub-core/fs/xfs.c b/grub-core/fs/xfs.c > > index 0d704e9a4d4b..61b4125ef074 100644 > > --- a/grub-core/fs/xfs.c > > +++ b/grub-core/fs/xfs.c > > @@ -255,6 +255,24 @@ grub_xfs_inode_offset (struct grub_xfs_data *dat= a, > > data->sblock.log2_inode); > > } > > =20 > > +static inline grub_size_t > > +grub_xfs_inode_size(struct grub_xfs_data *data) > > +{ > > + return 1 << data->sblock.log2_inode; > > +} > > + > > +/* > > + * Returns size occupied by XFS inode stored in memory - we store st= ruct > > + * grub_fshelp_node there but on disk inode size may be actually lar= ger than > > + * struct grub_xfs_inode so we need to account for that so that we c= an read > > + * from disk directly into in-memory structure. > > + */ > > +static inline grub_size_t > > +grub_inmem_xfs_inode_size(struct grub_xfs_data *data) >=20 > Could we make it grub_xfs_fshelp_size? That is what it really does. Sure. Done. Honza --=20 Jan Kara SUSE Labs, CR