В Wed, 13 May 2015 09:32:47 +0200 Jan Kara <j...@suse.cz> пишет:
> Add helpers to return size of XFS inode on disk and when loaded in > memory. > > Signed-off-by: Jan Kara <j...@suse.cz> > --- > 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. Thank you! _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel