Old days this ugly trick was copypasted from user space, where it allowed to use SSE on packet data. Note how ugly and counterintuitive it is: we deliberately misalign buffer start to enforce data to be aligned to 16 bytes. This trick has been removed from user space long ago, we optimized the engine to use aligned data.
And in kernel it never made a sense. I was just afraid I forgot something and avoided to touch this antique detail. Signed-off-by: Alexey Kuznetsov <[email protected]> --- fs/fuse/kio/pcs/pcs_sock_io.h | 80 +++++++++++++++++++++---------------------- 1 file changed, 39 insertions(+), 41 deletions(-) diff --git a/fs/fuse/kio/pcs/pcs_sock_io.h b/fs/fuse/kio/pcs/pcs_sock_io.h index b14e992..ab549a1 100644 --- a/fs/fuse/kio/pcs/pcs_sock_io.h +++ b/fs/fuse/kio/pcs/pcs_sock_io.h @@ -46,49 +46,46 @@ enum pcs_msg_flag { PCS_MSG_ABORTED, }; -__pre_packed struct pcs_msg +struct pcs_msg { - struct __pre_aligned(16) { - struct list_head list; - - pcs_error_t error; - abs_time_t start_time; - - void *private; - void *private2; /* Huh? Need to do something else here. */ - struct pcs_msg *response; /* Consider removing. It can be done passing the second - * argument to done(); - */ - struct pcs_netio *netio; - struct pcs_rpc *rpc; - - int size; - int _iocount; - unsigned short timeout; - unsigned char kill_slot; - unsigned char stage; - abs_time_t io_start_time; - - unsigned long flags; - - struct hlist_node kill_link; - - void (*get_iter)(struct pcs_msg *, int offset, struct iov_iter *it, - unsigned int direction); - - void (*done)(struct pcs_msg *); - void (*destructor)(struct pcs_msg *); - void *pool; - struct iovec _inline_iovec; - int accounted; - - short _align_offset; - short _inline_len; - struct kvec _inline_kv; - } __aligned(16); - u64 __pad16_8; + struct list_head list; + + pcs_error_t error; + abs_time_t start_time; + + void *private; + void *private2; /* Huh? Need to do something else here. */ + struct pcs_msg *response; /* Consider removing. It can be done passing the second + * argument to done(); + */ + struct pcs_netio *netio; + struct pcs_rpc *rpc; + + int size; + int _iocount; + unsigned short timeout; + unsigned char kill_slot; + unsigned char stage; + abs_time_t io_start_time; + + unsigned long flags; + + struct hlist_node kill_link; + + void (*get_iter)(struct pcs_msg *msg, int offset, struct iov_iter *it, + unsigned int direction); + + void (*done)(struct pcs_msg *msg); + void (*destructor)(struct pcs_msg *msg); + struct iovec _inline_iovec; + int accounted; + + short _align_offset; + short _inline_len; + struct kvec _inline_kv; + char _inline_buffer[0]; -} __packed; +}; static inline void * pcs_msg_aligned_data(struct pcs_msg * msg, int offset) { -- 1.8.3.1 _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
