Whamcloud - gitweb
use mdt_body->size instead of mdt_body->flags to store errno,
authorlsy <lsy>
Fri, 13 Oct 2006 12:54:18 +0000 (12:54 +0000)
committerlsy <lsy>
Fri, 13 Oct 2006 12:54:18 +0000 (12:54 +0000)
whose type is __u64, thus can transfer negative value between 32 and 64 platform.

lustre/mdc/mdc_request.c
lustre/mdt/mdt_handler.c

index 549a86e..f408a6a 100644 (file)
@@ -1629,8 +1629,8 @@ static int mdc_interpret_renew_capa(struct ptlrpc_request *req, void *unused,
         if (body == NULL)
                 GOTO(out, capa = ERR_PTR(-EFAULT));
 
-        if (body->flags)
-                GOTO(out, capa = ERR_PTR((long)body->flags));
+        if (body->size)
+                GOTO(out, capa = ERR_PTR((long)body->size));
 
         if ((body->valid & OBD_MD_FLOSSCAPA) == 0)
                 GOTO(out, capa = ERR_PTR(-EFAULT));
index 35cc2fe..1ca3fdc 100644 (file)
@@ -459,7 +459,12 @@ static int mdt_renew_capa(struct mdt_thread_info *info)
         body->valid |= OBD_MD_FLOSSCAPA;
         EXIT;
 out:
-        body->flags = (__u32)rc;
+        /* NB: capability renewal might fail because object has been removed,
+         * or server has disabled capability, but this is not error, llite
+         * will handle this internally, see mdc_interpret_renew_capa.
+         * body->size is borrowed to store errno.
+         */
+        body->size = (__u64)rc;
         return 0;
 }