/* This is a new object to be allocated, or the file
* corresponding to the object does not exists. */
LOC_F_NEW = 0x00000001,
+
+ /* When find a dying object, just return -EAGAIN at once instead of
+ * blocking the thread. */
+ LOC_F_NOWAIT = 0x00000002,
} loc_flags_t;
/**
* methods.
*/
struct lu_buf {
- void *lb_buf;
- ssize_t lb_len;
+ void *lb_buf;
+ size_t lb_len;
};
#define DLUBUF "(%p %zu)"
extern struct lu_buf LU_BUF_NULL;
void lu_buf_free(struct lu_buf *buf);
-void lu_buf_alloc(struct lu_buf *buf, int size);
-void lu_buf_realloc(struct lu_buf *buf, int size);
+void lu_buf_alloc(struct lu_buf *buf, size_t size);
+void lu_buf_realloc(struct lu_buf *buf, size_t size);
-int lu_buf_check_and_grow(struct lu_buf *buf, int len);
-struct lu_buf *lu_buf_check_and_alloc(struct lu_buf *buf, int len);
+int lu_buf_check_and_grow(struct lu_buf *buf, size_t len);
+struct lu_buf *lu_buf_check_and_alloc(struct lu_buf *buf, size_t len);
/** @} lu */
#endif /* __LUSTRE_LU_OBJECT_H */