aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exofs/super.c
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2011-08-06 22:26:31 -0400
committerBoaz Harrosh <bharrosh@panasas.com>2011-08-06 22:36:18 -0400
commit8ff660ab85f524bdc7652eb5d38aaef1d66aa9c7 (patch)
treec4a29cde4fc8654ae00e65cb520e13f9fe7f4e08 /fs/exofs/super.c
parent9e9db45649eb5d3ee5622fdad741914ecf1016a0 (diff)
exofs: Rename raid engine from exofs/ios.c => ore
ORE stands for "Objects Raid Engine" This patch is a mechanical rename of everything that was in ios.c and its API declaration to an ore.c and an osd_ore.h header. The ore engine will later be used by the pnfs objects layout driver. * File ios.c => ore.c * Declaration of types and API are moved from exofs.h to a new osd_ore.h * All used types are prefixed by ore_ from their exofs_ name. * Shift includes from exofs.h to osd_ore.h so osd_ore.h is independent, include it from exofs.h. Other than a pure rename there are no other changes. Next patch will move the ore into it's own module and will export the API to be used by exofs and later the layout driver Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Diffstat (limited to 'fs/exofs/super.c')
-rw-r--r--fs/exofs/super.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/fs/exofs/super.c b/fs/exofs/super.c
index 4d6877967c87..274894053b02 100644
--- a/fs/exofs/super.c
+++ b/fs/exofs/super.c
@@ -263,19 +263,19 @@ static int __sbi_read_stats(struct exofs_sb_info *sbi)
263 struct osd_attr attrs[] = { 263 struct osd_attr attrs[] = {
264 [0] = g_attr_sb_stats, 264 [0] = g_attr_sb_stats,
265 }; 265 };
266 struct exofs_io_state *ios; 266 struct ore_io_state *ios;
267 int ret; 267 int ret;
268 268
269 ret = exofs_get_io_state(&sbi->layout, &sbi->comps, &ios); 269 ret = ore_get_io_state(&sbi->layout, &sbi->comps, &ios);
270 if (unlikely(ret)) { 270 if (unlikely(ret)) {
271 EXOFS_ERR("%s: exofs_get_io_state failed.\n", __func__); 271 EXOFS_ERR("%s: ore_get_io_state failed.\n", __func__);
272 return ret; 272 return ret;
273 } 273 }
274 274
275 ios->in_attr = attrs; 275 ios->in_attr = attrs;
276 ios->in_attr_len = ARRAY_SIZE(attrs); 276 ios->in_attr_len = ARRAY_SIZE(attrs);
277 277
278 ret = exofs_sbi_read(ios); 278 ret = ore_read(ios);
279 if (unlikely(ret)) { 279 if (unlikely(ret)) {
280 EXOFS_ERR("Error reading super_block stats => %d\n", ret); 280 EXOFS_ERR("Error reading super_block stats => %d\n", ret);
281 goto out; 281 goto out;
@@ -302,13 +302,13 @@ static int __sbi_read_stats(struct exofs_sb_info *sbi)
302 } 302 }
303 303
304out: 304out:
305 exofs_put_io_state(ios); 305 ore_put_io_state(ios);
306 return ret; 306 return ret;
307} 307}
308 308
309static void stats_done(struct exofs_io_state *ios, void *p) 309static void stats_done(struct ore_io_state *ios, void *p)
310{ 310{
311 exofs_put_io_state(ios); 311 ore_put_io_state(ios);
312 /* Good thanks nothing to do anymore */ 312 /* Good thanks nothing to do anymore */
313} 313}
314 314
@@ -318,12 +318,12 @@ int exofs_sbi_write_stats(struct exofs_sb_info *sbi)
318 struct osd_attr attrs[] = { 318 struct osd_attr attrs[] = {
319 [0] = g_attr_sb_stats, 319 [0] = g_attr_sb_stats,
320 }; 320 };
321 struct exofs_io_state *ios; 321 struct ore_io_state *ios;
322 int ret; 322 int ret;
323 323
324 ret = exofs_get_io_state(&sbi->layout, &sbi->comps, &ios); 324 ret = ore_get_io_state(&sbi->layout, &sbi->comps, &ios);
325 if (unlikely(ret)) { 325 if (unlikely(ret)) {
326 EXOFS_ERR("%s: exofs_get_io_state failed.\n", __func__); 326 EXOFS_ERR("%s: ore_get_io_state failed.\n", __func__);
327 return ret; 327 return ret;
328 } 328 }
329 329
@@ -337,10 +337,10 @@ int exofs_sbi_write_stats(struct exofs_sb_info *sbi)
337 ios->out_attr = attrs; 337 ios->out_attr = attrs;
338 ios->out_attr_len = ARRAY_SIZE(attrs); 338 ios->out_attr_len = ARRAY_SIZE(attrs);
339 339
340 ret = exofs_sbi_write(ios); 340 ret = ore_write(ios);
341 if (unlikely(ret)) { 341 if (unlikely(ret)) {
342 EXOFS_ERR("%s: exofs_sbi_write failed.\n", __func__); 342 EXOFS_ERR("%s: ore_write failed.\n", __func__);
343 exofs_put_io_state(ios); 343 ore_put_io_state(ios);
344 } 344 }
345 345
346 return ret; 346 return ret;
@@ -359,9 +359,9 @@ int exofs_sync_fs(struct super_block *sb, int wait)
359{ 359{
360 struct exofs_sb_info *sbi; 360 struct exofs_sb_info *sbi;
361 struct exofs_fscb *fscb; 361 struct exofs_fscb *fscb;
362 struct exofs_comp one_comp; 362 struct ore_comp one_comp;
363 struct exofs_components comps; 363 struct ore_components comps;
364 struct exofs_io_state *ios; 364 struct ore_io_state *ios;
365 int ret = -ENOMEM; 365 int ret = -ENOMEM;
366 366
367 fscb = kmalloc(sizeof(*fscb), GFP_KERNEL); 367 fscb = kmalloc(sizeof(*fscb), GFP_KERNEL);
@@ -380,7 +380,7 @@ int exofs_sync_fs(struct super_block *sb, int wait)
380 380
381 exofs_init_comps(&comps, &one_comp, sbi, EXOFS_SUPER_ID); 381 exofs_init_comps(&comps, &one_comp, sbi, EXOFS_SUPER_ID);
382 382
383 ret = exofs_get_io_state(&sbi->layout, &comps, &ios); 383 ret = ore_get_io_state(&sbi->layout, &comps, &ios);
384 if (unlikely(ret)) 384 if (unlikely(ret))
385 goto out; 385 goto out;
386 386
@@ -397,9 +397,9 @@ int exofs_sync_fs(struct super_block *sb, int wait)
397 ios->offset = 0; 397 ios->offset = 0;
398 ios->kern_buff = fscb; 398 ios->kern_buff = fscb;
399 399
400 ret = exofs_sbi_write(ios); 400 ret = ore_write(ios);
401 if (unlikely(ret)) 401 if (unlikely(ret))
402 EXOFS_ERR("%s: exofs_sbi_write failed.\n", __func__); 402 EXOFS_ERR("%s: ore_write failed.\n", __func__);
403 else 403 else
404 sb->s_dirt = 0; 404 sb->s_dirt = 0;
405 405
@@ -407,7 +407,7 @@ int exofs_sync_fs(struct super_block *sb, int wait)
407 unlock_super(sb); 407 unlock_super(sb);
408out: 408out:
409 EXOFS_DBGMSG("s_nextid=0x%llx ret=%d\n", _LLU(sbi->s_nextid), ret); 409 EXOFS_DBGMSG("s_nextid=0x%llx ret=%d\n", _LLU(sbi->s_nextid), ret);
410 exofs_put_io_state(ios); 410 ore_put_io_state(ios);
411 kfree(fscb); 411 kfree(fscb);
412 return ret; 412 return ret;
413} 413}
@@ -562,7 +562,7 @@ static int _read_and_match_data_map(struct exofs_sb_info *sbi, unsigned numdevs,
562 return 0; 562 return 0;
563} 563}
564 564
565static unsigned __ra_pages(struct exofs_layout *layout) 565static unsigned __ra_pages(struct ore_layout *layout)
566{ 566{
567 const unsigned _MIN_RA = 32; /* min 128K read-ahead */ 567 const unsigned _MIN_RA = 32; /* min 128K read-ahead */
568 unsigned ra_pages = layout->group_width * layout->stripe_unit / 568 unsigned ra_pages = layout->group_width * layout->stripe_unit /
@@ -609,7 +609,7 @@ static int exofs_read_lookup_dev_table(struct exofs_sb_info *sbi,
609 struct osd_dev *fscb_od, 609 struct osd_dev *fscb_od,
610 unsigned table_count) 610 unsigned table_count)
611{ 611{
612 struct exofs_comp comp; 612 struct ore_comp comp;
613 struct exofs_device_table *dt; 613 struct exofs_device_table *dt;
614 unsigned table_bytes = table_count * sizeof(dt->dt_dev_table[0]) + 614 unsigned table_bytes = table_count * sizeof(dt->dt_dev_table[0]) +
615 sizeof(*dt); 615 sizeof(*dt);
@@ -747,7 +747,7 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent)
747 struct exofs_sb_info *sbi; /*extended info */ 747 struct exofs_sb_info *sbi; /*extended info */
748 struct osd_dev *od; /* Master device */ 748 struct osd_dev *od; /* Master device */
749 struct exofs_fscb fscb; /*on-disk superblock info */ 749 struct exofs_fscb fscb; /*on-disk superblock info */
750 struct exofs_comp comp; 750 struct ore_comp comp;
751 unsigned table_count; 751 unsigned table_count;
752 int ret; 752 int ret;
753 753
@@ -913,7 +913,7 @@ static int exofs_statfs(struct dentry *dentry, struct kstatfs *buf)
913{ 913{
914 struct super_block *sb = dentry->d_sb; 914 struct super_block *sb = dentry->d_sb;
915 struct exofs_sb_info *sbi = sb->s_fs_info; 915 struct exofs_sb_info *sbi = sb->s_fs_info;
916 struct exofs_io_state *ios; 916 struct ore_io_state *ios;
917 struct osd_attr attrs[] = { 917 struct osd_attr attrs[] = {
918 ATTR_DEF(OSD_APAGE_PARTITION_QUOTAS, 918 ATTR_DEF(OSD_APAGE_PARTITION_QUOTAS,
919 OSD_ATTR_PQ_CAPACITY_QUOTA, sizeof(__be64)), 919 OSD_ATTR_PQ_CAPACITY_QUOTA, sizeof(__be64)),
@@ -924,16 +924,16 @@ static int exofs_statfs(struct dentry *dentry, struct kstatfs *buf)
924 uint64_t used = ULLONG_MAX; 924 uint64_t used = ULLONG_MAX;
925 int ret; 925 int ret;
926 926
927 ret = exofs_get_io_state(&sbi->layout, &sbi->comps, &ios); 927 ret = ore_get_io_state(&sbi->layout, &sbi->comps, &ios);
928 if (ret) { 928 if (ret) {
929 EXOFS_DBGMSG("exofs_get_io_state failed.\n"); 929 EXOFS_DBGMSG("ore_get_io_state failed.\n");
930 return ret; 930 return ret;
931 } 931 }
932 932
933 ios->in_attr = attrs; 933 ios->in_attr = attrs;
934 ios->in_attr_len = ARRAY_SIZE(attrs); 934 ios->in_attr_len = ARRAY_SIZE(attrs);
935 935
936 ret = exofs_sbi_read(ios); 936 ret = ore_read(ios);
937 if (unlikely(ret)) 937 if (unlikely(ret))
938 goto out; 938 goto out;
939 939
@@ -962,7 +962,7 @@ static int exofs_statfs(struct dentry *dentry, struct kstatfs *buf)
962 buf->f_namelen = EXOFS_NAME_LEN; 962 buf->f_namelen = EXOFS_NAME_LEN;
963 963
964out: 964out:
965 exofs_put_io_state(ios); 965 ore_put_io_state(ios);
966 return ret; 966 return ret;
967} 967}
968 968