]> git.proxmox.com Git - mirror_spl.git/commitdiff
Changes to support zfs encryption
authorTom Caputi <tcaputi@datto.com>
Thu, 18 Feb 2016 23:24:29 +0000 (18:24 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 25 Feb 2016 19:42:46 +0000 (11:42 -0800)
Unused modlinkage struct removed and ntohll functions added.

Signed-off-by: Tom Caputi <tcaputi@datto.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #533

include/sys/byteorder.h
include/sys/sunldi.h

index 5350a0b33aa3d979e4d67e45e4cc7024c86c25a7..184b52d51dddd5d269541f07e389b1cfc790c0f1 100644 (file)
@@ -26,6 +26,7 @@
 #define _SPL_BYTEORDER_H
 
 #include <asm/byteorder.h>
+#include <sys/isa_defs.h>
 
 #define LE_16(x)       cpu_to_le16(x)
 #define LE_32(x)       cpu_to_le32(x)
 #define BE_IN32(xa) \
        (((uint32_t)BE_IN16(xa) << 16) | BE_IN16((uint8_t *)(xa)+2))
 
+#ifdef _BIG_ENDIAN
+static __inline__ uint64_t
+htonll(uint64_t n) {
+       return (n);
+}
+
+static __inline__ uint64_t
+ntohll(uint64_t n) {
+       return (n);
+}
+#else
+static __inline__ uint64_t
+htonll(uint64_t n) {
+       return ((((uint64_t)htonl(n)) << 32) + htonl(n >> 32));
+}
+
+static __inline__ uint64_t
+ntohll(uint64_t n) {
+       return ((((uint64_t)ntohl(n)) << 32) + ntohl(n >> 32));
+}
+#endif
+
 #endif /* SPL_BYTEORDER_H */
index b4ff7391a4a7c9b33828539e7bbefca9b4a1dfe0..ec8420231e995e89a75f69253384008bfc6c8ad2 100644 (file)
 
 #define SECTOR_SIZE 512
 
-typedef struct modlinkage {
-       int ml_rev;
-       struct modlfs *ml_modlfs;
-       struct modldrv *ml_modldrv;
-       major_t ml_major;
-       unsigned ml_minors;
-       void *pad1;
-} modlinkage_t;
-
-typedef struct ldi_ident {
-       char li_modname[MAXNAMELEN];
-       dev_t li_dev;
-} *ldi_ident_t;
-
-typedef struct block_device *ldi_handle_t;
-
-extern int ldi_ident_from_mod(struct modlinkage *modlp, ldi_ident_t *lip);
-extern void ldi_ident_release(ldi_ident_t li);
-
 #endif /* SPL_SUNLDI_H */