SageA large number of le32_to_cpu (and the like) are used throughout the kernel client when referencing packed structs that are used OTW. However, I'd argue conversion should be done in only two places: before being sent or received. This allows non-packed versions of structs to be used only on the local machine, and use optimized alignment determined by gcc. Additionally it de-clutters the code of all the conversion routines. The patch I attached (not ready for use) demonstrates this for struct ceph_file_layout by introducing struct __ceph_file_layout for OTW, and does conversion only before sending or receiving over the network.
Comments, suggestions? -n
use-non-packed-fl.diff
Description: Binary data
------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________ Ceph-devel mailing list Ceph-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ceph-devel