All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - hints: keep strings aligned in structure
Date: Mon,  8 Mar 2021 14:46:52 +0000 (GMT)	[thread overview]
Message-ID: <20210308144652.3BDCC3952537@sourceware.org> (raw)

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=ca12dae32b03c54509608621b9268853b030fd40
Commit:        ca12dae32b03c54509608621b9268853b030fd40
Parent:        ff21723512cb633c741e516381899f70e0d9ef2a
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Sun Mar 7 16:28:59 2021 +0100
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Mon Mar 8 15:33:15 2021 +0100

hints: keep strings aligned in structure

Preffer aligned string access.
---
 lib/label/hints.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/label/hints.h b/lib/label/hints.h
index 51143343d..e8cfd6a7e 100644
--- a/lib/label/hints.h
+++ b/lib/label/hints.h
@@ -17,10 +17,10 @@
 
 struct hint {
 	struct dm_list list;
-	char name[PATH_MAX];
-	char pvid[ID_LEN + 1];
-	char vgname[NAME_LEN];
 	dev_t devt;
+	char name[PATH_MAX]   __attribute__((aligned(8)));
+	char vgname[NAME_LEN] __attribute__((aligned(8)));
+	char pvid[ID_LEN + 1] __attribute__((aligned(8)));
 	unsigned chosen:1; /* this hint's dev was chosen for scanning */
 };
 



                 reply	other threads:[~2021-03-08 14:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20210308144652.3BDCC3952537@sourceware.org \
    --to=zkabelac@sourceware.org \
    --cc=lvm-devel@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 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.