grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/2] xfs: Add helpers for inode size


From: Jan Kara
Subject: Re: [PATCH 1/2] xfs: Add helpers for inode size
Date: Mon, 1 Jun 2015 14:22:45 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Sat 30-05-15 10:00:40, Andrei Borzenkov wrote:
> В Wed, 13 May 2015 09:32:47 +0200
> Jan Kara <address@hidden> пишет:
> 
> > Add helpers to return size of XFS inode on disk and when loaded in
> > memory.
> > 
> > Signed-off-by: Jan Kara <address@hidden>
> > ---
> >  grub-core/fs/xfs.c | 35 ++++++++++++++++++++++++-----------
> >  1 file changed, 24 insertions(+), 11 deletions(-)
> > 
> > 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 *data,
> >       data->sblock.log2_inode);
> >  }
> >  
> > +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 struct
> > + * grub_fshelp_node there but on disk inode size may be actually larger 
> > than
> > + * struct grub_xfs_inode so we need to account for that so that we can read
> > + * from disk directly into in-memory structure.
> > + */
> > +static inline grub_size_t
> > +grub_inmem_xfs_inode_size(struct grub_xfs_data *data)
> 
> Could we make it grub_xfs_fshelp_size? That is what it really does.
  Sure. Done.

                                                                Honza
-- 
Jan Kara <address@hidden>
SUSE Labs, CR



reply via email to

[Prev in Thread] Current Thread [Next in Thread]