exofs: Move exofs specific osd operations out of ios.c

ios.c will be moving to an external library, for use by the
objects-layout-driver. Remove from it some exofs specific functions.

Also g_attr_logical_length is used both by inode.c and ios.c
move definition to the later, to keep it independent

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
diff --git a/fs/exofs/exofs.h b/fs/exofs/exofs.h
index fd913dd..5a77fc7 100644
--- a/fs/exofs/exofs.h
+++ b/fs/exofs/exofs.h
@@ -205,6 +205,14 @@
  */
 unsigned exofs_layout_od_id(struct exofs_layout *layout,
 			    osd_id obj_no, unsigned layout_index);
+
+static inline struct osd_dev *exofs_ios_od(struct exofs_io_state *ios,
+					   unsigned layout_index)
+{
+	return ios->layout->s_ods[
+		exofs_layout_od_id(ios->layout, ios->obj.id, layout_index)];
+}
+
 /*
  * Maximum count of links to a file
  */
@@ -215,11 +223,6 @@
  *************************/
 
 /* ios.c */
-void exofs_make_credential(u8 cred_a[OSD_CAP_LEN],
-			   const struct osd_obj_id *obj);
-int exofs_read_kern(struct osd_dev *od, u8 *cred, struct osd_obj_id *obj,
-		    u64 offset, void *p, unsigned length);
-
 int  exofs_get_rw_state(struct exofs_layout *layout, bool is_reading,
 			u64 offset, u64 length, struct exofs_io_state **ios);
 int  exofs_get_io_state(struct exofs_layout *layout,
@@ -234,6 +237,7 @@
 int exofs_sbi_read(struct exofs_io_state *ios);
 
 int extract_attr_from_ios(struct exofs_io_state *ios, struct osd_attr *attr);
+extern const struct osd_attr g_attr_logical_length;
 
 int exofs_oi_truncate(struct exofs_i_info *oi, u64 new_len);
 static inline int exofs_oi_write(struct exofs_i_info *oi,
@@ -278,6 +282,8 @@
 		    struct inode *);
 
 /* super.c               */
+void exofs_make_credential(u8 cred_a[OSD_CAP_LEN],
+			   const struct osd_obj_id *obj);
 int exofs_sbi_write_stats(struct exofs_sb_info *sbi);
 
 /*********************
@@ -292,7 +298,6 @@
 
 /* inode.c           */
 extern const struct address_space_operations exofs_aops;
-extern const struct osd_attr g_attr_logical_length;
 
 /* namei.c           */
 extern const struct inode_operations exofs_dir_inode_operations;