Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / include / lustre_lib.h
index 206a1bf..20f73e0 100644 (file)
@@ -60,6 +60,7 @@ int target_handle_disconnect(struct ptlrpc_request *req);
 void target_destroy_export(struct obd_export *exp);
 int target_handle_reconnect(struct lustre_handle *conn, struct obd_export *exp,
                             struct obd_uuid *cluuid, int);
+int target_pack_pool_reply(struct ptlrpc_request *req);
 int target_handle_ping(struct ptlrpc_request *req);
 void target_committed_to_req(struct ptlrpc_request *req);
 
@@ -90,12 +91,11 @@ void target_send_reply(struct ptlrpc_request *req, int rc, int fail_id);
 int client_sanobd_setup(struct obd_device *obddev, struct lustre_cfg* lcfg);
 struct client_obd *client_conn2cli(struct lustre_handle *conn);
 
-struct mdc_open_data;
+struct md_open_data;
 struct obd_client_handle {
         struct lustre_handle  och_fh;
         struct lu_fid         och_fid;
-        struct llog_cookie    och_cookie;
-        struct mdc_open_data *och_mod;
+        struct md_open_data *och_mod;
         __u32 och_magic;
         int och_flags;
 };
@@ -251,12 +251,12 @@ static inline int obd_ioctl_pack(struct obd_ioctl_data *data, char **pbuf,
         data->ioc_version = OBD_IOCTL_VERSION;
 
         if (*pbuf && data->ioc_len > max)
-                return 1;
+                return -EINVAL;
         if (*pbuf == NULL) {
                 *pbuf = malloc(data->ioc_len);
         }
         if (!*pbuf)
-                return 1;
+                return -ENOMEM;
         overlay = (struct obd_ioctl_data *)*pbuf;
         memcpy(*pbuf, data, sizeof(*data));
 
@@ -270,7 +270,7 @@ static inline int obd_ioctl_pack(struct obd_ioctl_data *data, char **pbuf,
         if (data->ioc_inlbuf4)
                 LOGL(data->ioc_inlbuf4, data->ioc_inllen4, ptr);
         if (obd_ioctl_is_invalid(overlay))
-                return 1;
+                return -EINVAL;
 
         return 0;
 }