From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] libgfs2: Import gfs2_ondisk.h
Date: Tue, 9 Apr 2019 14:14:46 +0100 [thread overview]
Message-ID: <40c05b9f-c37c-b3a2-5187-465d9a064d70@redhat.com> (raw)
In-Reply-To: <bffe7a10-c0ce-dfc7-96c5-09a716033263@redhat.com>
On 09/04/2019 14:03, Steven Whitehouse wrote:
> On 09/04/2019 13:48, Andrew Price wrote:
>> On 09/04/2019 13:21, Steven Whitehouse wrote:
>>> Those conversion functions are not sensible, thats why we got rid of
>>> them from the kernel code.
>>
>> Is it the functions that aren't sensible or the use of the
>> gfs2_ondisk.h structs as the containers for the native endian data?
>> I'm not sure I get why the kernel functions like gfs2_dinode_in() are
>> considered sensible and gfs2-utils' gfs2_dinode_in(), which does a
>> similar thing but with a different struct, isn't sensible.
>>
> Well in general we don't want to convert lots of fields in what is
> basically a copy. The inode, when it is read in is an exception to that
> mainly because we have to in order to make sure that the vfs level data
> is all up to date. Keeping the structs as containers is useful, so yes
> we want to retain that. In many cases though we only need a few fields
> from what can be quite large data structures, so in those cases we
> should read/update the fields that we care about for that particular
> operation, rather than converting the whole data structure each time. We
> got a fair speed up when we made that change in the kernel.
>
> So generally I'd like to discourage the blanket conversion functions,
> though it is likely we'll need to retain a few of them, in favour of
> converting just the required fields at the point of use. This should be
> safe to do given that we have the ability to do compile time type
> checking - and lets try and include that in the tests that are always
> run before check in, to make sure that we don't land up with any
> mistakes. That would be a good addition to the tests I think,
Ah ok, that makes sense to me, thanks for explaining. I'm sure we could
speed up bits of gfs2-utils by taking that approach too.
Andy
prev parent reply other threads:[~2019-04-09 13:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-09 9:41 [Cluster-devel] [PATCH] libgfs2: Import gfs2_ondisk.h Andrew Price
2019-04-09 12:03 ` Christoph Hellwig
2019-04-09 12:18 ` Andrew Price
2019-04-09 12:21 ` Steven Whitehouse
2019-04-09 12:35 ` Christoph Hellwig
2019-11-08 9:50 ` Andrew Price
2019-04-09 12:48 ` Andrew Price
2019-04-09 13:03 ` Steven Whitehouse
2019-04-09 13:14 ` Andrew Price [this message]
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=40c05b9f-c37c-b3a2-5187-465d9a064d70@redhat.com \
--to=anprice@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).