All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: Jan Kara <jack@suse.cz>
Cc: grub-devel@gnu.org
Subject: Re: [PATCH 1/2] xfs: Add helpers for inode size
Date: Sat, 30 May 2015 10:00:40 +0300	[thread overview]
Message-ID: <20150530100040.782d9f2b@opensuse.site> (raw)
In-Reply-To: <1431502368-29422-2-git-send-email-jack@suse.cz>

В Wed, 13 May 2015 09:32:47 +0200
Jan Kara <jack@suse.cz> пишет:

> Add helpers to return size of XFS inode on disk and when loaded in
> memory.
> 
> Signed-off-by: Jan Kara <jack@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!


  reply	other threads:[~2015-05-30  7:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-13  7:32 [PATCH 0/2 v2] Support for XFS v5 filesystem Jan Kara
2015-05-13  7:32 ` [PATCH 1/2] xfs: Add helpers for inode size Jan Kara
2015-05-30  7:00   ` Andrei Borzenkov [this message]
2015-06-01 12:22     ` Jan Kara
2015-05-13  7:32 ` [PATCH 2/2] xfs: V5 filesystem format support Jan Kara
2015-05-30  6:59   ` Andrei Borzenkov
2015-06-01 12:20     ` Jan Kara
  -- strict thread matches above, loose matches on Subject: below --
2015-06-01 12:28 [PATCH 0/2 v3] Support for XFS v5 filesystem Jan Kara
2015-06-01 12:28 ` [PATCH 1/2] xfs: Add helpers for inode size Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150530100040.782d9f2b@opensuse.site \
    --to=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.org \
    --cc=jack@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.