Whamcloud - gitweb
LU-3432 llite: Access to released file trigs a restore
[fs/lustre-release.git] / lustre / lclient / lcommon_cl.c
index 96b8b3e..e0cc4ad 100644 (file)
@@ -1038,6 +1038,12 @@ again:
         cl_io_fini(env, io);
        if (unlikely(io->ci_need_restart))
                goto again;
+       /* HSM import case: file is released, cannot be restored
+        * no need to fail except if restore registration failed
+        * with -ENODATA */
+       if (result == -ENODATA && io->ci_restore_needed &&
+           io->ci_result != -ENODATA)
+               result = 0;
        cl_env_put(env, &refcheck);
        RETURN(result);
 }