aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exofs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/exofs/inode.c')
-rw-r--r--fs/exofs/inode.c152
1 files changed, 76 insertions, 76 deletions
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
index 8472c098445d..f39a38fc2349 100644
--- a/fs/exofs/inode.c
+++ b/fs/exofs/inode.c
@@ -43,7 +43,7 @@ enum { BIO_MAX_PAGES_KMALLOC =
43 PAGE_SIZE / sizeof(struct page *), 43 PAGE_SIZE / sizeof(struct page *),
44}; 44};
45 45
46unsigned exofs_max_io_pages(struct exofs_layout *layout, 46unsigned exofs_max_io_pages(struct ore_layout *layout,
47 unsigned expected_pages) 47 unsigned expected_pages)
48{ 48{
49 unsigned pages = min_t(unsigned, expected_pages, MAX_PAGES_KMALLOC); 49 unsigned pages = min_t(unsigned, expected_pages, MAX_PAGES_KMALLOC);
@@ -58,7 +58,7 @@ struct page_collect {
58 struct exofs_sb_info *sbi; 58 struct exofs_sb_info *sbi;
59 struct inode *inode; 59 struct inode *inode;
60 unsigned expected_pages; 60 unsigned expected_pages;
61 struct exofs_io_state *ios; 61 struct ore_io_state *ios;
62 62
63 struct page **pages; 63 struct page **pages;
64 unsigned alloc_pages; 64 unsigned alloc_pages;
@@ -110,13 +110,6 @@ static int pcol_try_alloc(struct page_collect *pcol)
110{ 110{
111 unsigned pages; 111 unsigned pages;
112 112
113 if (!pcol->ios) { /* First time allocate io_state */
114 int ret = exofs_get_io_state(&pcol->sbi->layout, &pcol->ios);
115
116 if (ret)
117 return ret;
118 }
119
120 /* TODO: easily support bio chaining */ 113 /* TODO: easily support bio chaining */
121 pages = exofs_max_io_pages(&pcol->sbi->layout, pcol->expected_pages); 114 pages = exofs_max_io_pages(&pcol->sbi->layout, pcol->expected_pages);
122 115
@@ -140,7 +133,7 @@ static void pcol_free(struct page_collect *pcol)
140 pcol->pages = NULL; 133 pcol->pages = NULL;
141 134
142 if (pcol->ios) { 135 if (pcol->ios) {
143 exofs_put_io_state(pcol->ios); 136 ore_put_io_state(pcol->ios);
144 pcol->ios = NULL; 137 pcol->ios = NULL;
145 } 138 }
146} 139}
@@ -200,7 +193,7 @@ static int __readpages_done(struct page_collect *pcol)
200 u64 resid; 193 u64 resid;
201 u64 good_bytes; 194 u64 good_bytes;
202 u64 length = 0; 195 u64 length = 0;
203 int ret = exofs_check_io(pcol->ios, &resid); 196 int ret = ore_check_io(pcol->ios, &resid);
204 197
205 if (likely(!ret)) 198 if (likely(!ret))
206 good_bytes = pcol->length; 199 good_bytes = pcol->length;
@@ -241,7 +234,7 @@ static int __readpages_done(struct page_collect *pcol)
241} 234}
242 235
243/* callback of async reads */ 236/* callback of async reads */
244static void readpages_done(struct exofs_io_state *ios, void *p) 237static void readpages_done(struct ore_io_state *ios, void *p)
245{ 238{
246 struct page_collect *pcol = p; 239 struct page_collect *pcol = p;
247 240
@@ -269,20 +262,28 @@ static void _unlock_pcol_pages(struct page_collect *pcol, int ret, int rw)
269static int read_exec(struct page_collect *pcol) 262static int read_exec(struct page_collect *pcol)
270{ 263{
271 struct exofs_i_info *oi = exofs_i(pcol->inode); 264 struct exofs_i_info *oi = exofs_i(pcol->inode);
272 struct exofs_io_state *ios = pcol->ios; 265 struct ore_io_state *ios;
273 struct page_collect *pcol_copy = NULL; 266 struct page_collect *pcol_copy = NULL;
274 int ret; 267 int ret;
275 268
276 if (!pcol->pages) 269 if (!pcol->pages)
277 return 0; 270 return 0;
278 271
272 if (!pcol->ios) {
273 int ret = ore_get_rw_state(&pcol->sbi->layout, &oi->comps, true,
274 pcol->pg_first << PAGE_CACHE_SHIFT,
275 pcol->length, &pcol->ios);
276
277 if (ret)
278 return ret;
279 }
280
281 ios = pcol->ios;
279 ios->pages = pcol->pages; 282 ios->pages = pcol->pages;
280 ios->nr_pages = pcol->nr_pages; 283 ios->nr_pages = pcol->nr_pages;
281 ios->length = pcol->length;
282 ios->offset = pcol->pg_first << PAGE_CACHE_SHIFT;
283 284
284 if (pcol->read_4_write) { 285 if (pcol->read_4_write) {
285 exofs_oi_read(oi, pcol->ios); 286 ore_read(pcol->ios);
286 return __readpages_done(pcol); 287 return __readpages_done(pcol);
287 } 288 }
288 289
@@ -295,14 +296,14 @@ static int read_exec(struct page_collect *pcol)
295 *pcol_copy = *pcol; 296 *pcol_copy = *pcol;
296 ios->done = readpages_done; 297 ios->done = readpages_done;
297 ios->private = pcol_copy; 298 ios->private = pcol_copy;
298 ret = exofs_oi_read(oi, ios); 299 ret = ore_read(ios);
299 if (unlikely(ret)) 300 if (unlikely(ret))
300 goto err; 301 goto err;
301 302
302 atomic_inc(&pcol->sbi->s_curr_pending); 303 atomic_inc(&pcol->sbi->s_curr_pending);
303 304
304 EXOFS_DBGMSG2("read_exec obj=0x%llx start=0x%llx length=0x%lx\n", 305 EXOFS_DBGMSG2("read_exec obj=0x%llx start=0x%llx length=0x%lx\n",
305 ios->obj.id, _LLU(ios->offset), pcol->length); 306 oi->one_comp.obj.id, _LLU(ios->offset), pcol->length);
306 307
307 /* pages ownership was passed to pcol_copy */ 308 /* pages ownership was passed to pcol_copy */
308 _pcol_reset(pcol); 309 _pcol_reset(pcol);
@@ -457,14 +458,14 @@ static int exofs_readpage(struct file *file, struct page *page)
457} 458}
458 459
459/* Callback for osd_write. All writes are asynchronous */ 460/* Callback for osd_write. All writes are asynchronous */
460static void writepages_done(struct exofs_io_state *ios, void *p) 461static void writepages_done(struct ore_io_state *ios, void *p)
461{ 462{
462 struct page_collect *pcol = p; 463 struct page_collect *pcol = p;
463 int i; 464 int i;
464 u64 resid; 465 u64 resid;
465 u64 good_bytes; 466 u64 good_bytes;
466 u64 length = 0; 467 u64 length = 0;
467 int ret = exofs_check_io(ios, &resid); 468 int ret = ore_check_io(ios, &resid);
468 469
469 atomic_dec(&pcol->sbi->s_curr_pending); 470 atomic_dec(&pcol->sbi->s_curr_pending);
470 471
@@ -507,13 +508,21 @@ static void writepages_done(struct exofs_io_state *ios, void *p)
507static int write_exec(struct page_collect *pcol) 508static int write_exec(struct page_collect *pcol)
508{ 509{
509 struct exofs_i_info *oi = exofs_i(pcol->inode); 510 struct exofs_i_info *oi = exofs_i(pcol->inode);
510 struct exofs_io_state *ios = pcol->ios; 511 struct ore_io_state *ios;
511 struct page_collect *pcol_copy = NULL; 512 struct page_collect *pcol_copy = NULL;
512 int ret; 513 int ret;
513 514
514 if (!pcol->pages) 515 if (!pcol->pages)
515 return 0; 516 return 0;
516 517
518 BUG_ON(pcol->ios);
519 ret = ore_get_rw_state(&pcol->sbi->layout, &oi->comps, false,
520 pcol->pg_first << PAGE_CACHE_SHIFT,
521 pcol->length, &pcol->ios);
522
523 if (unlikely(ret))
524 goto err;
525
517 pcol_copy = kmalloc(sizeof(*pcol_copy), GFP_KERNEL); 526 pcol_copy = kmalloc(sizeof(*pcol_copy), GFP_KERNEL);
518 if (!pcol_copy) { 527 if (!pcol_copy) {
519 EXOFS_ERR("write_exec: Failed to kmalloc(pcol)\n"); 528 EXOFS_ERR("write_exec: Failed to kmalloc(pcol)\n");
@@ -523,16 +532,15 @@ static int write_exec(struct page_collect *pcol)
523 532
524 *pcol_copy = *pcol; 533 *pcol_copy = *pcol;
525 534
535 ios = pcol->ios;
526 ios->pages = pcol_copy->pages; 536 ios->pages = pcol_copy->pages;
527 ios->nr_pages = pcol_copy->nr_pages; 537 ios->nr_pages = pcol_copy->nr_pages;
528 ios->offset = pcol_copy->pg_first << PAGE_CACHE_SHIFT;
529 ios->length = pcol_copy->length;
530 ios->done = writepages_done; 538 ios->done = writepages_done;
531 ios->private = pcol_copy; 539 ios->private = pcol_copy;
532 540
533 ret = exofs_oi_write(oi, ios); 541 ret = ore_write(ios);
534 if (unlikely(ret)) { 542 if (unlikely(ret)) {
535 EXOFS_ERR("write_exec: exofs_oi_write() Failed\n"); 543 EXOFS_ERR("write_exec: ore_write() Failed\n");
536 goto err; 544 goto err;
537 } 545 }
538 546
@@ -844,17 +852,15 @@ static inline int exofs_inode_is_fast_symlink(struct inode *inode)
844 return S_ISLNK(inode->i_mode) && (oi->i_data[0] != 0); 852 return S_ISLNK(inode->i_mode) && (oi->i_data[0] != 0);
845} 853}
846 854
847const struct osd_attr g_attr_logical_length = ATTR_DEF(
848 OSD_APAGE_OBJECT_INFORMATION, OSD_ATTR_OI_LOGICAL_LENGTH, 8);
849
850static int _do_truncate(struct inode *inode, loff_t newsize) 855static int _do_truncate(struct inode *inode, loff_t newsize)
851{ 856{
852 struct exofs_i_info *oi = exofs_i(inode); 857 struct exofs_i_info *oi = exofs_i(inode);
858 struct exofs_sb_info *sbi = inode->i_sb->s_fs_info;
853 int ret; 859 int ret;
854 860
855 inode->i_mtime = inode->i_ctime = CURRENT_TIME; 861 inode->i_mtime = inode->i_ctime = CURRENT_TIME;
856 862
857 ret = exofs_oi_truncate(oi, (u64)newsize); 863 ret = ore_truncate(&sbi->layout, &oi->comps, (u64)newsize);
858 if (likely(!ret)) 864 if (likely(!ret))
859 truncate_setsize(inode, newsize); 865 truncate_setsize(inode, newsize);
860 866
@@ -917,30 +923,26 @@ static int exofs_get_inode(struct super_block *sb, struct exofs_i_info *oi,
917 [1] = g_attr_inode_file_layout, 923 [1] = g_attr_inode_file_layout,
918 [2] = g_attr_inode_dir_layout, 924 [2] = g_attr_inode_dir_layout,
919 }; 925 };
920 struct exofs_io_state *ios; 926 struct ore_io_state *ios;
921 struct exofs_on_disk_inode_layout *layout; 927 struct exofs_on_disk_inode_layout *layout;
922 int ret; 928 int ret;
923 929
924 ret = exofs_get_io_state(&sbi->layout, &ios); 930 ret = ore_get_io_state(&sbi->layout, &oi->comps, &ios);
925 if (unlikely(ret)) { 931 if (unlikely(ret)) {
926 EXOFS_ERR("%s: exofs_get_io_state failed.\n", __func__); 932 EXOFS_ERR("%s: ore_get_io_state failed.\n", __func__);
927 return ret; 933 return ret;
928 } 934 }
929 935
930 ios->obj.id = exofs_oi_objno(oi); 936 attrs[1].len = exofs_on_disk_inode_layout_size(sbi->comps.numdevs);
931 exofs_make_credential(oi->i_cred, &ios->obj); 937 attrs[2].len = exofs_on_disk_inode_layout_size(sbi->comps.numdevs);
932 ios->cred = oi->i_cred;
933
934 attrs[1].len = exofs_on_disk_inode_layout_size(sbi->layout.s_numdevs);
935 attrs[2].len = exofs_on_disk_inode_layout_size(sbi->layout.s_numdevs);
936 938
937 ios->in_attr = attrs; 939 ios->in_attr = attrs;
938 ios->in_attr_len = ARRAY_SIZE(attrs); 940 ios->in_attr_len = ARRAY_SIZE(attrs);
939 941
940 ret = exofs_sbi_read(ios); 942 ret = ore_read(ios);
941 if (unlikely(ret)) { 943 if (unlikely(ret)) {
942 EXOFS_ERR("object(0x%llx) corrupted, return empty file=>%d\n", 944 EXOFS_ERR("object(0x%llx) corrupted, return empty file=>%d\n",
943 _LLU(ios->obj.id), ret); 945 _LLU(oi->one_comp.obj.id), ret);
944 memset(inode, 0, sizeof(*inode)); 946 memset(inode, 0, sizeof(*inode));
945 inode->i_mode = 0040000 | (0777 & ~022); 947 inode->i_mode = 0040000 | (0777 & ~022);
946 /* If object is lost on target we might as well enable it's 948 /* If object is lost on target we might as well enable it's
@@ -990,7 +992,7 @@ static int exofs_get_inode(struct super_block *sb, struct exofs_i_info *oi,
990 } 992 }
991 993
992out: 994out:
993 exofs_put_io_state(ios); 995 ore_put_io_state(ios);
994 return ret; 996 return ret;
995} 997}
996 998
@@ -1016,6 +1018,8 @@ struct inode *exofs_iget(struct super_block *sb, unsigned long ino)
1016 return inode; 1018 return inode;
1017 oi = exofs_i(inode); 1019 oi = exofs_i(inode);
1018 __oi_init(oi); 1020 __oi_init(oi);
1021 exofs_init_comps(&oi->comps, &oi->one_comp, sb->s_fs_info,
1022 exofs_oi_objno(oi));
1019 1023
1020 /* read the inode from the osd */ 1024 /* read the inode from the osd */
1021 ret = exofs_get_inode(sb, oi, &fcb); 1025 ret = exofs_get_inode(sb, oi, &fcb);
@@ -1107,21 +1111,22 @@ int __exofs_wait_obj_created(struct exofs_i_info *oi)
1107 * set the obj_created flag so that other methods know that the object exists on 1111 * set the obj_created flag so that other methods know that the object exists on
1108 * the OSD. 1112 * the OSD.
1109 */ 1113 */
1110static void create_done(struct exofs_io_state *ios, void *p) 1114static void create_done(struct ore_io_state *ios, void *p)
1111{ 1115{
1112 struct inode *inode = p; 1116 struct inode *inode = p;
1113 struct exofs_i_info *oi = exofs_i(inode); 1117 struct exofs_i_info *oi = exofs_i(inode);
1114 struct exofs_sb_info *sbi = inode->i_sb->s_fs_info; 1118 struct exofs_sb_info *sbi = inode->i_sb->s_fs_info;
1115 int ret; 1119 int ret;
1116 1120
1117 ret = exofs_check_io(ios, NULL); 1121 ret = ore_check_io(ios, NULL);
1118 exofs_put_io_state(ios); 1122 ore_put_io_state(ios);
1119 1123
1120 atomic_dec(&sbi->s_curr_pending); 1124 atomic_dec(&sbi->s_curr_pending);
1121 1125
1122 if (unlikely(ret)) { 1126 if (unlikely(ret)) {
1123 EXOFS_ERR("object=0x%llx creation failed in pid=0x%llx", 1127 EXOFS_ERR("object=0x%llx creation failed in pid=0x%llx",
1124 _LLU(exofs_oi_objno(oi)), _LLU(sbi->layout.s_pid)); 1128 _LLU(exofs_oi_objno(oi)),
1129 _LLU(oi->one_comp.obj.partition));
1125 /*TODO: When FS is corrupted creation can fail, object already 1130 /*TODO: When FS is corrupted creation can fail, object already
1126 * exist. Get rid of this asynchronous creation, if exist 1131 * exist. Get rid of this asynchronous creation, if exist
1127 * increment the obj counter and try the next object. Until we 1132 * increment the obj counter and try the next object. Until we
@@ -1140,14 +1145,13 @@ static void create_done(struct exofs_io_state *ios, void *p)
1140 */ 1145 */
1141struct inode *exofs_new_inode(struct inode *dir, int mode) 1146struct inode *exofs_new_inode(struct inode *dir, int mode)
1142{ 1147{
1143 struct super_block *sb; 1148 struct super_block *sb = dir->i_sb;
1149 struct exofs_sb_info *sbi = sb->s_fs_info;
1144 struct inode *inode; 1150 struct inode *inode;
1145 struct exofs_i_info *oi; 1151 struct exofs_i_info *oi;
1146 struct exofs_sb_info *sbi; 1152 struct ore_io_state *ios;
1147 struct exofs_io_state *ios;
1148 int ret; 1153 int ret;
1149 1154
1150 sb = dir->i_sb;
1151 inode = new_inode(sb); 1155 inode = new_inode(sb);
1152 if (!inode) 1156 if (!inode)
1153 return ERR_PTR(-ENOMEM); 1157 return ERR_PTR(-ENOMEM);
@@ -1157,8 +1161,6 @@ struct inode *exofs_new_inode(struct inode *dir, int mode)
1157 1161
1158 set_obj_2bcreated(oi); 1162 set_obj_2bcreated(oi);
1159 1163
1160 sbi = sb->s_fs_info;
1161
1162 inode->i_mapping->backing_dev_info = sb->s_bdi; 1164 inode->i_mapping->backing_dev_info = sb->s_bdi;
1163 inode_init_owner(inode, dir, mode); 1165 inode_init_owner(inode, dir, mode);
1164 inode->i_ino = sbi->s_nextid++; 1166 inode->i_ino = sbi->s_nextid++;
@@ -1170,25 +1172,24 @@ struct inode *exofs_new_inode(struct inode *dir, int mode)
1170 spin_unlock(&sbi->s_next_gen_lock); 1172 spin_unlock(&sbi->s_next_gen_lock);
1171 insert_inode_hash(inode); 1173 insert_inode_hash(inode);
1172 1174
1175 exofs_init_comps(&oi->comps, &oi->one_comp, sb->s_fs_info,
1176 exofs_oi_objno(oi));
1173 exofs_sbi_write_stats(sbi); /* Make sure new sbi->s_nextid is on disk */ 1177 exofs_sbi_write_stats(sbi); /* Make sure new sbi->s_nextid is on disk */
1174 1178
1175 mark_inode_dirty(inode); 1179 mark_inode_dirty(inode);
1176 1180
1177 ret = exofs_get_io_state(&sbi->layout, &ios); 1181 ret = ore_get_io_state(&sbi->layout, &oi->comps, &ios);
1178 if (unlikely(ret)) { 1182 if (unlikely(ret)) {
1179 EXOFS_ERR("exofs_new_inode: exofs_get_io_state failed\n"); 1183 EXOFS_ERR("exofs_new_inode: ore_get_io_state failed\n");
1180 return ERR_PTR(ret); 1184 return ERR_PTR(ret);
1181 } 1185 }
1182 1186
1183 ios->obj.id = exofs_oi_objno(oi);
1184 exofs_make_credential(oi->i_cred, &ios->obj);
1185
1186 ios->done = create_done; 1187 ios->done = create_done;
1187 ios->private = inode; 1188 ios->private = inode;
1188 ios->cred = oi->i_cred; 1189
1189 ret = exofs_sbi_create(ios); 1190 ret = ore_create(ios);
1190 if (ret) { 1191 if (ret) {
1191 exofs_put_io_state(ios); 1192 ore_put_io_state(ios);
1192 return ERR_PTR(ret); 1193 return ERR_PTR(ret);
1193 } 1194 }
1194 atomic_inc(&sbi->s_curr_pending); 1195 atomic_inc(&sbi->s_curr_pending);
@@ -1207,11 +1208,11 @@ struct updatei_args {
1207/* 1208/*
1208 * Callback function from exofs_update_inode(). 1209 * Callback function from exofs_update_inode().
1209 */ 1210 */
1210static void updatei_done(struct exofs_io_state *ios, void *p) 1211static void updatei_done(struct ore_io_state *ios, void *p)
1211{ 1212{
1212 struct updatei_args *args = p; 1213 struct updatei_args *args = p;
1213 1214
1214 exofs_put_io_state(ios); 1215 ore_put_io_state(ios);
1215 1216
1216 atomic_dec(&args->sbi->s_curr_pending); 1217 atomic_dec(&args->sbi->s_curr_pending);
1217 1218
@@ -1227,7 +1228,7 @@ static int exofs_update_inode(struct inode *inode, int do_sync)
1227 struct exofs_i_info *oi = exofs_i(inode); 1228 struct exofs_i_info *oi = exofs_i(inode);
1228 struct super_block *sb = inode->i_sb; 1229 struct super_block *sb = inode->i_sb;
1229 struct exofs_sb_info *sbi = sb->s_fs_info; 1230 struct exofs_sb_info *sbi = sb->s_fs_info;
1230 struct exofs_io_state *ios; 1231 struct ore_io_state *ios;
1231 struct osd_attr attr; 1232 struct osd_attr attr;
1232 struct exofs_fcb *fcb; 1233 struct exofs_fcb *fcb;
1233 struct updatei_args *args; 1234 struct updatei_args *args;
@@ -1266,9 +1267,9 @@ static int exofs_update_inode(struct inode *inode, int do_sync)
1266 } else 1267 } else
1267 memcpy(fcb->i_data, oi->i_data, sizeof(fcb->i_data)); 1268 memcpy(fcb->i_data, oi->i_data, sizeof(fcb->i_data));
1268 1269
1269 ret = exofs_get_io_state(&sbi->layout, &ios); 1270 ret = ore_get_io_state(&sbi->layout, &oi->comps, &ios);
1270 if (unlikely(ret)) { 1271 if (unlikely(ret)) {
1271 EXOFS_ERR("%s: exofs_get_io_state failed.\n", __func__); 1272 EXOFS_ERR("%s: ore_get_io_state failed.\n", __func__);
1272 goto free_args; 1273 goto free_args;
1273 } 1274 }
1274 1275
@@ -1285,13 +1286,13 @@ static int exofs_update_inode(struct inode *inode, int do_sync)
1285 ios->private = args; 1286 ios->private = args;
1286 } 1287 }
1287 1288
1288 ret = exofs_oi_write(oi, ios); 1289 ret = ore_write(ios);
1289 if (!do_sync && !ret) { 1290 if (!do_sync && !ret) {
1290 atomic_inc(&sbi->s_curr_pending); 1291 atomic_inc(&sbi->s_curr_pending);
1291 goto out; /* deallocation in updatei_done */ 1292 goto out; /* deallocation in updatei_done */
1292 } 1293 }
1293 1294
1294 exofs_put_io_state(ios); 1295 ore_put_io_state(ios);
1295free_args: 1296free_args:
1296 kfree(args); 1297 kfree(args);
1297out: 1298out:
@@ -1310,11 +1311,11 @@ int exofs_write_inode(struct inode *inode, struct writeback_control *wbc)
1310 * Callback function from exofs_delete_inode() - don't have much cleaning up to 1311 * Callback function from exofs_delete_inode() - don't have much cleaning up to
1311 * do. 1312 * do.
1312 */ 1313 */
1313static void delete_done(struct exofs_io_state *ios, void *p) 1314static void delete_done(struct ore_io_state *ios, void *p)
1314{ 1315{
1315 struct exofs_sb_info *sbi = p; 1316 struct exofs_sb_info *sbi = p;
1316 1317
1317 exofs_put_io_state(ios); 1318 ore_put_io_state(ios);
1318 1319
1319 atomic_dec(&sbi->s_curr_pending); 1320 atomic_dec(&sbi->s_curr_pending);
1320} 1321}
@@ -1329,7 +1330,7 @@ void exofs_evict_inode(struct inode *inode)
1329 struct exofs_i_info *oi = exofs_i(inode); 1330 struct exofs_i_info *oi = exofs_i(inode);
1330 struct super_block *sb = inode->i_sb; 1331 struct super_block *sb = inode->i_sb;
1331 struct exofs_sb_info *sbi = sb->s_fs_info; 1332 struct exofs_sb_info *sbi = sb->s_fs_info;
1332 struct exofs_io_state *ios; 1333 struct ore_io_state *ios;
1333 int ret; 1334 int ret;
1334 1335
1335 truncate_inode_pages(&inode->i_data, 0); 1336 truncate_inode_pages(&inode->i_data, 0);
@@ -1349,20 +1350,19 @@ void exofs_evict_inode(struct inode *inode)
1349 /* ignore the error, attempt a remove anyway */ 1350 /* ignore the error, attempt a remove anyway */
1350 1351
1351 /* Now Remove the OSD objects */ 1352 /* Now Remove the OSD objects */
1352 ret = exofs_get_io_state(&sbi->layout, &ios); 1353 ret = ore_get_io_state(&sbi->layout, &oi->comps, &ios);
1353 if (unlikely(ret)) { 1354 if (unlikely(ret)) {
1354 EXOFS_ERR("%s: exofs_get_io_state failed\n", __func__); 1355 EXOFS_ERR("%s: ore_get_io_state failed\n", __func__);
1355 return; 1356 return;
1356 } 1357 }
1357 1358
1358 ios->obj.id = exofs_oi_objno(oi);
1359 ios->done = delete_done; 1359 ios->done = delete_done;
1360 ios->private = sbi; 1360 ios->private = sbi;
1361 ios->cred = oi->i_cred; 1361
1362 ret = exofs_sbi_remove(ios); 1362 ret = ore_remove(ios);
1363 if (ret) { 1363 if (ret) {
1364 EXOFS_ERR("%s: exofs_sbi_remove failed\n", __func__); 1364 EXOFS_ERR("%s: ore_remove failed\n", __func__);
1365 exofs_put_io_state(ios); 1365 ore_put_io_state(ios);
1366 return; 1366 return;
1367 } 1367 }
1368 atomic_inc(&sbi->s_curr_pending); 1368 atomic_inc(&sbi->s_curr_pending);