All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: lustre: fix structure size for ARM OABI
@ 2017-08-16 14:44 ` Cihangir Akturk
  0 siblings, 0 replies; 10+ messages in thread
From: Cihangir Akturk @ 2017-08-16 14:44 UTC (permalink / raw)
  To: lustre-devel
  Cc: oleg.drokin, andreas.dilger, jsimmons, gregkh, devel,
	linux-kernel, Cihangir Akturk

When building the kernel for the ARM architecture without setting
CONFIG_AEABI, size of struct lov_user_md_v3 and struct lov_mds_md_v3
differs, due to different alignment requirements of OABI and EABI.

Marking the anonymous union within struct lov_user_md_v3 as
'_packed' solves this issue. Otherwise we get the following
error:

drivers/staging/lustre/lustre/lov/lov_pack.c:352:2: note: in expansion
of macro ‘BUILD_BUG_ON’
  BUILD_BUG_ON(sizeof(lum) != sizeof(struct lov_mds_md_v3));

Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
---
 drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
index edff8dc..4f72cb6 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
@@ -388,7 +388,7 @@ struct lov_user_md_v3 {	   /* LOV EA user data (host-endian) */
 		__u16 lmm_layout_gen;     /* layout generation number
 					   * used when reading
 					   */
-	};
+	} __packed;
 	char  lmm_pool_name[LOV_MAXPOOLNAME + 1];   /* pool name */
 	struct lov_user_ost_data_v1 lmm_objects[0]; /* per-stripe data */
 } __packed;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [lustre-devel] [PATCH] staging: lustre: fix structure size for ARM OABI
@ 2017-08-16 14:44 ` Cihangir Akturk
  0 siblings, 0 replies; 10+ messages in thread
From: Cihangir Akturk @ 2017-08-16 14:44 UTC (permalink / raw)
  To: lustre-devel
  Cc: oleg.drokin, andreas.dilger, jsimmons, gregkh, devel,
	linux-kernel, Cihangir Akturk

When building the kernel for the ARM architecture without setting
CONFIG_AEABI, size of struct lov_user_md_v3 and struct lov_mds_md_v3
differs, due to different alignment requirements of OABI and EABI.

Marking the anonymous union within struct lov_user_md_v3 as
'_packed' solves this issue. Otherwise we get the following
error:

drivers/staging/lustre/lustre/lov/lov_pack.c:352:2: note: in expansion
of macro ?BUILD_BUG_ON?
  BUILD_BUG_ON(sizeof(lum) != sizeof(struct lov_mds_md_v3));

Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
---
 drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
index edff8dc..4f72cb6 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
@@ -388,7 +388,7 @@ struct lov_user_md_v3 {	   /* LOV EA user data (host-endian) */
 		__u16 lmm_layout_gen;     /* layout generation number
 					   * used when reading
 					   */
-	};
+	} __packed;
 	char  lmm_pool_name[LOV_MAXPOOLNAME + 1];   /* pool name */
 	struct lov_user_ost_data_v1 lmm_objects[0]; /* per-stripe data */
 } __packed;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] staging: lustre: fix structure size for ARM OABI
  2017-08-16 14:44 ` [lustre-devel] " Cihangir Akturk
@ 2017-08-17 16:26   ` Greg KH
  -1 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2017-08-17 16:26 UTC (permalink / raw)
  To: Cihangir Akturk
  Cc: lustre-devel, devel, linux-kernel, oleg.drokin, andreas.dilger

On Wed, Aug 16, 2017 at 05:44:15PM +0300, Cihangir Akturk wrote:
> When building the kernel for the ARM architecture without setting
> CONFIG_AEABI, size of struct lov_user_md_v3 and struct lov_mds_md_v3
> differs, due to different alignment requirements of OABI and EABI.
> 
> Marking the anonymous union within struct lov_user_md_v3 as
> '_packed' solves this issue. Otherwise we get the following
> error:
> 
> drivers/staging/lustre/lustre/lov/lov_pack.c:352:2: note: in expansion
> of macro ‘BUILD_BUG_ON’
>   BUILD_BUG_ON(sizeof(lum) != sizeof(struct lov_mds_md_v3));
> 
> Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
> ---
>  drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

This file is no longer in the tree :(

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [lustre-devel] [PATCH] staging: lustre: fix structure size for ARM OABI
@ 2017-08-17 16:26   ` Greg KH
  0 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2017-08-17 16:26 UTC (permalink / raw)
  To: Cihangir Akturk
  Cc: lustre-devel, devel, linux-kernel, oleg.drokin, andreas.dilger

On Wed, Aug 16, 2017 at 05:44:15PM +0300, Cihangir Akturk wrote:
> When building the kernel for the ARM architecture without setting
> CONFIG_AEABI, size of struct lov_user_md_v3 and struct lov_mds_md_v3
> differs, due to different alignment requirements of OABI and EABI.
> 
> Marking the anonymous union within struct lov_user_md_v3 as
> '_packed' solves this issue. Otherwise we get the following
> error:
> 
> drivers/staging/lustre/lustre/lov/lov_pack.c:352:2: note: in expansion
> of macro ?BUILD_BUG_ON?
>   BUILD_BUG_ON(sizeof(lum) != sizeof(struct lov_mds_md_v3));
> 
> Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
> ---
>  drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

This file is no longer in the tree :(

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] staging: lustre: fix structure size for ARM OABI
  2017-08-17 16:26   ` [lustre-devel] " Greg KH
@ 2017-08-18 23:57     ` Dilger, Andreas
  -1 siblings, 0 replies; 10+ messages in thread
From: Dilger, Andreas @ 2017-08-18 23:57 UTC (permalink / raw)
  To: Greg KH
  Cc: Cihangir Akturk, Lustre Development List, devel,
	Linux Kernel Mailing List, Drokin, Oleg, James Simmons

On Aug 17, 2017, at 10:26, Greg KH <gregkh@linuxfoundation.org> wrote:
> 
> On Wed, Aug 16, 2017 at 05:44:15PM +0300, Cihangir Akturk wrote:
>> When building the kernel for the ARM architecture without setting
>> CONFIG_AEABI, size of struct lov_user_md_v3 and struct lov_mds_md_v3
>> differs, due to different alignment requirements of OABI and EABI.
>> 
>> Marking the anonymous union within struct lov_user_md_v3 as
>> '_packed' solves this issue. Otherwise we get the following
>> error:
>> 
>> drivers/staging/lustre/lustre/lov/lov_pack.c:352:2: note: in expansion
>> of macro ‘BUILD_BUG_ON’
>>  BUILD_BUG_ON(sizeof(lum) != sizeof(struct lov_mds_md_v3));
>> 
>> Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
>> ---
>> drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> This file is no longer in the tree :(

With James' recent patch series, this has moved to include/uapi/linux/lustre/lustre_user.h

Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel Corporation

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [lustre-devel] [PATCH] staging: lustre: fix structure size for ARM OABI
@ 2017-08-18 23:57     ` Dilger, Andreas
  0 siblings, 0 replies; 10+ messages in thread
From: Dilger, Andreas @ 2017-08-18 23:57 UTC (permalink / raw)
  To: Greg KH
  Cc: Cihangir Akturk, Lustre Development List, devel,
	Linux Kernel Mailing List, Drokin, Oleg, James Simmons

On Aug 17, 2017, at 10:26, Greg KH <gregkh@linuxfoundation.org> wrote:
> 
> On Wed, Aug 16, 2017 at 05:44:15PM +0300, Cihangir Akturk wrote:
>> When building the kernel for the ARM architecture without setting
>> CONFIG_AEABI, size of struct lov_user_md_v3 and struct lov_mds_md_v3
>> differs, due to different alignment requirements of OABI and EABI.
>> 
>> Marking the anonymous union within struct lov_user_md_v3 as
>> '_packed' solves this issue. Otherwise we get the following
>> error:
>> 
>> drivers/staging/lustre/lustre/lov/lov_pack.c:352:2: note: in expansion
>> of macro ?BUILD_BUG_ON?
>>  BUILD_BUG_ON(sizeof(lum) != sizeof(struct lov_mds_md_v3));
>> 
>> Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
>> ---
>> drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> This file is no longer in the tree :(

With James' recent patch series, this has moved to include/uapi/linux/lustre/lustre_user.h

Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel Corporation

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] staging: lustre: fix structure size for ARM OABI
  2017-08-18 23:57     ` [lustre-devel] " Dilger, Andreas
@ 2017-08-20  2:52       ` James Simmons
  -1 siblings, 0 replies; 10+ messages in thread
From: James Simmons @ 2017-08-20  2:52 UTC (permalink / raw)
  To: Dilger, Andreas
  Cc: Greg KH, Cihangir Akturk, Lustre Development List, devel,
	Linux Kernel Mailing List, Drokin, Oleg

[-- Attachment #1: Type: text/plain, Size: 1115 bytes --]


> On Aug 17, 2017, at 10:26, Greg KH <gregkh@linuxfoundation.org> wrote:
> > 
> > On Wed, Aug 16, 2017 at 05:44:15PM +0300, Cihangir Akturk wrote:
> >> When building the kernel for the ARM architecture without setting
> >> CONFIG_AEABI, size of struct lov_user_md_v3 and struct lov_mds_md_v3
> >> differs, due to different alignment requirements of OABI and EABI.

I have to ask are you testing the lustre on ARM?
 
> >> Marking the anonymous union within struct lov_user_md_v3 as
> >> '_packed' solves this issue. Otherwise we get the following
> >> error:
> >> 
> >> drivers/staging/lustre/lustre/lov/lov_pack.c:352:2: note: in expansion
> >> of macro ‘BUILD_BUG_ON’
> >>  BUILD_BUG_ON(sizeof(lum) != sizeof(struct lov_mds_md_v3));
> >> 
> >> Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
> >> ---
> >> drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > This file is no longer in the tree :(
> 
> With James' recent patch series, this has moved to include/uapi/linux/lustre/lustre_user.h

BTW is __packed valid for UAPI headers?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [lustre-devel] [PATCH] staging: lustre: fix structure size for ARM OABI
@ 2017-08-20  2:52       ` James Simmons
  0 siblings, 0 replies; 10+ messages in thread
From: James Simmons @ 2017-08-20  2:52 UTC (permalink / raw)
  To: Dilger, Andreas
  Cc: Greg KH, Cihangir Akturk, Lustre Development List, devel,
	Linux Kernel Mailing List, Drokin, Oleg


> On Aug 17, 2017, at 10:26, Greg KH <gregkh@linuxfoundation.org> wrote:
> > 
> > On Wed, Aug 16, 2017 at 05:44:15PM +0300, Cihangir Akturk wrote:
> >> When building the kernel for the ARM architecture without setting
> >> CONFIG_AEABI, size of struct lov_user_md_v3 and struct lov_mds_md_v3
> >> differs, due to different alignment requirements of OABI and EABI.

I have to ask are you testing the lustre on ARM?
 
> >> Marking the anonymous union within struct lov_user_md_v3 as
> >> '_packed' solves this issue. Otherwise we get the following
> >> error:
> >> 
> >> drivers/staging/lustre/lustre/lov/lov_pack.c:352:2: note: in expansion
> >> of macro ?BUILD_BUG_ON?
> >>  BUILD_BUG_ON(sizeof(lum) != sizeof(struct lov_mds_md_v3));
> >> 
> >> Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
> >> ---
> >> drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > This file is no longer in the tree :(
> 
> With James' recent patch series, this has moved to include/uapi/linux/lustre/lustre_user.h

BTW is __packed valid for UAPI headers?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] staging: lustre: fix structure size for ARM OABI
  2017-08-20  2:52       ` [lustre-devel] " James Simmons
@ 2017-08-21 12:38         ` Cihangir Akturk
  -1 siblings, 0 replies; 10+ messages in thread
From: Cihangir Akturk @ 2017-08-21 12:38 UTC (permalink / raw)
  To: James Simmons
  Cc: Dilger, Andreas, Greg KH, Lustre Development List, devel,
	Linux Kernel Mailing List, Drokin, Oleg

On Sun, Aug 20, 2017 at 03:52:26AM +0100, James Simmons wrote:
> 
> > On Aug 17, 2017, at 10:26, Greg KH <gregkh@linuxfoundation.org> wrote:
> > > 
> > > On Wed, Aug 16, 2017 at 05:44:15PM +0300, Cihangir Akturk wrote:
> > >> When building the kernel for the ARM architecture without setting
> > >> CONFIG_AEABI, size of struct lov_user_md_v3 and struct lov_mds_md_v3
> > >> differs, due to different alignment requirements of OABI and EABI.
> 
> I have to ask are you testing the lustre on ARM?

No, I was just compiling the kernel for ARM architecture, and I hit
this issue. If it's possible, I can give it a try with a bunch of
raspberry pis or another cheap board?

>  
> > >> Marking the anonymous union within struct lov_user_md_v3 as
> > >> '_packed' solves this issue. Otherwise we get the following
> > >> error:
> > >> 
> > >> drivers/staging/lustre/lustre/lov/lov_pack.c:352:2: note: in expansion
> > >> of macro ‘BUILD_BUG_ON’
> > >>  BUILD_BUG_ON(sizeof(lum) != sizeof(struct lov_mds_md_v3));
> > >> 
> > >> Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
> > >> ---
> > >> drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 2 +-
> > >> 1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > This file is no longer in the tree :(
> > 
> > With James' recent patch series, this has moved to include/uapi/linux/lustre/lustre_user.h
> 
> BTW is __packed valid for UAPI headers?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [lustre-devel] [PATCH] staging: lustre: fix structure size for ARM OABI
@ 2017-08-21 12:38         ` Cihangir Akturk
  0 siblings, 0 replies; 10+ messages in thread
From: Cihangir Akturk @ 2017-08-21 12:38 UTC (permalink / raw)
  To: James Simmons
  Cc: Dilger, Andreas, Greg KH, Lustre Development List, devel,
	Linux Kernel Mailing List, Drokin, Oleg

On Sun, Aug 20, 2017 at 03:52:26AM +0100, James Simmons wrote:
> 
> > On Aug 17, 2017, at 10:26, Greg KH <gregkh@linuxfoundation.org> wrote:
> > > 
> > > On Wed, Aug 16, 2017 at 05:44:15PM +0300, Cihangir Akturk wrote:
> > >> When building the kernel for the ARM architecture without setting
> > >> CONFIG_AEABI, size of struct lov_user_md_v3 and struct lov_mds_md_v3
> > >> differs, due to different alignment requirements of OABI and EABI.
> 
> I have to ask are you testing the lustre on ARM?

No, I was just compiling the kernel for ARM architecture, and I hit
this issue. If it's possible, I can give it a try with a bunch of
raspberry pis or another cheap board?

>  
> > >> Marking the anonymous union within struct lov_user_md_v3 as
> > >> '_packed' solves this issue. Otherwise we get the following
> > >> error:
> > >> 
> > >> drivers/staging/lustre/lustre/lov/lov_pack.c:352:2: note: in expansion
> > >> of macro ?BUILD_BUG_ON?
> > >>  BUILD_BUG_ON(sizeof(lum) != sizeof(struct lov_mds_md_v3));
> > >> 
> > >> Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
> > >> ---
> > >> drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 2 +-
> > >> 1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > This file is no longer in the tree :(
> > 
> > With James' recent patch series, this has moved to include/uapi/linux/lustre/lustre_user.h
> 
> BTW is __packed valid for UAPI headers?

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-08-21 12:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-16 14:44 [PATCH] staging: lustre: fix structure size for ARM OABI Cihangir Akturk
2017-08-16 14:44 ` [lustre-devel] " Cihangir Akturk
2017-08-17 16:26 ` Greg KH
2017-08-17 16:26   ` [lustre-devel] " Greg KH
2017-08-18 23:57   ` Dilger, Andreas
2017-08-18 23:57     ` [lustre-devel] " Dilger, Andreas
2017-08-20  2:52     ` James Simmons
2017-08-20  2:52       ` [lustre-devel] " James Simmons
2017-08-21 12:38       ` Cihangir Akturk
2017-08-21 12:38         ` [lustre-devel] " Cihangir Akturk

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.