[PATCH] FUSE: 1/3 add padding
From: Miklos Szeredi (miklos_at_szeredi.hu)
Date: 03/31/05
- Previous message: Miklos Szeredi: "[PATCH] FUSE: 0/3 update kernel ABI"
- Next in thread: Miklos Szeredi: "Re: [PATCH] FUSE: 1/3 add padding"
- Maybe reply: Miklos Szeredi: "Re: [PATCH] FUSE: 1/3 add padding"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: akpm@osdl.org Date: Thu, 31 Mar 2005 22:54:54 +0200
Add padding to structures to make sizes the same on 32bit and 64bit
archs. Initial testing and test machine generously provided by Franco
Broi.
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
diff -rup linux-2.6.12-rc1-mm4/include/linux/fuse.h linux-fuse/include/linux/fuse.h
--- linux-2.6.12-rc1-mm4/include/linux/fuse.h 2005-03-31 21:43:52.000000000 +0200
+++ linux-fuse/include/linux/fuse.h 2005-03-31 21:48:42.000000000 +0200
@@ -25,6 +25,9 @@
/** The minor number of the fuse character device */
#define FUSE_MINOR 229
+/* Make sure all structures are padded to 64bit boundary, so 32bit
+ userspace works under 64bit kernels */
+
struct fuse_attr {
__u64 ino;
__u64 size;
@@ -126,6 +129,7 @@ struct fuse_mknod_in {
struct fuse_mkdir_in {
__u32 mode;
+ __u32 padding;
};
struct fuse_rename_in {
@@ -138,32 +142,38 @@ struct fuse_link_in {
struct fuse_setattr_in {
__u32 valid;
+ __u32 padding;
struct fuse_attr attr;
};
struct fuse_open_in {
__u32 flags;
+ __u32 padding;
};
struct fuse_open_out {
__u64 fh;
__u32 open_flags;
+ __u32 padding;
};
struct fuse_release_in {
__u64 fh;
__u32 flags;
+ __u32 padding;
};
struct fuse_flush_in {
__u64 fh;
__u32 flush_flags;
+ __u32 padding;
};
struct fuse_read_in {
__u64 fh;
__u64 offset;
__u32 size;
+ __u32 padding;
};
struct fuse_write_in {
@@ -175,6 +185,7 @@ struct fuse_write_in {
struct fuse_write_out {
__u32 size;
+ __u32 padding;
};
struct fuse_statfs_out {
@@ -184,6 +195,7 @@ struct fuse_statfs_out {
struct fuse_fsync_in {
__u64 fh;
__u32 fsync_flags;
+ __u32 padding;
};
struct fuse_setxattr_in {
@@ -193,10 +205,12 @@ struct fuse_setxattr_in {
struct fuse_getxattr_in {
__u32 size;
+ __u32 padding;
};
struct fuse_getxattr_out {
__u32 size;
+ __u32 padding;
};
struct fuse_init_in_out {
@@ -212,6 +226,7 @@ struct fuse_in_header {
__u32 uid;
__u32 gid;
__u32 pid;
+ __u32 padding;
};
struct fuse_out_header {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Miklos Szeredi: "[PATCH] FUSE: 0/3 update kernel ABI"
- Next in thread: Miklos Szeredi: "Re: [PATCH] FUSE: 1/3 add padding"
- Maybe reply: Miklos Szeredi: "Re: [PATCH] FUSE: 1/3 add padding"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- [PATCH 304] M68k PCI
... like all other archs do ... struct pci_ops; ... In personal
conversations with technical people, ... send the line "unsubscribe linux-kernel" in
... (Linux-Kernel) - [PATCH] rmap 26 __setup_arg_pages
... put_kernel_page (struct page *page, unsigned long address, pgprot_t pgprot) ...
extern void compute_creds; ... send the line "unsubscribe linux-kernel" in ...
(Linux-Kernel) - Re: [RFC] Generalize prio_tree (1/3)
... Hmm, GET_INDEX/get_index grows and grows, and also generates a ... And what
if we took the hit and moved the key into struct ... half of the key is free (in terms
of storage - the key updates ... send the line "unsubscribe linux-kernel" in ...
(Linux-Kernel) - Re: [patch 8/8] PCI Error Recovery: PPC64 core recovery routines
... this file is a little ball of ugliness that resulted from moving ... I attempted
to remove all of the pci-related stuff from this struct, ... related to the flattening
of the device ndode tree. ... send the line "unsubscribe linux-kernel" in ...
(Linux-Kernel) - Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)
... a downplay that I didn't include the same thing in struct sas_ha_struct. ...
The host template _mixes_ hw, scsi core, and protocol knowlege into ... libata isn't
without architectural problems. ... send the line "unsubscribe linux-kernel" in ...
(Linux-Kernel)