Whamcloud - gitweb
add 2.6.27 kernel support
[fs/lustre-release.git] / lustre / include / lclient.h
index 8f6aef3..e81f7e0 100644 (file)
@@ -48,20 +48,6 @@ int cl_glimpse_lock(const struct lu_env *env, struct cl_io *io,
                     struct inode *inode, struct cl_object *clob);
 
 /**
- * Common IO arguments for various VFS I/O interfaces.
- */
-struct ccc_io_args {
-        int           cia_is_sendfile;
-#ifndef HAVE_FILE_WRITEV
-        struct kiocb *cia_iocb;
-#endif
-        struct iovec *cia_iov;
-        unsigned long cia_nrsegs;
-        read_actor_t  cia_actor;
-        void         *cia_target;
-};
-
-/**
  * Locking policy for truncate.
  */
 enum ccc_trunc_lock_type {
@@ -73,6 +59,7 @@ enum ccc_trunc_lock_type {
         TRUNC_MATCH
 };
 
+
 /**
  * IO state private to vvp or slp layers.
  */
@@ -117,6 +104,12 @@ struct ccc_io {
 #endif
 };
 
+/**
+ * True, if \a io is a normal io, False for other (sendfile, splice*).
+ * must be impementated in arch specific code.
+ */
+int cl_is_normalio(const struct lu_env *env, const struct cl_io *io);
+
 extern struct lu_context_key ccc_key;
 extern struct lu_context_key ccc_session_key;
 
@@ -292,9 +285,9 @@ int ccc_page_is_under_lock(const struct lu_env *env,
                            const struct cl_page_slice *slice, struct cl_io *io);
 int ccc_fail(const struct lu_env *env, const struct cl_page_slice *slice);
 void ccc_transient_page_verify(const struct cl_page *page);
-void ccc_transient_page_own(const struct lu_env *env,
+int  ccc_transient_page_own(const struct lu_env *env,
                             const struct cl_page_slice *slice,
-                            struct cl_io *io);
+                            struct cl_io *io, int nonblock);
 void ccc_transient_page_assume(const struct lu_env *env,
                                const struct cl_page_slice *slice,
                                struct cl_io *io);
@@ -371,6 +364,8 @@ void cl_inode_fini(struct inode *inode);
 int cl_local_size(struct inode *inode);
 
 __u16 ll_dirent_type_get(struct lu_dirent *ent);
+ino_t cl_fid_build_ino(const struct lu_fid *fid);
+__u32 cl_fid_build_gen(const struct lu_fid *fid);
 
 #ifdef INVARIANT_CHECK
 # define CLOBINVRNT(env, clob, expr)                                    \