aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2010-01-28 04:46:16 -0500
committerBoaz Harrosh <bharrosh@panasas.com>2010-02-28 06:35:27 -0500
commit45d3abcb1a7388b2b97582e13bf9dd21784dcaa5 (patch)
treee957fdec303c073490c261999d6939c2ecf20352 /fs
parent22ddc556380cf5645c52292b6d980766646eb864 (diff)
exofs: Move layout related members to a layout structure
* Abstract away those members in exofs_sb_info that are related/needed by a layout into a new exofs_layout structure. Embed it in exofs_sb_info. * At exofs_io_state receive/keep a pointer to an exofs_layout. No need for an exofs_sb_info pointer, all we need is at exofs_layout. * Change any usage of above exofs_sb_info members to their new name. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/exofs/exofs.h24
-rw-r--r--fs/exofs/inode.c14
-rw-r--r--fs/exofs/ios.c36
-rw-r--r--fs/exofs/super.c51
4 files changed, 71 insertions, 54 deletions
diff --git a/fs/exofs/exofs.h b/fs/exofs/exofs.h
index 13663da2b119..33c68568b338 100644
--- a/fs/exofs/exofs.h
+++ b/fs/exofs/exofs.h
@@ -55,12 +55,18 @@
55/* u64 has problems with printk this will cast it to unsigned long long */ 55/* u64 has problems with printk this will cast it to unsigned long long */
56#define _LLU(x) (unsigned long long)(x) 56#define _LLU(x) (unsigned long long)(x)
57 57
58struct exofs_layout {
59 osd_id s_pid; /* partition ID of file system*/
60
61 unsigned s_numdevs; /* Num of devices in array */
62 struct osd_dev *s_ods[0]; /* Variable length */
63};
64
58/* 65/*
59 * our extension to the in-memory superblock 66 * our extension to the in-memory superblock
60 */ 67 */
61struct exofs_sb_info { 68struct exofs_sb_info {
62 struct exofs_fscb s_fscb; /* Written often, pre-allocate*/ 69 struct exofs_fscb s_fscb; /* Written often, pre-allocate*/
63 osd_id s_pid; /* partition ID of file system*/
64 int s_timeout; /* timeout for OSD operations */ 70 int s_timeout; /* timeout for OSD operations */
65 uint64_t s_nextid; /* highest object ID used */ 71 uint64_t s_nextid; /* highest object ID used */
66 uint32_t s_numfiles; /* number of files on fs */ 72 uint32_t s_numfiles; /* number of files on fs */
@@ -69,9 +75,14 @@ struct exofs_sb_info {
69 atomic_t s_curr_pending; /* number of pending commands */ 75 atomic_t s_curr_pending; /* number of pending commands */
70 uint8_t s_cred[OSD_CAP_LEN]; /* credential for the fscb */ 76 uint8_t s_cred[OSD_CAP_LEN]; /* credential for the fscb */
71 77
72 struct pnfs_osd_data_map data_map; /* Default raid to use */ 78 struct pnfs_osd_data_map data_map; /* Default raid to use
73 unsigned s_numdevs; /* Num of devices in array */ 79 * FIXME: Needed ?
74 struct osd_dev *s_ods[1]; /* Variable length, minimum 1 */ 80 */
81/* struct exofs_layout dir_layout;*/ /* Default dir layout */
82 struct exofs_layout layout; /* Default files layout,
83 * contains the variable osd_dev
84 * array. Keep last */
85 struct osd_dev *_min_one_dev[1]; /* Place holder for one dev */
75}; 86};
76 87
77/* 88/*
@@ -101,7 +112,7 @@ struct exofs_io_state {
101 void *private; 112 void *private;
102 exofs_io_done_fn done; 113 exofs_io_done_fn done;
103 114
104 struct exofs_sb_info *sbi; 115 struct exofs_layout *layout;
105 struct osd_obj_id obj; 116 struct osd_obj_id obj;
106 u8 *cred; 117 u8 *cred;
107 118
@@ -189,7 +200,8 @@ void exofs_make_credential(u8 cred_a[OSD_CAP_LEN],
189int exofs_read_kern(struct osd_dev *od, u8 *cred, struct osd_obj_id *obj, 200int exofs_read_kern(struct osd_dev *od, u8 *cred, struct osd_obj_id *obj,
190 u64 offset, void *p, unsigned length); 201 u64 offset, void *p, unsigned length);
191 202
192int exofs_get_io_state(struct exofs_sb_info *sbi, struct exofs_io_state** ios); 203int exofs_get_io_state(struct exofs_layout *layout,
204 struct exofs_io_state **ios);
193void exofs_put_io_state(struct exofs_io_state *ios); 205void exofs_put_io_state(struct exofs_io_state *ios);
194 206
195int exofs_check_io(struct exofs_io_state *ios, u64 *resid); 207int exofs_check_io(struct exofs_io_state *ios, u64 *resid);
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
index c88a0c5250cb..03189a958b33 100644
--- a/fs/exofs/inode.c
+++ b/fs/exofs/inode.c
@@ -65,7 +65,7 @@ static void _pcol_init(struct page_collect *pcol, unsigned expected_pages,
65 /* Create master bios on first Q, later on cloning, each clone will be 65 /* Create master bios on first Q, later on cloning, each clone will be
66 * allocated on it's destination Q 66 * allocated on it's destination Q
67 */ 67 */
68 pcol->req_q = osd_request_queue(sbi->s_ods[0]); 68 pcol->req_q = osd_request_queue(sbi->layout.s_ods[0]);
69 pcol->inode = inode; 69 pcol->inode = inode;
70 pcol->expected_pages = expected_pages; 70 pcol->expected_pages = expected_pages;
71 71
@@ -99,7 +99,7 @@ static int pcol_try_alloc(struct page_collect *pcol)
99 BIO_MAX_PAGES_KMALLOC); 99 BIO_MAX_PAGES_KMALLOC);
100 100
101 if (!pcol->ios) { /* First time allocate io_state */ 101 if (!pcol->ios) { /* First time allocate io_state */
102 int ret = exofs_get_io_state(pcol->sbi, &pcol->ios); 102 int ret = exofs_get_io_state(&pcol->sbi->layout, &pcol->ios);
103 103
104 if (ret) 104 if (ret)
105 return ret; 105 return ret;
@@ -872,7 +872,7 @@ static int exofs_get_inode(struct super_block *sb, struct exofs_i_info *oi,
872 int ret; 872 int ret;
873 873
874 *obj_size = ~0; 874 *obj_size = ~0;
875 ret = exofs_get_io_state(sbi, &ios); 875 ret = exofs_get_io_state(&sbi->layout, &ios);
876 if (unlikely(ret)) { 876 if (unlikely(ret)) {
877 EXOFS_ERR("%s: exofs_get_io_state failed.\n", __func__); 877 EXOFS_ERR("%s: exofs_get_io_state failed.\n", __func__);
878 return ret; 878 return ret;
@@ -1043,7 +1043,7 @@ static void create_done(struct exofs_io_state *ios, void *p)
1043 1043
1044 if (unlikely(ret)) { 1044 if (unlikely(ret)) {
1045 EXOFS_ERR("object=0x%llx creation faild in pid=0x%llx", 1045 EXOFS_ERR("object=0x%llx creation faild in pid=0x%llx",
1046 _LLU(exofs_oi_objno(oi)), _LLU(sbi->s_pid)); 1046 _LLU(exofs_oi_objno(oi)), _LLU(sbi->layout.s_pid));
1047 /*TODO: When FS is corrupted creation can fail, object already 1047 /*TODO: When FS is corrupted creation can fail, object already
1048 * exist. Get rid of this asynchronous creation, if exist 1048 * exist. Get rid of this asynchronous creation, if exist
1049 * increment the obj counter and try the next object. Until we 1049 * increment the obj counter and try the next object. Until we
@@ -1104,7 +1104,7 @@ struct inode *exofs_new_inode(struct inode *dir, int mode)
1104 1104
1105 mark_inode_dirty(inode); 1105 mark_inode_dirty(inode);
1106 1106
1107 ret = exofs_get_io_state(sbi, &ios); 1107 ret = exofs_get_io_state(&sbi->layout, &ios);
1108 if (unlikely(ret)) { 1108 if (unlikely(ret)) {
1109 EXOFS_ERR("exofs_new_inode: exofs_get_io_state failed\n"); 1109 EXOFS_ERR("exofs_new_inode: exofs_get_io_state failed\n");
1110 return ERR_PTR(ret); 1110 return ERR_PTR(ret);
@@ -1202,7 +1202,7 @@ static int exofs_update_inode(struct inode *inode, int do_sync)
1202 } else 1202 } else
1203 memcpy(fcb->i_data, oi->i_data, sizeof(fcb->i_data)); 1203 memcpy(fcb->i_data, oi->i_data, sizeof(fcb->i_data));
1204 1204
1205 ret = exofs_get_io_state(sbi, &ios); 1205 ret = exofs_get_io_state(&sbi->layout, &ios);
1206 if (unlikely(ret)) { 1206 if (unlikely(ret)) {
1207 EXOFS_ERR("%s: exofs_get_io_state failed.\n", __func__); 1207 EXOFS_ERR("%s: exofs_get_io_state failed.\n", __func__);
1208 goto free_args; 1208 goto free_args;
@@ -1286,7 +1286,7 @@ void exofs_delete_inode(struct inode *inode)
1286 1286
1287 clear_inode(inode); 1287 clear_inode(inode);
1288 1288
1289 ret = exofs_get_io_state(sbi, &ios); 1289 ret = exofs_get_io_state(&sbi->layout, &ios);
1290 if (unlikely(ret)) { 1290 if (unlikely(ret)) {
1291 EXOFS_ERR("%s: exofs_get_io_state failed\n", __func__); 1291 EXOFS_ERR("%s: exofs_get_io_state failed\n", __func__);
1292 return; 1292 return;
diff --git a/fs/exofs/ios.c b/fs/exofs/ios.c
index 439c5d097b27..83e54a77b992 100644
--- a/fs/exofs/ios.c
+++ b/fs/exofs/ios.c
@@ -67,23 +67,24 @@ out:
67 return ret; 67 return ret;
68} 68}
69 69
70int exofs_get_io_state(struct exofs_sb_info *sbi, struct exofs_io_state** pios) 70int exofs_get_io_state(struct exofs_layout *layout,
71 struct exofs_io_state **pios)
71{ 72{
72 struct exofs_io_state *ios; 73 struct exofs_io_state *ios;
73 74
74 /*TODO: Maybe use kmem_cach per sbi of size 75 /*TODO: Maybe use kmem_cach per sbi of size
75 * exofs_io_state_size(sbi->s_numdevs) 76 * exofs_io_state_size(layout->s_numdevs)
76 */ 77 */
77 ios = kzalloc(exofs_io_state_size(sbi->s_numdevs), GFP_KERNEL); 78 ios = kzalloc(exofs_io_state_size(layout->s_numdevs), GFP_KERNEL);
78 if (unlikely(!ios)) { 79 if (unlikely(!ios)) {
79 EXOFS_DBGMSG("Faild kzalloc bytes=%d\n", 80 EXOFS_DBGMSG("Faild kzalloc bytes=%d\n",
80 exofs_io_state_size(sbi->s_numdevs)); 81 exofs_io_state_size(layout->s_numdevs));
81 *pios = NULL; 82 *pios = NULL;
82 return -ENOMEM; 83 return -ENOMEM;
83 } 84 }
84 85
85 ios->sbi = sbi; 86 ios->layout = layout;
86 ios->obj.partition = sbi->s_pid; 87 ios->obj.partition = layout->s_pid;
87 *pios = ios; 88 *pios = ios;
88 return 0; 89 return 0;
89} 90}
@@ -238,10 +239,10 @@ int exofs_sbi_create(struct exofs_io_state *ios)
238{ 239{
239 int i, ret; 240 int i, ret;
240 241
241 for (i = 0; i < ios->sbi->s_numdevs; i++) { 242 for (i = 0; i < ios->layout->s_numdevs; i++) {
242 struct osd_request *or; 243 struct osd_request *or;
243 244
244 or = osd_start_request(ios->sbi->s_ods[i], GFP_KERNEL); 245 or = osd_start_request(ios->layout->s_ods[i], GFP_KERNEL);
245 if (unlikely(!or)) { 246 if (unlikely(!or)) {
246 EXOFS_ERR("%s: osd_start_request failed\n", __func__); 247 EXOFS_ERR("%s: osd_start_request failed\n", __func__);
247 ret = -ENOMEM; 248 ret = -ENOMEM;
@@ -262,10 +263,10 @@ int exofs_sbi_remove(struct exofs_io_state *ios)
262{ 263{
263 int i, ret; 264 int i, ret;
264 265
265 for (i = 0; i < ios->sbi->s_numdevs; i++) { 266 for (i = 0; i < ios->layout->s_numdevs; i++) {
266 struct osd_request *or; 267 struct osd_request *or;
267 268
268 or = osd_start_request(ios->sbi->s_ods[i], GFP_KERNEL); 269 or = osd_start_request(ios->layout->s_ods[i], GFP_KERNEL);
269 if (unlikely(!or)) { 270 if (unlikely(!or)) {
270 EXOFS_ERR("%s: osd_start_request failed\n", __func__); 271 EXOFS_ERR("%s: osd_start_request failed\n", __func__);
271 ret = -ENOMEM; 272 ret = -ENOMEM;
@@ -286,10 +287,10 @@ int exofs_sbi_write(struct exofs_io_state *ios)
286{ 287{
287 int i, ret; 288 int i, ret;
288 289
289 for (i = 0; i < ios->sbi->s_numdevs; i++) { 290 for (i = 0; i < ios->layout->s_numdevs; i++) {
290 struct osd_request *or; 291 struct osd_request *or;
291 292
292 or = osd_start_request(ios->sbi->s_ods[i], GFP_KERNEL); 293 or = osd_start_request(ios->layout->s_ods[i], GFP_KERNEL);
293 if (unlikely(!or)) { 294 if (unlikely(!or)) {
294 EXOFS_ERR("%s: osd_start_request failed\n", __func__); 295 EXOFS_ERR("%s: osd_start_request failed\n", __func__);
295 ret = -ENOMEM; 296 ret = -ENOMEM;
@@ -361,8 +362,9 @@ int exofs_sbi_read(struct exofs_io_state *ios)
361 struct osd_request *or; 362 struct osd_request *or;
362 unsigned first_dev = (unsigned)ios->obj.id; 363 unsigned first_dev = (unsigned)ios->obj.id;
363 364
364 first_dev %= ios->sbi->s_numdevs; 365 first_dev %= ios->layout->s_numdevs;
365 or = osd_start_request(ios->sbi->s_ods[first_dev], GFP_KERNEL); 366 or = osd_start_request(ios->layout->s_ods[first_dev],
367 GFP_KERNEL);
366 if (unlikely(!or)) { 368 if (unlikely(!or)) {
367 EXOFS_ERR("%s: osd_start_request failed\n", __func__); 369 EXOFS_ERR("%s: osd_start_request failed\n", __func__);
368 ret = -ENOMEM; 370 ret = -ENOMEM;
@@ -438,7 +440,7 @@ int exofs_oi_truncate(struct exofs_i_info *oi, u64 size)
438 __be64 newsize; 440 __be64 newsize;
439 int i, ret; 441 int i, ret;
440 442
441 if (exofs_get_io_state(sbi, &ios)) 443 if (exofs_get_io_state(&sbi->layout, &ios))
442 return -ENOMEM; 444 return -ENOMEM;
443 445
444 ios->obj.id = exofs_oi_objno(oi); 446 ios->obj.id = exofs_oi_objno(oi);
@@ -448,10 +450,10 @@ int exofs_oi_truncate(struct exofs_i_info *oi, u64 size)
448 attr = g_attr_logical_length; 450 attr = g_attr_logical_length;
449 attr.val_ptr = &newsize; 451 attr.val_ptr = &newsize;
450 452
451 for (i = 0; i < sbi->s_numdevs; i++) { 453 for (i = 0; i < sbi->layout.s_numdevs; i++) {
452 struct osd_request *or; 454 struct osd_request *or;
453 455
454 or = osd_start_request(sbi->s_ods[i], GFP_KERNEL); 456 or = osd_start_request(sbi->layout.s_ods[i], GFP_KERNEL);
455 if (unlikely(!or)) { 457 if (unlikely(!or)) {
456 EXOFS_ERR("%s: osd_start_request failed\n", __func__); 458 EXOFS_ERR("%s: osd_start_request failed\n", __func__);
457 ret = -ENOMEM; 459 ret = -ENOMEM;
diff --git a/fs/exofs/super.c b/fs/exofs/super.c
index a1d1e77b12eb..fc8875186ae8 100644
--- a/fs/exofs/super.c
+++ b/fs/exofs/super.c
@@ -210,7 +210,7 @@ int exofs_sync_fs(struct super_block *sb, int wait)
210 sbi = sb->s_fs_info; 210 sbi = sb->s_fs_info;
211 fscb = &sbi->s_fscb; 211 fscb = &sbi->s_fscb;
212 212
213 ret = exofs_get_io_state(sbi, &ios); 213 ret = exofs_get_io_state(&sbi->layout, &ios);
214 if (ret) 214 if (ret)
215 goto out; 215 goto out;
216 216
@@ -264,12 +264,12 @@ static void _exofs_print_device(const char *msg, const char *dev_path,
264 264
265void exofs_free_sbi(struct exofs_sb_info *sbi) 265void exofs_free_sbi(struct exofs_sb_info *sbi)
266{ 266{
267 while (sbi->s_numdevs) { 267 while (sbi->layout.s_numdevs) {
268 int i = --sbi->s_numdevs; 268 int i = --sbi->layout.s_numdevs;
269 struct osd_dev *od = sbi->s_ods[i]; 269 struct osd_dev *od = sbi->layout.s_ods[i];
270 270
271 if (od) { 271 if (od) {
272 sbi->s_ods[i] = NULL; 272 sbi->layout.s_ods[i] = NULL;
273 osduld_put_device(od); 273 osduld_put_device(od);
274 } 274 }
275 } 275 }
@@ -298,7 +298,8 @@ static void exofs_put_super(struct super_block *sb)
298 msecs_to_jiffies(100)); 298 msecs_to_jiffies(100));
299 } 299 }
300 300
301 _exofs_print_device("Unmounting", NULL, sbi->s_ods[0], sbi->s_pid); 301 _exofs_print_device("Unmounting", NULL, sbi->layout.s_ods[0],
302 sbi->layout.s_pid);
302 303
303 exofs_free_sbi(sbi); 304 exofs_free_sbi(sbi);
304 sb->s_fs_info = NULL; 305 sb->s_fs_info = NULL;
@@ -361,7 +362,7 @@ static int exofs_read_lookup_dev_table(struct exofs_sb_info **psbi,
361{ 362{
362 struct exofs_sb_info *sbi = *psbi; 363 struct exofs_sb_info *sbi = *psbi;
363 struct osd_dev *fscb_od; 364 struct osd_dev *fscb_od;
364 struct osd_obj_id obj = {.partition = sbi->s_pid, 365 struct osd_obj_id obj = {.partition = sbi->layout.s_pid,
365 .id = EXOFS_DEVTABLE_ID}; 366 .id = EXOFS_DEVTABLE_ID};
366 struct exofs_device_table *dt; 367 struct exofs_device_table *dt;
367 unsigned table_bytes = table_count * sizeof(dt->dt_dev_table[0]) + 368 unsigned table_bytes = table_count * sizeof(dt->dt_dev_table[0]) +
@@ -376,9 +377,9 @@ static int exofs_read_lookup_dev_table(struct exofs_sb_info **psbi,
376 return -ENOMEM; 377 return -ENOMEM;
377 } 378 }
378 379
379 fscb_od = sbi->s_ods[0]; 380 fscb_od = sbi->layout.s_ods[0];
380 sbi->s_ods[0] = NULL; 381 sbi->layout.s_ods[0] = NULL;
381 sbi->s_numdevs = 0; 382 sbi->layout.s_numdevs = 0;
382 ret = exofs_read_kern(fscb_od, sbi->s_cred, &obj, 0, dt, table_bytes); 383 ret = exofs_read_kern(fscb_od, sbi->s_cred, &obj, 0, dt, table_bytes);
383 if (unlikely(ret)) { 384 if (unlikely(ret)) {
384 EXOFS_ERR("ERROR: reading device table\n"); 385 EXOFS_ERR("ERROR: reading device table\n");
@@ -397,14 +398,15 @@ static int exofs_read_lookup_dev_table(struct exofs_sb_info **psbi,
397 goto out; 398 goto out;
398 399
399 if (likely(numdevs > 1)) { 400 if (likely(numdevs > 1)) {
400 unsigned size = numdevs * sizeof(sbi->s_ods[0]); 401 unsigned size = numdevs * sizeof(sbi->layout.s_ods[0]);
401 402
402 sbi = krealloc(sbi, sizeof(*sbi) + size, GFP_KERNEL); 403 sbi = krealloc(sbi, sizeof(*sbi) + size, GFP_KERNEL);
403 if (unlikely(!sbi)) { 404 if (unlikely(!sbi)) {
404 ret = -ENOMEM; 405 ret = -ENOMEM;
405 goto out; 406 goto out;
406 } 407 }
407 memset(&sbi->s_ods[1], 0, size - sizeof(sbi->s_ods[0])); 408 memset(&sbi->layout.s_ods[1], 0,
409 size - sizeof(sbi->layout.s_ods[0]));
408 *psbi = sbi; 410 *psbi = sbi;
409 } 411 }
410 412
@@ -427,8 +429,8 @@ static int exofs_read_lookup_dev_table(struct exofs_sb_info **psbi,
427 * line. We always keep them in device-table order. 429 * line. We always keep them in device-table order.
428 */ 430 */
429 if (fscb_od && osduld_device_same(fscb_od, &odi)) { 431 if (fscb_od && osduld_device_same(fscb_od, &odi)) {
430 sbi->s_ods[i] = fscb_od; 432 sbi->layout.s_ods[i] = fscb_od;
431 ++sbi->s_numdevs; 433 ++sbi->layout.s_numdevs;
432 fscb_od = NULL; 434 fscb_od = NULL;
433 continue; 435 continue;
434 } 436 }
@@ -441,8 +443,8 @@ static int exofs_read_lookup_dev_table(struct exofs_sb_info **psbi,
441 goto out; 443 goto out;
442 } 444 }
443 445
444 sbi->s_ods[i] = od; 446 sbi->layout.s_ods[i] = od;
445 ++sbi->s_numdevs; 447 ++sbi->layout.s_numdevs;
446 448
447 /* Read the fscb of the other devices to make sure the FS 449 /* Read the fscb of the other devices to make sure the FS
448 * partition is there. 450 * partition is there.
@@ -499,9 +501,10 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent)
499 goto free_sbi; 501 goto free_sbi;
500 } 502 }
501 503
502 sbi->s_ods[0] = od; 504 /* Default layout in case we do not have a device-table */
503 sbi->s_numdevs = 1; 505 sbi->layout.s_ods[0] = od;
504 sbi->s_pid = opts->pid; 506 sbi->layout.s_numdevs = 1;
507 sbi->layout.s_pid = opts->pid;
505 sbi->s_timeout = opts->timeout; 508 sbi->s_timeout = opts->timeout;
506 509
507 /* fill in some other data by hand */ 510 /* fill in some other data by hand */
@@ -514,7 +517,7 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent)
514 sb->s_bdev = NULL; 517 sb->s_bdev = NULL;
515 sb->s_dev = 0; 518 sb->s_dev = 0;
516 519
517 obj.partition = sbi->s_pid; 520 obj.partition = sbi->layout.s_pid;
518 obj.id = EXOFS_SUPER_ID; 521 obj.id = EXOFS_SUPER_ID;
519 exofs_make_credential(sbi->s_cred, &obj); 522 exofs_make_credential(sbi->s_cred, &obj);
520 523
@@ -578,13 +581,13 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent)
578 goto free_sbi; 581 goto free_sbi;
579 } 582 }
580 583
581 _exofs_print_device("Mounting", opts->dev_name, sbi->s_ods[0], 584 _exofs_print_device("Mounting", opts->dev_name, sbi->layout.s_ods[0],
582 sbi->s_pid); 585 sbi->layout.s_pid);
583 return 0; 586 return 0;
584 587
585free_sbi: 588free_sbi:
586 EXOFS_ERR("Unable to mount exofs on %s pid=0x%llx err=%d\n", 589 EXOFS_ERR("Unable to mount exofs on %s pid=0x%llx err=%d\n",
587 opts->dev_name, sbi->s_pid, ret); 590 opts->dev_name, sbi->layout.s_pid, ret);
588 exofs_free_sbi(sbi); 591 exofs_free_sbi(sbi);
589 return ret; 592 return ret;
590} 593}
@@ -627,7 +630,7 @@ static int exofs_statfs(struct dentry *dentry, struct kstatfs *buf)
627 uint8_t cred_a[OSD_CAP_LEN]; 630 uint8_t cred_a[OSD_CAP_LEN];
628 int ret; 631 int ret;
629 632
630 ret = exofs_get_io_state(sbi, &ios); 633 ret = exofs_get_io_state(&sbi->layout, &ios);
631 if (ret) { 634 if (ret) {
632 EXOFS_DBGMSG("exofs_get_io_state failed.\n"); 635 EXOFS_DBGMSG("exofs_get_io_state failed.\n");
633 return ret; 636 return ret;