]> sourceware.org Git - lvm2.git/commitdiff
hints: keep strings aligned in structure
authorZdenek Kabelac <zkabelac@redhat.com>
Sun, 7 Mar 2021 15:28:59 +0000 (16:28 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 8 Mar 2021 14:33:15 +0000 (15:33 +0100)
Preffer aligned string access.

lib/label/hints.h

index 51143343dbd60b41e6a6fef2ee79bba8af008cb7..e8cfd6a7e93551681f5b532b74ed7e4778b6df72 100644 (file)
 
 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 */
 };
 
This page took 0.033198 seconds and 5 git commands to generate.